diff --git a/.github/workflows/test-code-quality.yml b/.github/workflows/test-code-quality.yml
index ae31395521a..fab05fc2bbb 100644
--- a/.github/workflows/test-code-quality.yml
+++ b/.github/workflows/test-code-quality.yml
@@ -7,13 +7,17 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
code-quality:
diff --git a/.github/workflows/test-unit-core-utils.yml b/.github/workflows/test-unit-core-utils.yml
index d6d6353238f..a01f09559c6 100644
--- a/.github/workflows/test-unit-core-utils.yml
+++ b/.github/workflows/test-unit-core-utils.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
core-utils:
diff --git a/.github/workflows/test-unit-documentation.yml b/.github/workflows/test-unit-documentation.yml
index c12a289ce9f..50589cb5926 100644
--- a/.github/workflows/test-unit-documentation.yml
+++ b/.github/workflows/test-unit-documentation.yml
@@ -7,13 +7,17 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
documentation:
diff --git a/.github/workflows/test-unit-enterprise-routing.yml b/.github/workflows/test-unit-enterprise-routing.yml
index 13136c968d1..a64f00f4744 100644
--- a/.github/workflows/test-unit-enterprise-routing.yml
+++ b/.github/workflows/test-unit-enterprise-routing.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
enterprise-routing:
diff --git a/.github/workflows/test-unit-integrations.yml b/.github/workflows/test-unit-integrations.yml
index c95ed4e7c24..39752cf8e5d 100644
--- a/.github/workflows/test-unit-integrations.yml
+++ b/.github/workflows/test-unit-integrations.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
integrations:
diff --git a/.github/workflows/test-unit-llm-providers.yml b/.github/workflows/test-unit-llm-providers.yml
index df78564ab0c..4d1c921f723 100644
--- a/.github/workflows/test-unit-llm-providers.yml
+++ b/.github/workflows/test-unit-llm-providers.yml
@@ -7,13 +7,17 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
vertex-ai:
diff --git a/.github/workflows/test-unit-misc.yml b/.github/workflows/test-unit-misc.yml
index 9afaaaead93..505e22cfed4 100644
--- a/.github/workflows/test-unit-misc.yml
+++ b/.github/workflows/test-unit-misc.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
misc:
diff --git a/.github/workflows/test-unit-proxy-auth.yml b/.github/workflows/test-unit-proxy-auth.yml
index 97dfaed6e81..c27fe16d611 100644
--- a/.github/workflows/test-unit-proxy-auth.yml
+++ b/.github/workflows/test-unit-proxy-auth.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
proxy-auth:
diff --git a/.github/workflows/test-unit-proxy-db.yml b/.github/workflows/test-unit-proxy-db.yml
index b0ee56f5a5c..60d2e471862 100644
--- a/.github/workflows/test-unit-proxy-db.yml
+++ b/.github/workflows/test-unit-proxy-db.yml
@@ -7,13 +7,17 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Semantic matrix: each shard groups tests by concern (auth, server, logging, …)
# rather than alphabetical letter ranges. Adding a new test file means adding it
diff --git a/.github/workflows/test-unit-proxy-endpoints.yml b/.github/workflows/test-unit-proxy-endpoints.yml
index b3eb8f79a43..6a51d2a8578 100644
--- a/.github/workflows/test-unit-proxy-endpoints.yml
+++ b/.github/workflows/test-unit-proxy-endpoints.yml
@@ -7,14 +7,18 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
workflow_dispatch:
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
proxy-endpoints:
diff --git a/.github/workflows/test-unit-proxy-infra.yml b/.github/workflows/test-unit-proxy-infra.yml
index 884d62289b9..913653a1711 100644
--- a/.github/workflows/test-unit-proxy-infra.yml
+++ b/.github/workflows/test-unit-proxy-infra.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
proxy-infra:
diff --git a/.github/workflows/test-unit-proxy-legacy.yml b/.github/workflows/test-unit-proxy-legacy.yml
index bcbf365babf..49aa5f9f51d 100644
--- a/.github/workflows/test-unit-proxy-legacy.yml
+++ b/.github/workflows/test-unit-proxy-legacy.yml
@@ -7,13 +7,17 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
diff --git a/.github/workflows/test-unit-responses-caching-types.yml b/.github/workflows/test-unit-responses-caching-types.yml
index 2f177587997..5b336452069 100644
--- a/.github/workflows/test-unit-responses-caching-types.yml
+++ b/.github/workflows/test-unit-responses-caching-types.yml
@@ -7,6 +7,10 @@ on:
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"
+ push:
+ branches:
+ - main
+ - litellm_internal_staging
permissions:
contents: read
@@ -14,8 +18,8 @@ permissions:
pull-requests: write
concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
responses-caching-types:
diff --git a/basedpyright-code-budget.json b/basedpyright-code-budget.json
index 65142091712..f6dd90077b1 100644
--- a/basedpyright-code-budget.json
+++ b/basedpyright-code-budget.json
@@ -1,6 +1,6 @@
{
"reportAny": {
- "limit": 31903
+ "limit": 29813
},
"reportArgumentType": {
"limit": 2645
@@ -24,7 +24,7 @@
"limit": 42
},
"reportExplicitAny": {
- "limit": 10214
+ "limit": 9473
},
"reportFunctionMemberAccess": {
"limit": 11
@@ -33,7 +33,7 @@
"limit": 227
},
"reportIncompatibleMethodOverride": {
- "limit": 78
+ "limit": 77
},
"reportIncompatibleVariableOverride": {
"limit": 12
@@ -54,10 +54,10 @@
"limit": 0
},
"reportMissingParameterType": {
- "limit": 5869
+ "limit": 5855
},
"reportMissingTypeArgument": {
- "limit": 15861
+ "limit": 15852
},
"reportMissingTypeStubs": {
"limit": 41
@@ -99,19 +99,19 @@
"limit": 0
},
"reportUnknownArgumentType": {
- "limit": 45366
+ "limit": 45324
},
"reportUnknownLambdaType": {
"limit": 113
},
"reportUnknownMemberType": {
- "limit": 40477
+ "limit": 40452
},
"reportUnknownParameterType": {
- "limit": 20338
+ "limit": 20309
},
"reportUnknownVariableType": {
- "limit": 32047
+ "limit": 31978
},
"reportUnnecessaryCast": {
"limit": 177
@@ -123,7 +123,7 @@
"limit": 7
},
"reportUnnecessaryIsInstance": {
- "limit": 1205
+ "limit": 1204
},
"reportUntypedBaseClass": {
"limit": 165
diff --git a/enterprise/litellm_enterprise/proxy/hooks/managed_files.py b/enterprise/litellm_enterprise/proxy/hooks/managed_files.py
index 8821736d0ff..d57c1a78f3d 100644
--- a/enterprise/litellm_enterprise/proxy/hooks/managed_files.py
+++ b/enterprise/litellm_enterprise/proxy/hooks/managed_files.py
@@ -215,7 +215,7 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
)
if result:
- return LiteLLM_ManagedFileTable(**result)
+ return LiteLLM_ManagedFileTable.model_validate(result)
## CHECK DB
db_object = await self.prisma_client.db.litellm_managedfiletable.find_first(
@@ -223,7 +223,7 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
)
if db_object:
- return LiteLLM_ManagedFileTable(**db_object.model_dump())
+ return LiteLLM_ManagedFileTable.model_validate(db_object.model_dump())
return None
async def delete_unified_file_id(
@@ -349,7 +349,7 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
if isinstance(batch.file_object, str)
else batch.file_object
)
- batch_obj = LiteLLMBatch(**batch_data)
+ batch_obj = LiteLLMBatch.model_validate(batch_data)
batch_obj.id = batch.unified_object_id
batch_objects.append(batch_obj)
@@ -382,7 +382,7 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
"flat_model_file_ids": {"hasSome": model_object_ids},
}
)
- return [OpenAIFileObject(**file_object.file_object) for file_object in file_ids]
+ return [OpenAIFileObject.model_validate(file_object.file_object) for file_object in file_ids]
async def check_managed_file_id_access(
self, data: Dict, user_api_key_dict: UserAPIKeyAuth
diff --git a/enterprise/pyproject.toml b/enterprise/pyproject.toml
index fa209e55eb8..5489eba1494 100644
--- a/enterprise/pyproject.toml
+++ b/enterprise/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "litellm-enterprise"
-version = "0.1.52"
+version = "0.1.53"
description = "Package for LiteLLM Enterprise features"
readme = "README.md"
requires-python = ">=3.9"
@@ -26,7 +26,7 @@ required-version = ">=0.10.9"
module-root = ""
[tool.commitizen]
-version = "0.1.52"
+version = "0.1.53"
version_files = [
"pyproject.toml:^version",
"../pyproject.toml:litellm-enterprise==",
diff --git a/helm/litellm-helm/templates/migrations-job.yaml b/helm/litellm-helm/templates/migrations-job.yaml
index 5ec7f5b7f3e..7bc1a133883 100644
--- a/helm/litellm-helm/templates/migrations-job.yaml
+++ b/helm/litellm-helm/templates/migrations-job.yaml
@@ -35,6 +35,8 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "litellm.migrationServiceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.migrationJob.extraInitContainers }}
initContainers:
{{- tpl (toYaml .) $ | nindent 8 }}
diff --git a/helm/litellm-helm/tests/migrations-job_tests.yaml b/helm/litellm-helm/tests/migrations-job_tests.yaml
index 05dd37b4857..6bfc1f38adc 100644
--- a/helm/litellm-helm/tests/migrations-job_tests.yaml
+++ b/helm/litellm-helm/tests/migrations-job_tests.yaml
@@ -254,3 +254,39 @@ tests:
content:
name: sidecar-tpl
image: "ghcr.io/berriai/litellm-database:test"
+ - it: should render the pod-level securityContext from podSecurityContext
+ template: migrations-job.yaml
+ set:
+ migrationJob:
+ enabled: true
+ podSecurityContext:
+ fsGroup: 10000
+ runAsUser: 10000
+ runAsNonRoot: true
+ asserts:
+ - equal:
+ path: spec.template.spec.securityContext
+ value:
+ fsGroup: 10000
+ runAsUser: 10000
+ runAsNonRoot: true
+ - it: should keep the pod-level and container-level securityContext separate
+ template: migrations-job.yaml
+ set:
+ migrationJob:
+ enabled: true
+ podSecurityContext:
+ fsGroup: 10000
+ securityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ asserts:
+ - equal:
+ path: spec.template.spec.securityContext
+ value:
+ fsGroup: 10000
+ - equal:
+ path: spec.template.spec.containers[0].securityContext
+ value:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
diff --git a/helm/litellm/templates/_helpers.tpl b/helm/litellm/templates/_helpers.tpl
index a0205c0a3a2..bffd627393a 100644
--- a/helm/litellm/templates/_helpers.tpl
+++ b/helm/litellm/templates/_helpers.tpl
@@ -138,6 +138,59 @@ is false the chart uses the provided name, or the namespace `default` SA.
{{- end -}}
{{- end -}}
+{{/*
+ServiceAccount name for the migrations Job.
+
+The Job is a pre-install / pre-upgrade hook, so it is created before the
+chart's ordinary resources. A ServiceAccount the chart creates is one of
+those ordinary resources, which makes borrowing the backend name a cycle:
+the hook pod is rejected because the account does not exist yet. So when
+`serviceAccounts.backend.create` is true the Job falls back to the namespace
+`default` account unless the operator names one that already exists. With
+`create` false the backend name is either an operator-supplied existing
+account or `default`, both of which are safe for the hook, so the Job keeps
+sharing it.
+
+`migrationJob.serviceAccountName` always wins when set, which is how a Job
+that needs credentials of its own (IRSA / Workload Identity for IAM database
+auth) gets them.
+*/}}
+{{- define "litellm.migrations.serviceAccountName" -}}
+{{- if .Values.migrationJob.serviceAccountName -}}
+{{ .Values.migrationJob.serviceAccountName }}
+{{- else if .Values.serviceAccounts.backend.create -}}
+default
+{{- else -}}
+{{ include "litellm.backend.serviceAccountName" . }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Extra pod labels for a component's Deployment, validated against its selector.
+
+Invoke with a dict:
+ (dict "podLabels" .Values.gateway.podLabels "componentName" "gateway")
+
+The three selector keys are also emitted on the pod template, so a podLabels
+entry reusing one renders a duplicate YAML key whose later value wins. That
+leaves the pod template no longer matching the (immutable) selector and the
+apiserver rejects the Deployment. Fail at template time naming the key
+instead, so the operator gets the reason here rather than an opaque
+`selector does not match template labels` from the apiserver.
+
+The migrations Job takes podLabels unvalidated: a Job's selector is generated
+by the controller rather than declared, so nothing there can collide.
+*/}}
+{{- define "litellm.podLabels" -}}
+{{- $componentName := .componentName -}}
+{{- range $key, $value := .podLabels }}
+{{- if has $key (list "app.kubernetes.io/name" "app.kubernetes.io/instance" "app.kubernetes.io/component") }}
+{{- fail (printf "%s.podLabels cannot set %s: it is part of the Deployment's immutable selector" $componentName $key) }}
+{{- end }}
+{{- end }}
+{{- toYaml .podLabels }}
+{{- end -}}
+
{{/*
Master-key + database + redis env block — shared by gateway, backend, and the
migrations Job.
diff --git a/helm/litellm/templates/backend/deployment.yaml b/helm/litellm/templates/backend/deployment.yaml
index 892b84ff7d5..c5d799a0faf 100644
--- a/helm/litellm/templates/backend/deployment.yaml
+++ b/helm/litellm/templates/backend/deployment.yaml
@@ -23,9 +23,16 @@ spec:
{{- end }}
labels:
{{- include "litellm.backend.selectorLabels" . | nindent 8 }}
+ {{- with .Values.backend.podLabels }}
+ {{- include "litellm.podLabels" (dict "podLabels" . "componentName" "backend") | nindent 8 }}
+ {{- end }}
spec:
serviceAccountName: {{ include "litellm.backend.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccounts.backend.automount }}
+ {{- with .Values.backend.podSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
@@ -34,6 +41,10 @@ spec:
- name: backend
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
+ {{- with .Values.backend.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
ports:
- name: http
containerPort: 4001
@@ -70,8 +81,15 @@ spec:
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
+ {{- with .Values.backend.lifecycle }}
+ lifecycle:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
resources:
{{- toYaml .Values.backend.resources | nindent 12 }}
+ {{- with .Values.backend.extraContainers }}
+ {{- tpl (toYaml .) $ | nindent 8 }}
+ {{- end }}
{{- if or .Values.gateway.config.create .Values.backend.volumes .Values.billingMetrics.enabled }}
volumes:
{{- if .Values.gateway.config.create }}
@@ -102,4 +120,8 @@ spec:
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- $gracePeriod := .Values.backend.terminationGracePeriodSeconds }}
+ {{- if not (or (kindIs "invalid" $gracePeriod) (eq (printf "%v" $gracePeriod) "")) }}
+ terminationGracePeriodSeconds: {{ $gracePeriod }}
+ {{- end }}
{{- end }}
diff --git a/helm/litellm/templates/gateway/deployment.yaml b/helm/litellm/templates/gateway/deployment.yaml
index b2e22612905..7d16134a53d 100644
--- a/helm/litellm/templates/gateway/deployment.yaml
+++ b/helm/litellm/templates/gateway/deployment.yaml
@@ -21,9 +21,16 @@ spec:
{{- end }}
labels:
{{- include "litellm.gateway.selectorLabels" . | nindent 8 }}
+ {{- with .Values.gateway.podLabels }}
+ {{- include "litellm.podLabels" (dict "podLabels" . "componentName" "gateway") | nindent 8 }}
+ {{- end }}
spec:
serviceAccountName: {{ include "litellm.gateway.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccounts.gateway.automount }}
+ {{- with .Values.gateway.podSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
@@ -32,6 +39,10 @@ spec:
- name: gateway
image: "{{ .Values.gateway.image.repository }}:{{ .Values.gateway.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.gateway.image.pullPolicy }}
+ {{- with .Values.gateway.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
ports:
- name: http
containerPort: 4000
@@ -72,8 +83,15 @@ spec:
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
+ {{- with .Values.gateway.lifecycle }}
+ lifecycle:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
resources:
{{- toYaml .Values.gateway.resources | nindent 12 }}
+ {{- with .Values.gateway.extraContainers }}
+ {{- tpl (toYaml .) $ | nindent 8 }}
+ {{- end }}
{{- if or .Values.gateway.config.create .Values.gateway.volumes .Values.billingMetrics.enabled }}
volumes:
{{- if .Values.gateway.config.create }}
@@ -104,4 +122,8 @@ spec:
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- $gracePeriod := .Values.gateway.terminationGracePeriodSeconds }}
+ {{- if not (or (kindIs "invalid" $gracePeriod) (eq (printf "%v" $gracePeriod) "")) }}
+ terminationGracePeriodSeconds: {{ $gracePeriod }}
+ {{- end }}
{{- end }}
diff --git a/helm/litellm/templates/migrations-job.yaml b/helm/litellm/templates/migrations-job.yaml
index 92671388546..2debe8a1e10 100644
--- a/helm/litellm/templates/migrations-job.yaml
+++ b/helm/litellm/templates/migrations-job.yaml
@@ -23,12 +23,21 @@ spec:
ttlSecondsAfterFinished: {{ .Values.migrationJob.ttlSecondsAfterFinished }}
template:
metadata:
+ {{- /* The Job's selector is generated by the controller rather than
+ declared, so podLabels may override a chart label here. Merge
+ instead of appending so an override replaces the key rather than
+ rendering it twice. */}}
+ {{- $chartLabels := merge (dict "app.kubernetes.io/component" "migrations") (fromYaml (include "litellm.commonLabels" .)) }}
labels:
- {{- include "litellm.commonLabels" . | nindent 8 }}
- app.kubernetes.io/component: migrations
+ {{- toYaml (merge (deepCopy .Values.migrationJob.podLabels) $chartLabels) | nindent 8 }}
spec:
restartPolicy: Never
- serviceAccountName: {{ include "litellm.backend.serviceAccountName" . }}
+ serviceAccountName: {{ include "litellm.migrations.serviceAccountName" . }}
+ automountServiceAccountToken: {{ .Values.migrationJob.automountServiceAccountToken }}
+ {{- with .Values.migrationJob.podSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
@@ -37,10 +46,22 @@ spec:
- name: prisma-migrations
image: "{{ .Values.migrationJob.image.repository }}:{{ .Values.migrationJob.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.migrationJob.image.pullPolicy }}
+ {{- with .Values.migrationJob.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
env:
{{- include "litellm.serverEnv" (dict "root" $ "component" .Values.migrationJob) | nindent 12 }}
+ {{- with .Values.migrationJob.volumeMounts }}
+ volumeMounts:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
{{- with .Values.migrationJob.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
+ {{- with .Values.migrationJob.volumes }}
+ volumes:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- end }}
diff --git a/helm/litellm/templates/ui/deployment.yaml b/helm/litellm/templates/ui/deployment.yaml
index cd1f8c08fd4..b4129dbc8ac 100644
--- a/helm/litellm/templates/ui/deployment.yaml
+++ b/helm/litellm/templates/ui/deployment.yaml
@@ -18,9 +18,16 @@ spec:
{{- end }}
labels:
{{- include "litellm.ui.selectorLabels" . | nindent 8 }}
+ {{- with .Values.ui.podLabels }}
+ {{- include "litellm.podLabels" (dict "podLabels" . "componentName" "ui") | nindent 8 }}
+ {{- end }}
spec:
serviceAccountName: {{ include "litellm.ui.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccounts.ui.automount }}
+ {{- with .Values.ui.podSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
@@ -29,6 +36,10 @@ spec:
- name: ui
image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
+ {{- with .Values.ui.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
ports:
- name: http
containerPort: 3000
@@ -58,8 +69,15 @@ spec:
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
+ {{- with .Values.ui.lifecycle }}
+ lifecycle:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
resources:
{{- toYaml .Values.ui.resources | nindent 12 }}
+ {{- with .Values.ui.extraContainers }}
+ {{- tpl (toYaml .) $ | nindent 8 }}
+ {{- end }}
{{- with .Values.ui.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
@@ -80,4 +98,8 @@ spec:
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- $gracePeriod := .Values.ui.terminationGracePeriodSeconds }}
+ {{- if not (or (kindIs "invalid" $gracePeriod) (eq (printf "%v" $gracePeriod) "")) }}
+ terminationGracePeriodSeconds: {{ $gracePeriod }}
+ {{- end }}
{{- end }}
diff --git a/helm/litellm/tests/migration_job_tests.yaml b/helm/litellm/tests/migration_job_tests.yaml
new file mode 100644
index 00000000000..12e525c5a8c
--- /dev/null
+++ b/helm/litellm/tests/migration_job_tests.yaml
@@ -0,0 +1,169 @@
+suite: test migrations Job ServiceAccount resolution and pod hardening
+templates:
+ - migrations-job.yaml
+values:
+ - ./values/required.yaml
+tests:
+ - it: borrows the namespace default account when no ServiceAccount is configured
+ asserts:
+ - equal:
+ path: spec.template.spec.serviceAccountName
+ value: default
+
+ - it: falls back to the namespace default account when the chart creates the backend ServiceAccount
+ set:
+ serviceAccounts.backend.create: true
+ asserts:
+ - equal:
+ path: spec.template.spec.serviceAccountName
+ value: default
+ - notEqual:
+ path: spec.template.spec.serviceAccountName
+ value: RELEASE-NAME-litellm-backend
+
+ - it: keeps sharing an existing backend ServiceAccount the chart does not create
+ set:
+ serviceAccounts.backend.create: false
+ serviceAccounts.backend.name: existing-backend-sa
+ asserts:
+ - equal:
+ path: spec.template.spec.serviceAccountName
+ value: existing-backend-sa
+
+ - it: prefers an explicit migration ServiceAccount over the created backend one
+ set:
+ serviceAccounts.backend.create: true
+ migrationJob.serviceAccountName: migrations-sa
+ asserts:
+ - equal:
+ path: spec.template.spec.serviceAccountName
+ value: migrations-sa
+
+ - it: prefers an explicit migration ServiceAccount over an existing backend one
+ set:
+ serviceAccounts.backend.create: false
+ serviceAccounts.backend.name: existing-backend-sa
+ migrationJob.serviceAccountName: migrations-sa
+ asserts:
+ - equal:
+ path: spec.template.spec.serviceAccountName
+ value: migrations-sa
+
+ - it: mounts no ServiceAccount token by default
+ asserts:
+ - equal:
+ path: spec.template.spec.automountServiceAccountToken
+ value: false
+
+ - it: mounts a ServiceAccount token when the operator asks for one
+ set:
+ migrationJob.automountServiceAccountToken: true
+ asserts:
+ - equal:
+ path: spec.template.spec.automountServiceAccountToken
+ value: true
+
+ - it: keeps the token off the Job when the backend disables automounting
+ set:
+ serviceAccounts.backend.create: true
+ serviceAccounts.backend.automount: false
+ asserts:
+ - equal:
+ path: spec.template.spec.serviceAccountName
+ value: default
+ - equal:
+ path: spec.template.spec.automountServiceAccountToken
+ value: false
+
+ - it: renders no hardening fields by default
+ asserts:
+ - isNull:
+ path: spec.template.spec.securityContext
+ - isNull:
+ path: spec.template.spec.containers[0].securityContext
+ - isNull:
+ path: spec.template.spec.volumes
+ - isNull:
+ path: spec.template.spec.containers[0].volumeMounts
+ - equal:
+ path: spec.template.metadata.labels
+ value:
+ app.kubernetes.io/name: litellm
+ app.kubernetes.io/instance: RELEASE-NAME
+ app.kubernetes.io/managed-by: Helm
+ helm.sh/chart: litellm-0.1.0
+ app.kubernetes.io/component: migrations
+
+ - it: renders pod-level and container-level securityContext in their own scopes
+ set:
+ migrationJob.podSecurityContext:
+ runAsNonRoot: true
+ runAsUser: 65532
+ seccompProfile:
+ type: RuntimeDefault
+ migrationJob.securityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+ asserts:
+ - equal:
+ path: spec.template.spec.securityContext
+ value:
+ runAsNonRoot: true
+ runAsUser: 65532
+ seccompProfile:
+ type: RuntimeDefault
+ - equal:
+ path: spec.template.spec.containers[0].securityContext
+ value:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+
+ - it: renders volumes on the pod and volumeMounts on the migration container
+ set:
+ migrationJob.volumes:
+ - name: tmp
+ emptyDir:
+ sizeLimit: 64Mi
+ migrationJob.volumeMounts:
+ - name: tmp
+ mountPath: /tmp
+ asserts:
+ - equal:
+ path: spec.template.spec.volumes
+ value:
+ - name: tmp
+ emptyDir:
+ sizeLimit: 64Mi
+ - equal:
+ path: spec.template.spec.containers[0].volumeMounts
+ value:
+ - name: tmp
+ mountPath: /tmp
+
+ - it: merges podLabels with the chart labels on the Job pod
+ set:
+ migrationJob.podLabels:
+ egress-policy: restricted
+ asserts:
+ - equal:
+ path: spec.template.metadata.labels['egress-policy']
+ value: restricted
+ - equal:
+ path: spec.template.metadata.labels['app.kubernetes.io/component']
+ value: migrations
+
+ - it: accepts a podLabel that reuses a chart label, since the Job selector is controller-generated
+ set:
+ migrationJob.podLabels:
+ app.kubernetes.io/component: batch-migrations
+ asserts:
+ - notFailedTemplate: {}
+ - equal:
+ path: spec.template.metadata.labels['app.kubernetes.io/component']
+ value: batch-migrations
diff --git a/helm/litellm/tests/pod_hardening_tests.yaml b/helm/litellm/tests/pod_hardening_tests.yaml
new file mode 100644
index 00000000000..18e836670c0
--- /dev/null
+++ b/helm/litellm/tests/pod_hardening_tests.yaml
@@ -0,0 +1,298 @@
+suite: test pod hardening knobs on the component deployments
+templates:
+ - gateway/deployment.yaml
+ - gateway/configmap.yaml
+ - backend/deployment.yaml
+ - ui/deployment.yaml
+values:
+ - ./values/required.yaml
+tests:
+ - it: gateway renders no hardening fields by default
+ template: gateway/deployment.yaml
+ asserts:
+ - isNull:
+ path: spec.template.spec.securityContext
+ - isNull:
+ path: spec.template.spec.containers[0].securityContext
+ - isNull:
+ path: spec.template.spec.containers[0].lifecycle
+ - isNull:
+ path: spec.template.spec.terminationGracePeriodSeconds
+ - lengthEqual:
+ path: spec.template.spec.containers
+ count: 1
+ - equal:
+ path: spec.template.metadata.labels
+ value:
+ app.kubernetes.io/name: litellm
+ app.kubernetes.io/instance: RELEASE-NAME
+ app.kubernetes.io/component: gateway
+
+ - it: gateway renders pod-level and container-level securityContext in their own scopes
+ template: gateway/deployment.yaml
+ set:
+ gateway.podSecurityContext:
+ runAsNonRoot: true
+ runAsUser: 65532
+ fsGroup: 65532
+ seccompProfile:
+ type: RuntimeDefault
+ gateway.securityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+ asserts:
+ - equal:
+ path: spec.template.spec.securityContext
+ value:
+ runAsNonRoot: true
+ runAsUser: 65532
+ fsGroup: 65532
+ seccompProfile:
+ type: RuntimeDefault
+ - equal:
+ path: spec.template.spec.containers[0].securityContext
+ value:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+
+ - it: gateway merges podLabels with the selector labels
+ template: gateway/deployment.yaml
+ set:
+ gateway.podLabels:
+ egress-policy: restricted
+ team: platform
+ asserts:
+ - equal:
+ path: spec.template.metadata.labels
+ value:
+ app.kubernetes.io/name: litellm
+ app.kubernetes.io/instance: RELEASE-NAME
+ app.kubernetes.io/component: gateway
+ egress-policy: restricted
+ team: platform
+ - equal:
+ path: spec.selector.matchLabels
+ value:
+ app.kubernetes.io/name: litellm
+ app.kubernetes.io/instance: RELEASE-NAME
+ app.kubernetes.io/component: gateway
+
+ - it: gateway rejects a podLabel that collides with the selector
+ template: gateway/deployment.yaml
+ set:
+ gateway.podLabels:
+ app.kubernetes.io/component: not-gateway
+ asserts:
+ - failedTemplate:
+ errorMessage: "gateway.podLabels cannot set app.kubernetes.io/component: it is part of the Deployment's immutable selector"
+
+ - it: backend rejects a podLabel that collides with the selector
+ template: backend/deployment.yaml
+ set:
+ backend.podLabels:
+ app.kubernetes.io/name: not-litellm
+ asserts:
+ - failedTemplate:
+ errorMessage: "backend.podLabels cannot set app.kubernetes.io/name: it is part of the Deployment's immutable selector"
+
+ - it: ui rejects a podLabel that collides with the selector
+ template: ui/deployment.yaml
+ set:
+ ui.podLabels:
+ app.kubernetes.io/instance: not-the-release
+ asserts:
+ - failedTemplate:
+ errorMessage: "ui.podLabels cannot set app.kubernetes.io/instance: it is part of the Deployment's immutable selector"
+
+ - it: gateway renders lifecycle hooks on the container
+ template: gateway/deployment.yaml
+ set:
+ gateway.lifecycle:
+ preStop:
+ httpGet:
+ path: /health/drain
+ port: 4000
+ asserts:
+ - equal:
+ path: spec.template.spec.containers[0].lifecycle
+ value:
+ preStop:
+ httpGet:
+ path: /health/drain
+ port: 4000
+
+ - it: gateway renders terminationGracePeriodSeconds on the pod spec
+ template: gateway/deployment.yaml
+ set:
+ gateway.terminationGracePeriodSeconds: 90
+ asserts:
+ - equal:
+ path: spec.template.spec.terminationGracePeriodSeconds
+ value: 90
+
+ - it: gateway honors an explicit terminationGracePeriodSeconds of zero
+ template: gateway/deployment.yaml
+ set:
+ gateway.terminationGracePeriodSeconds: 0
+ asserts:
+ - equal:
+ path: spec.template.spec.terminationGracePeriodSeconds
+ value: 0
+
+ - it: gateway appends extraContainers after the gateway container
+ template: gateway/deployment.yaml
+ set:
+ gateway.extraContainers:
+ - name: auth-sidecar
+ image: registry.example.com/auth-proxy:1.2.3
+ args:
+ - --upstream
+ - http://127.0.0.1:4000
+ asserts:
+ - lengthEqual:
+ path: spec.template.spec.containers
+ count: 2
+ - equal:
+ path: spec.template.spec.containers[0].name
+ value: gateway
+ - equal:
+ path: spec.template.spec.containers[1]
+ value:
+ name: auth-sidecar
+ image: registry.example.com/auth-proxy:1.2.3
+ args:
+ - --upstream
+ - http://127.0.0.1:4000
+
+ - it: gateway templates chart context inside extraContainers
+ template: gateway/deployment.yaml
+ set:
+ gateway.extraContainers:
+ - name: auth-sidecar
+ image: registry.example.com/auth-proxy:1.2.3
+ env:
+ - name: RELEASE
+ value: "{{ .Release.Name }}"
+ asserts:
+ - equal:
+ path: spec.template.spec.containers[1].env[0].value
+ value: RELEASE-NAME
+
+ - it: backend renders every hardening knob in the right scope
+ template: backend/deployment.yaml
+ set:
+ backend.podLabels:
+ egress-policy: restricted
+ backend.podSecurityContext:
+ runAsNonRoot: true
+ backend.securityContext:
+ readOnlyRootFilesystem: true
+ backend.lifecycle:
+ preStop:
+ exec:
+ command:
+ - sleep
+ - "5"
+ backend.terminationGracePeriodSeconds: 60
+ backend.extraContainers:
+ - name: auth-sidecar
+ image: registry.example.com/auth-proxy:1.2.3
+ asserts:
+ - equal:
+ path: spec.template.metadata.labels['egress-policy']
+ value: restricted
+ - equal:
+ path: spec.template.spec.securityContext
+ value:
+ runAsNonRoot: true
+ - equal:
+ path: spec.template.spec.containers[0].securityContext
+ value:
+ readOnlyRootFilesystem: true
+ - equal:
+ path: spec.template.spec.containers[0].lifecycle
+ value:
+ preStop:
+ exec:
+ command:
+ - sleep
+ - "5"
+ - equal:
+ path: spec.template.spec.terminationGracePeriodSeconds
+ value: 60
+ - equal:
+ path: spec.template.spec.containers[1].name
+ value: auth-sidecar
+
+ - it: ui renders every hardening knob in the right scope
+ template: ui/deployment.yaml
+ set:
+ ui.podLabels:
+ egress-policy: restricted
+ ui.podSecurityContext:
+ runAsNonRoot: true
+ fsGroup: 101
+ ui.securityContext:
+ readOnlyRootFilesystem: true
+ ui.lifecycle:
+ preStop:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - nginx -s quit
+ ui.terminationGracePeriodSeconds: 30
+ ui.extraContainers:
+ - name: auth-sidecar
+ image: registry.example.com/auth-proxy:1.2.3
+ asserts:
+ - equal:
+ path: spec.template.metadata.labels['egress-policy']
+ value: restricted
+ - equal:
+ path: spec.template.spec.securityContext
+ value:
+ runAsNonRoot: true
+ fsGroup: 101
+ - equal:
+ path: spec.template.spec.containers[0].securityContext
+ value:
+ readOnlyRootFilesystem: true
+ - equal:
+ path: spec.template.spec.containers[0].lifecycle
+ value:
+ preStop:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - nginx -s quit
+ - equal:
+ path: spec.template.spec.terminationGracePeriodSeconds
+ value: 30
+ - equal:
+ path: spec.template.spec.containers[1].name
+ value: auth-sidecar
+
+ - it: backend and ui render no hardening fields by default
+ templates:
+ - backend/deployment.yaml
+ - ui/deployment.yaml
+ asserts:
+ - isNull:
+ path: spec.template.spec.securityContext
+ - isNull:
+ path: spec.template.spec.containers[0].securityContext
+ - isNull:
+ path: spec.template.spec.containers[0].lifecycle
+ - isNull:
+ path: spec.template.spec.terminationGracePeriodSeconds
+ - lengthEqual:
+ path: spec.template.spec.containers
+ count: 1
diff --git a/helm/litellm/values.yaml b/helm/litellm/values.yaml
index 461935b2f50..48e55a6805b 100644
--- a/helm/litellm/values.yaml
+++ b/helm/litellm/values.yaml
@@ -57,6 +57,42 @@ migrationJob:
backoffLimit: 4
ttlSecondsAfterFinished: 120
resources: {}
+ # ServiceAccount for the Job pod only.
+ #
+ # The Job is a pre-install / pre-upgrade hook, so it runs before the chart's
+ # ordinary resources exist. With `serviceAccounts.backend.create: true` the
+ # backend ServiceAccount is one of those ordinary resources, so a Job that
+ # borrowed its name would reference an account that does not exist yet and
+ # the first install would fail with a forbidden pod creation. The name set
+ # here always wins; when it is empty the Job falls back to `default` if the
+ # chart creates the backend ServiceAccount, and to the backend
+ # ServiceAccount name otherwise (that name is either an existing account you
+ # supplied or `default`).
+ #
+ # Point this at a pre-existing ServiceAccount when the Job needs credentials
+ # of its own, e.g. the IRSA / Workload Identity annotations that
+ # `database.writer.useIAMAuth` relies on. That is also the upgrade path to
+ # watch: a release already running with `serviceAccounts.backend.create:
+ # true` used to hand the Job the created backend account on every upgrade,
+ # and now hands it `default` unless you name an account here.
+ serviceAccountName: ""
+ # The Job runs `prisma migrate deploy` against Postgres and never calls the
+ # K8s API, so it defaults to no projected ServiceAccount token, the same
+ # reasoning the ui SA above uses. Flip to true if your Job genuinely needs
+ # one; IAM database auth does not, since EKS Pod Identity injects its own
+ # projected token volume and GKE Workload Identity goes through the
+ # metadata server, neither of which is the default token mount.
+ automountServiceAccountToken: false
+ # Standard k8s pod-level and container-level securityContext for the Job
+ # pod. Same shape as gateway.podSecurityContext / gateway.securityContext.
+ podSecurityContext: {}
+ securityContext: {}
+ # Extra pod labels on the Job pod, merged into the chart's common labels.
+ podLabels: {}
+ # Additional volumes on the Job pod and volumeMounts on its container, e.g.
+ # the writable scratch space a read-only root filesystem needs.
+ volumes: []
+ volumeMounts: []
image:
repository: ghcr.io/berriai/litellm-migrations
tag: "" # defaults to .Chart.AppVersion
@@ -200,6 +236,37 @@ gateway:
minAvailable: ""
maxUnavailable: ""
podAnnotations: {}
+ # Extra pod labels, merged into the chart's selector labels. Do not
+ # re-declare `app.kubernetes.io/name` / `instance` / `component` here: they
+ # form the Deployment's immutable selector.
+ podLabels: {}
+ # Pod-level securityContext, applied to every container in the pod
+ # (runAsNonRoot, runAsUser, fsGroup, seccompProfile, ...). Empty by default
+ # so the cluster's own defaults keep applying to existing installs; clusters
+ # enforcing a restricted Pod Security Standard usually want at least
+ # `runAsNonRoot: true` and `seccompProfile.type: RuntimeDefault`.
+ podSecurityContext: {}
+ # Container-level securityContext for the gateway container. Empty by
+ # default for the same reason. Example:
+ # allowPrivilegeEscalation: false
+ # readOnlyRootFilesystem: true
+ # capabilities:
+ # drop:
+ # - ALL
+ # `readOnlyRootFilesystem: true` needs writable scratch space; supply it
+ # through `volumes` / `volumeMounts` above rather than expecting the chart
+ # to guess the paths your workload writes to.
+ securityContext: {}
+ # Extra sidecar containers appended to the gateway pod, e.g. an auth or
+ # egress proxy. Rendered through `tpl`, so entries may reference chart
+ # values and release metadata.
+ extraContainers: []
+ # Container lifecycle hooks (postStart / preStop) for the gateway container.
+ lifecycle: {}
+ # Grace period the kubelet allows between SIGTERM and SIGKILL. Leave empty
+ # to inherit the Kubernetes default of 30s. Set it a few seconds above the
+ # proxy's GRACEFUL_SHUTDOWN_TIMEOUT when you use a draining preStop hook.
+ terminationGracePeriodSeconds: ""
nodeSelector: {}
tolerations: []
affinity: {}
@@ -257,6 +324,13 @@ backend:
minAvailable: ""
maxUnavailable: ""
podAnnotations: {}
+ # Same shape as the gateway blocks of the same name.
+ podLabels: {}
+ podSecurityContext: {}
+ securityContext: {}
+ extraContainers: []
+ lifecycle: {}
+ terminationGracePeriodSeconds: ""
nodeSelector: {}
tolerations: []
affinity: {}
@@ -310,6 +384,16 @@ ui:
minAvailable: ""
maxUnavailable: ""
podAnnotations: {}
+ # Same shape as the gateway blocks of the same name. The nginx runtime
+ # writes its pid, cache, and proxy temp files under the image's root
+ # filesystem, so `securityContext.readOnlyRootFilesystem: true` here needs
+ # emptyDir volumes mounted over those paths.
+ podLabels: {}
+ podSecurityContext: {}
+ securityContext: {}
+ extraContainers: []
+ lifecycle: {}
+ terminationGracePeriodSeconds: ""
nodeSelector: {}
tolerations: []
affinity: {}
diff --git a/litellm/__init__.py b/litellm/__init__.py
index 3f8c742c5a2..a9a78846fa1 100644
--- a/litellm/__init__.py
+++ b/litellm/__init__.py
@@ -449,6 +449,8 @@ enable_end_user_cost_tracking_prometheus_only: Optional[bool] = None
custom_prometheus_metadata_labels: List[str] = []
custom_prometheus_tags: List[str] = []
prometheus_metrics_config: Optional[List] = None
+prometheus_exclude_metrics: Optional[List[str]] = None
+prometheus_exclude_labels: Optional[List[str]] = None
prometheus_emit_stream_label: bool = False
# Opt-in: emit `rate_limit_category` and `rate_limit_type` labels on
# `litellm_proxy_failed_requests_metric`. Off by default to preserve the
diff --git a/litellm/constants.py b/litellm/constants.py
index 78bfc6501e8..45a350bc862 100644
--- a/litellm/constants.py
+++ b/litellm/constants.py
@@ -357,6 +357,15 @@ NON_LLM_CONNECTION_TIMEOUT = int(
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", 2048))
BEDROCK_MAX_POLICY_SIZE = int(os.getenv("BEDROCK_MAX_POLICY_SIZE", 75))
+# One entry per distinct AWS credential-argument set. Per-user cost attribution passes the attributed
+# identity as aws_session_name, so this bounds how many attributed identities keep a cached STS session.
+BEDROCK_IAM_CACHE_MAX_ENTRIES = 1000
+# Single-flight lock stripes over that cache. Only keys landing on the same stripe wait for each
+# other, so a burst of distinct identities still resolves its credentials in parallel.
+BEDROCK_IAM_CACHE_FETCH_LOCK_STRIPES = 64
+# Retire a cached STS credential this many seconds before AWS expires it, so a request that reads it
+# still has a usable credential for the whole call.
+STS_CREDENTIAL_EXPIRY_SAFETY_MARGIN_SECONDS = 60
BEDROCK_MIN_THINKING_BUDGET_TOKENS = int(os.getenv("BEDROCK_MIN_THINKING_BUDGET_TOKENS", 1024))
# Anthropic's Messages API rejects thinking.budget_tokens < 1024.
ANTHROPIC_MIN_THINKING_BUDGET_TOKENS = 1024
@@ -1461,6 +1470,7 @@ SPEND_LOG_CLEANUP_BATCH_FAILURE_BACKOFF_SECONDS = float(
TOOL_SPEND_TOP_TOOLS = 100
SPEND_LOG_PARTITION_INTERVAL = os.getenv("SPEND_LOG_PARTITION_INTERVAL", "day")
SPEND_LOG_PARTITION_PRECREATE_AHEAD = int(os.getenv("SPEND_LOG_PARTITION_PRECREATE_AHEAD", 7))
+SPEND_LOG_WRITE_BATCH_MAX_BYTES = max(1, int(os.getenv("SPEND_LOG_WRITE_BATCH_MAX_BYTES", 2_000_000)))
SPEND_LOG_QUEUE_SIZE_THRESHOLD = int(os.getenv("SPEND_LOG_QUEUE_SIZE_THRESHOLD", 100))
SPEND_LOG_QUEUE_POLL_INTERVAL = float(os.getenv("SPEND_LOG_QUEUE_POLL_INTERVAL", 2.0))
SPEND_COUNTER_RESEED_LOCKS_MAX_SIZE = int(os.getenv("SPEND_COUNTER_RESEED_LOCKS_MAX_SIZE", 10000))
diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py
index 41a4d026fe1..1bc7308f7df 100644
--- a/litellm/integrations/prometheus.py
+++ b/litellm/integrations/prometheus.py
@@ -64,11 +64,48 @@ from litellm.types.utils import (
if TYPE_CHECKING:
from apscheduler.schedulers.asyncio import AsyncIOScheduler
+ from prometheus_client.metrics import MetricWrapperBase
else:
AsyncIOScheduler = Any
_DEFAULT_BUDGET_METRICS_PER_REQUEST_TIMEOUT = 5.0
+_NON_ENUM_METRIC_LABELS: frozenset[str] = frozenset(
+ (
+ "guardrail_name",
+ "status",
+ "error_type",
+ "hook_type",
+ "purpose",
+ "file_type",
+ "result",
+ )
+)
+
+
+class _ExcludedLabelMetric:
+ """Proxies a prometheus metric whose declared ``labelnames`` had globally
+ excluded labels removed, dropping those labels from every ``labels(...)``
+ call so the emitted arguments always match the metric's real label set."""
+
+ def __init__(
+ self,
+ metric: MetricWrapperBase,
+ original_labelnames: tuple[str, ...],
+ excluded_labels: frozenset[str],
+ ) -> None:
+ self._metric = metric
+ self._original_labelnames = original_labelnames
+ self._excluded_labels = excluded_labels
+
+ def labels(self, *labelvalues: str, **labelkwargs: str) -> MetricWrapperBase:
+ values = labelvalues or tuple(labelkwargs[name] for name in self._original_labelnames)
+ kept_values = tuple(
+ value for name, value in zip(self._original_labelnames, values) if name not in self._excluded_labels
+ )
+ return self._metric.labels(*kept_values) if kept_values else self._metric
+
+
# Tiers a caller may name in a request, across the providers that accept the
# parameter: OpenAI ("auto", "default", "flex", "priority", "scale"), Bedrock and
# Groq (subsets of those), Anthropic ("auto", "standard_only") and Vertex, which
@@ -122,6 +159,8 @@ class PrometheusLogger(CustomLogger):
# Always initialize label_filters, even for non-premium users
self.label_filters = self._parse_prometheus_config()
+ self.exclude_metrics, self.exclude_labels = self._parse_exclude_config()
+
# Cache resolved label sets per metric. Several entries in
# ``PrometheusMetricLabels.get_labels`` read module-level toggles
# (e.g. ``litellm.prometheus_emit_stream_label``,
@@ -696,6 +735,44 @@ class PrometheusLogger(CustomLogger):
self._pretty_print_prometheus_config(label_filters)
return label_filters
+ def _parse_exclude_config(self) -> tuple[frozenset[str], frozenset[str]]:
+ """Parse and validate the global ``exclude_metrics`` / ``exclude_labels`` settings."""
+ from typing import get_args
+
+ import litellm
+
+ exclude_metrics = frozenset(litellm.prometheus_exclude_metrics or ())
+ exclude_labels = frozenset(litellm.prometheus_exclude_labels or ())
+
+ valid_metrics = frozenset(get_args(DEFINED_PROMETHEUS_METRICS))
+ invalid_metrics = sorted(exclude_metrics - valid_metrics)
+
+ valid_labels = self._all_defined_labels()
+ invalid_labels = sorted(exclude_labels - valid_labels)
+
+ errors = (
+ *(f"Invalid metric name in prometheus_exclude_metrics: {metric}" for metric in invalid_metrics),
+ *(f"Invalid label name in prometheus_exclude_labels: {label}" for label in invalid_labels),
+ )
+ if errors:
+ raise ValueError("Prometheus exclude configuration validation failed:\n" + "\n".join(errors))
+
+ return exclude_metrics, exclude_labels
+
+ @staticmethod
+ def _all_defined_labels() -> frozenset[str]:
+ """Every label a metric can emit: enum labels, hard-coded labels, and configured custom labels / tags."""
+ import litellm
+
+ builtin_labels = frozenset(label.value for label in UserAPIKeyLabelNames)
+ custom_metadata_labels = frozenset(
+ _sanitize_prometheus_label_name(label) for label in litellm.custom_prometheus_metadata_labels
+ )
+ custom_tag_labels = frozenset(
+ _sanitize_prometheus_label_name(f"tag_{tag}") for tag in litellm.custom_prometheus_tags
+ )
+ return builtin_labels | _NON_ENUM_METRIC_LABELS | custom_metadata_labels | custom_tag_labels
+
def _validate_all_configurations(self, parsed_configs: List) -> ValidationResults:
"""Validate all metric configurations and return collected errors"""
metric_errors = []
@@ -1015,6 +1092,9 @@ class PrometheusLogger(CustomLogger):
def _is_metric_enabled(self, metric_name: str) -> bool:
"""Check if a metric is enabled based on configuration"""
+ if metric_name in self.exclude_metrics:
+ return False
+
# If no specific configuration is provided, enable all metrics (default behavior)
if not hasattr(self, "enabled_metrics"):
return True
@@ -1032,11 +1112,18 @@ class PrometheusLogger(CustomLogger):
# Extract metric name from the first argument or 'name' keyword argument
metric_name = args[0] if args else kwargs.get("name", "")
- if self._is_metric_enabled(metric_name):
- return metric_class(*args, **kwargs)
- else:
+ if not self._is_metric_enabled(metric_name):
return NoOpMetric()
+ original_labelnames = tuple(kwargs.get("labelnames") or ())
+ if not (frozenset(original_labelnames) & self.exclude_labels):
+ return metric_class(*args, **kwargs)
+
+ kept = tuple(name for name in original_labelnames if name not in self.exclude_labels)
+ kept_kwargs = {**kwargs, "labelnames": kept} # mutable-ok: ** needs a mapping to override labelnames
+ real_metric = metric_class(*args, **kept_kwargs)
+ return _ExcludedLabelMetric(real_metric, original_labelnames, self.exclude_labels)
+
return factory
def get_labels_for_metric(self, metric_name: DEFINED_PROMETHEUS_METRICS) -> List[str]:
@@ -1059,19 +1146,15 @@ class PrometheusLogger(CustomLogger):
# Get default labels for this metric from PrometheusMetricLabels
default_labels = PrometheusMetricLabels.get_labels(metric_name)
- # If no label filtering is configured for this metric, use default labels
- if metric_name not in self.label_filters:
- self._cached_metric_labels[metric_name] = default_labels
- return default_labels
+ resolved_labels = [
+ label
+ for label in default_labels
+ if label not in self.exclude_labels
+ and (metric_name not in self.label_filters or label in self.label_filters[metric_name])
+ ]
- # Get configured labels for this metric
- configured_labels = self.label_filters[metric_name]
-
- # Return intersection of configured and default labels to ensure we only use valid labels
- filtered_labels = [label for label in default_labels if label in configured_labels]
-
- self._cached_metric_labels[metric_name] = filtered_labels
- return filtered_labels
+ self._cached_metric_labels[metric_name] = resolved_labels
+ return resolved_labels
@staticmethod
def _guardrail_is_additive(info: StandardLoggingGuardrailInformation) -> bool:
diff --git a/litellm/integrations/websearch_interception/handler.py b/litellm/integrations/websearch_interception/handler.py
index 21d990e8e60..531caf273f1 100644
--- a/litellm/integrations/websearch_interception/handler.py
+++ b/litellm/integrations/websearch_interception/handler.py
@@ -9,7 +9,8 @@ server-side using litellm router's search tools.
import asyncio
import math
import uuid
-from typing import Any, Dict, List, Optional, Tuple, Union, cast
+from collections.abc import AsyncIterator, Mapping
+from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast
import litellm
from litellm._logging import verbose_logger
@@ -29,19 +30,31 @@ from litellm.integrations.websearch_interception.transformation import (
WebSearchTransformation,
)
from litellm.llms.base_llm.search.transformation import SearchResponse
-from litellm.types.integrations.websearch_interception import (
- WebSearchInterceptionConfig,
-)
from litellm.types.integrations.custom_logger import (
CHAT_COMPLETION_AGENTIC_SURFACE,
RESPONSES_AGENTIC_SURFACE,
AgenticLoopPlan,
AgenticLoopRequestPatch,
)
+from litellm.types.integrations.websearch_interception import (
+ WebSearchInterceptionConfig,
+)
from litellm.types.llms.openai import AllMessageValues
from litellm.types.utils import CallTypes, LlmProviders
from litellm.utils import ProviderConfigManager
+if TYPE_CHECKING:
+ from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
+ from litellm.llms.base_llm.anthropic_messages.transformation import (
+ BaseAnthropicMessagesConfig,
+ )
+ from litellm.proxy._types import UserAPIKeyAuth
+ from litellm.types.llms.anthropic_messages.anthropic_response import (
+ AnthropicMessagesResponse,
+ )
+ from litellm.types.utils import ModelResponse
+ from litellm.utils import CustomStreamWrapper
+
# Key used to flag, on per-request kwargs, that the originating client sent
# an Anthropic-native ``web_search_*`` tool — meaning the final response
# should include ``web_search_tool_result`` content blocks so the client
@@ -94,8 +107,8 @@ class WebSearchInterceptionLogger(CustomLogger):
messages: List[Dict],
tools: Optional[List[Dict]],
custom_llm_provider: Optional[str],
- kwargs: Optional[dict[str, Any]] = None,
- ) -> Optional[Dict[str, Any]]:
+ kwargs: Mapping[str, object] | None = None,
+ ) -> dict[str, object] | None:
"""
Short-circuit web-search-only requests by executing the search directly.
@@ -188,7 +201,7 @@ class WebSearchInterceptionLogger(CustomLogger):
verbose_logger.error(f"WebSearchInterception: Short-circuit search failed: {e}")
search_result_text, structured = f"Search failed: {e}", None
- content: List[Dict[str, Any]] = []
+ content: list[dict[str, object]] = []
if native_tool is not None:
tool_use_id = f"srvtoolu_{uuid.uuid4().hex}"
tool_name = native_tool.get("name") or "web_search"
@@ -210,7 +223,7 @@ class WebSearchInterceptionLogger(CustomLogger):
# github_copilot, etc.) see the same payload they always have.
content.append({"type": "text", "text": search_result_text})
- response: Dict[str, Any] = {
+ response: dict[str, object] = {
"id": f"msg_{str(uuid.uuid4())}",
"type": "message",
"role": "assistant",
@@ -228,7 +241,9 @@ class WebSearchInterceptionLogger(CustomLogger):
)
return response
- async def async_pre_call_deployment_hook(self, kwargs: Dict[str, Any], call_type: Optional[Any]) -> Optional[dict]:
+ async def async_pre_call_deployment_hook(
+ self, kwargs: Dict[str, Any], call_type: Optional[CallTypes]
+ ) -> Optional[dict]:
"""
Pre-call hook to convert native Anthropic web_search tools to regular tools.
@@ -297,7 +312,7 @@ class WebSearchInterceptionLogger(CustomLogger):
return kwargs
- def _convert_responses_tools(self, kwargs: dict[str, Any], tools: list[dict[str, Any]]) -> dict | None:
+ def _convert_responses_tools(self, kwargs: Mapping[str, object], tools: list[dict[str, object]]) -> dict | None:
"""Convert Responses API web search tools to the LiteLLM standard function tool."""
if not any(is_web_search_tool_responses(tool) for tool in tools):
return None
@@ -370,7 +385,7 @@ class WebSearchInterceptionLogger(CustomLogger):
return tool.get("name")
@classmethod
- def _sync_forced_tool_choice(cls, tool_choice: Any, converted_tools: list[dict[str, Any]]) -> Any:
+ def _sync_forced_tool_choice(cls, tool_choice: Any, converted_tools: list[dict[str, object]]) -> object:
"""Repoint a forced ``tool_choice`` at ``litellm_web_search`` when it
names a web-search tool that was just converted away.
@@ -468,7 +483,7 @@ class WebSearchInterceptionLogger(CustomLogger):
async def async_should_run_agentic_loop(
self,
- response: Any,
+ response: object,
model: str,
messages: List[Dict],
tools: Optional[List[Dict]],
@@ -578,7 +593,7 @@ class WebSearchInterceptionLogger(CustomLogger):
async def async_should_run_chat_completion_agentic_loop(
self,
- response: Any,
+ response: object,
model: str,
messages: List[Dict],
tools: Optional[List[Dict]],
@@ -636,7 +651,7 @@ class WebSearchInterceptionLogger(CustomLogger):
async def async_should_run_responses_agentic_loop(
self,
- response: Any,
+ response: object,
model: str,
messages: list[dict],
tools: list[dict] | None,
@@ -687,13 +702,13 @@ class WebSearchInterceptionLogger(CustomLogger):
tools: Dict,
model: str,
messages: List[Dict],
- response: Any,
- anthropic_messages_provider_config: Any,
+ response: object,
+ anthropic_messages_provider_config: "BaseAnthropicMessagesConfig | None",
anthropic_messages_optional_request_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: Dict,
- ) -> Any:
+ ) -> "AnthropicMessagesResponse | AsyncIterator[object]":
"""
Execute agentic loop with WebSearch execution for Anthropic Messages API.
@@ -721,10 +736,10 @@ class WebSearchInterceptionLogger(CustomLogger):
tools: Dict,
model: str,
messages: List[Dict],
- response: Any,
- anthropic_messages_provider_config: Any,
+ response: object,
+ anthropic_messages_provider_config: "BaseAnthropicMessagesConfig | None",
anthropic_messages_optional_request_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: Dict,
) -> AgenticLoopPlan:
@@ -764,7 +779,7 @@ class WebSearchInterceptionLogger(CustomLogger):
kwargs=kwargs,
)
- metadata: Dict[str, Any] = {
+ metadata: dict[str, object] = {
"tool_type": "websearch",
"response_format": "anthropic",
}
@@ -787,10 +802,10 @@ class WebSearchInterceptionLogger(CustomLogger):
async def async_post_agentic_loop_response_hook(
self,
- response: Any,
+ response: object,
plan: AgenticLoopPlan,
kwargs: Dict,
- ) -> Any:
+ ) -> object:
"""
Inject Anthropic-native ``web_search_tool_result`` blocks into the
final response when the originating client used a native
@@ -810,9 +825,9 @@ class WebSearchInterceptionLogger(CustomLogger):
def _build_native_result_blocks(
tool_calls: List[Dict],
structured_results: List[Optional[SearchResponse]],
- ) -> List[Dict[str, Any]]:
+ ) -> list[dict[str, object]]:
"""Build one ``web_search_tool_result`` block per tool_call."""
- blocks: List[Dict[str, Any]] = []
+ blocks: list[dict[str, object]] = []
for i, tool_call in enumerate(tool_calls):
tool_use_id = tool_call.get("id") or ""
structured = structured_results[i] if i < len(structured_results) else None
@@ -825,7 +840,7 @@ class WebSearchInterceptionLogger(CustomLogger):
return blocks
@staticmethod
- def _inject_native_blocks(response: Any, native_blocks: List[Dict[str, Any]]) -> Any:
+ def _inject_native_blocks(response: Any, native_blocks: list[dict[str, object]]) -> Any:
"""Prepend native blocks to response content, dict or object form."""
if not native_blocks:
return response
@@ -849,12 +864,12 @@ class WebSearchInterceptionLogger(CustomLogger):
tools: Dict,
model: str,
messages: List[Dict],
- response: Any,
+ response: object,
optional_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: Dict,
- ) -> Any:
+ ) -> "ModelResponse | CustomStreamWrapper":
"""
Execute agentic loop with WebSearch execution for Chat Completions API.
@@ -884,9 +899,9 @@ class WebSearchInterceptionLogger(CustomLogger):
tools: Dict,
model: str,
messages: List[Dict],
- response: Any,
+ response: object,
optional_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: Dict,
) -> AgenticLoopPlan:
@@ -911,9 +926,9 @@ class WebSearchInterceptionLogger(CustomLogger):
tools: dict,
model: str,
messages: list[dict],
- response: Any,
+ response: object,
optional_params: dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: dict,
) -> AgenticLoopPlan:
@@ -1023,7 +1038,7 @@ class WebSearchInterceptionLogger(CustomLogger):
return []
@staticmethod
- def _extract_search_text(result: Any) -> str:
+ def _extract_search_text(result: object) -> str:
if isinstance(result, Exception):
verbose_logger.error(f"WebSearchInterception: Responses search failed with error: {str(result)}")
return f"Search failed: {str(result)}"
@@ -1091,10 +1106,10 @@ class WebSearchInterceptionLogger(CustomLogger):
tool_calls: List[Dict],
thinking_blocks: List[Dict],
anthropic_messages_optional_request_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: Dict,
- ) -> Any:
+ ) -> "AnthropicMessagesResponse | AsyncIterator[object]":
"""Legacy path: execute search + build patch + run follow-up call."""
request_patch, structured_results = await self._build_anthropic_request_patch(
model=model,
@@ -1118,7 +1133,7 @@ class WebSearchInterceptionLogger(CustomLogger):
if max_tokens is None:
max_tokens = cast(int, kwargs.get("max_tokens", 1024))
- response = await anthropic_messages.acreate(
+ response: AnthropicMessagesResponse | AsyncIterator[object] = await anthropic_messages.acreate(
max_tokens=max_tokens,
messages=request_patch.messages,
model=request_patch.model or model,
@@ -1145,7 +1160,7 @@ class WebSearchInterceptionLogger(CustomLogger):
tool_calls: List[Dict],
thinking_blocks: List[Dict],
anthropic_messages_optional_request_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
kwargs: Dict,
) -> Tuple[AgenticLoopRequestPatch, List[Optional[SearchResponse]]]:
"""
@@ -1238,7 +1253,7 @@ class WebSearchInterceptionLogger(CustomLogger):
return patch, structured_results
async def _execute_search(
- self, query: str, kwargs: Optional[dict[str, Any]] = None
+ self, query: str, kwargs: Mapping[str, object] | None = None
) -> Tuple[str, Optional[SearchResponse]]:
"""
Execute a single web search using router's search tools.
@@ -1300,8 +1315,8 @@ class WebSearchInterceptionLogger(CustomLogger):
async def _authorize_search_tool(
self,
- search_tool: dict[str, Any],
- kwargs: Optional[dict[str, Any]],
+ search_tool: Mapping[str, object],
+ kwargs: Mapping[str, object] | None,
) -> None:
search_tool_name = search_tool.get("search_tool_name")
if not isinstance(search_tool_name, str) or not search_tool_name:
@@ -1343,7 +1358,7 @@ class WebSearchInterceptionLogger(CustomLogger):
)
@staticmethod
- def _get_user_api_key_auth_from_kwargs(kwargs: Optional[dict[str, Any]]) -> Any:
+ def _get_user_api_key_auth_from_kwargs(kwargs: Mapping[str, object] | None) -> "UserAPIKeyAuth | None":
if not kwargs:
return None
@@ -1363,7 +1378,7 @@ class WebSearchInterceptionLogger(CustomLogger):
return None
- def _select_search_tool_from_router(self, llm_router: Any) -> Optional[dict[str, Any]]:
+ def _select_search_tool_from_router(self, llm_router: object) -> Optional[dict[str, Any]]:
if llm_router is None or not hasattr(llm_router, "search_tools"):
return None
search_tools = list(getattr(llm_router, "search_tools") or [])
@@ -1405,11 +1420,11 @@ class WebSearchInterceptionLogger(CustomLogger):
messages: List[Dict],
tool_calls: List[Dict],
optional_params: Dict,
- logging_obj: Any,
+ logging_obj: "LiteLLMLoggingObj | None",
stream: bool,
kwargs: Dict,
response_format: str = "openai",
- ) -> Any:
+ ) -> "ModelResponse | CustomStreamWrapper":
"""Legacy path: execute search + build patch + run follow-up call."""
request_patch = await self._build_chat_completion_request_patch(
model=model,
diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py
index 60dbf7c644a..0ac22b5bb1e 100644
--- a/litellm/litellm_core_utils/streaming_handler.py
+++ b/litellm/litellm_core_utils/streaming_handler.py
@@ -131,8 +131,8 @@ class CustomStreamWrapper:
self.sent_last_chunk = False
self._stream_created_time: float = time.time()
- litellm_params: GenericLiteLLMParams = GenericLiteLLMParams(
- **self.logging_obj.model_call_details.get("litellm_params", {})
+ litellm_params: GenericLiteLLMParams = GenericLiteLLMParams.model_validate(
+ dict(**self.logging_obj.model_call_details.get("litellm_params", {}))
)
self.merge_reasoning_content_in_choices: bool = litellm_params.merge_reasoning_content_in_choices or False
self.sent_first_thinking_block = False
diff --git a/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py b/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py
index f18a9f41939..c87014ffc1e 100644
--- a/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py
+++ b/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py
@@ -13,7 +13,8 @@ Mirrors Anthropic's native ``compact_20260112`` for non-Anthropic providers:
"""
import re
-from typing import Any, Dict, List, Literal, Optional, Tuple, Union, cast
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple, Union, cast
import litellm
from litellm._logging import verbose_logger
@@ -23,6 +24,18 @@ from litellm.types.llms.anthropic import (
UsageIteration,
)
+if TYPE_CHECKING:
+ from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper
+ from litellm.proxy._types import UserAPIKeyAuth
+ from litellm.router import Router
+ from litellm.types.llms.anthropic import (
+ AllAnthropicToolsValues,
+ AnthopicMessagesAssistantMessageParam,
+ AnthropicMessagesUserMessageParam,
+ )
+ from litellm.types.llms.openai import ChatCompletionToolParam
+ from litellm.types.utils import ModelResponse
+
from ..constants import (
COMPACT_DEFAULT_INSTRUCTIONS,
COMPACT_DEFAULT_TRIGGER_TOKENS,
@@ -98,9 +111,9 @@ def _read_summary_max_tokens_setting() -> int:
async def _check_summary_model_access(
- user_api_key_auth: Any,
+ user_api_key_auth: Optional["UserAPIKeyAuth"],
summary_model: str,
- llm_router: Any,
+ llm_router: Optional["Router"],
) -> bool:
"""Return True when every model-allowlist scope on the parent request is
satisfied for ``summary_model``.
@@ -294,7 +307,7 @@ async def _check_summary_model_access(
async def _check_summary_model_budget(
- user_api_key_auth: Any,
+ user_api_key_auth: Optional["UserAPIKeyAuth"],
summary_model: str,
) -> bool:
"""Return True when the caller is within their per-model budget for
@@ -357,7 +370,7 @@ async def _check_summary_model_budget(
async def _check_summary_model_rate_limit(
- user_api_key_auth: Any,
+ user_api_key_auth: Optional["UserAPIKeyAuth"],
summary_model: str,
) -> bool:
"""Return True when the caller is within their configured RPM/TPM limits
@@ -433,7 +446,7 @@ async def _check_summary_model_rate_limit(
def _find_latest_compaction_index(
- messages: List[Dict[str, Any]],
+ messages: List[Dict[str, object]],
) -> Tuple[Optional[int], Optional[int]]:
"""Return (message_index, block_index) of the most recent compaction block.
@@ -453,7 +466,7 @@ def _find_latest_compaction_index(
def _slice_around_compaction_block(
messages: List[Dict[str, Any]],
-) -> Tuple[List[Dict[str, Any]], Optional[Dict[str, Any]]]:
+) -> Tuple[List[Dict[str, object]], Optional[Dict[str, object]]]:
"""Apply Anthropic's "drop everything before the compaction block" rule.
Returns ``(sliced_messages_with_compaction_block, compaction_block_dict)``
@@ -468,27 +481,26 @@ def _slice_around_compaction_block(
original_msg = messages[msg_idx]
original_content = original_msg["content"]
- compaction_block = cast(Dict[str, Any], original_content[blk_idx])
+ compaction_block = cast(Dict[str, object], original_content[blk_idx])
# Per Anthropic's contract everything before the compaction block is
# dropped, including earlier blocks within the same assistant message.
sliced_content = list(original_content[blk_idx:])
- sliced_first_msg = {**original_msg, "content": sliced_content}
- sliced_messages: List[Dict[str, Any]] = [sliced_first_msg]
+ sliced_messages: List[Dict[str, object]] = [{**original_msg, "content": sliced_content}]
sliced_messages.extend(messages[msg_idx + 1 :])
return sliced_messages, compaction_block
def _strip_compaction_blocks(
- messages: List[Dict[str, Any]],
-) -> List[Dict[str, Any]]:
+ messages: List[Dict[str, object]],
+) -> List[Dict[str, object]]:
"""Drop any ``compaction`` content blocks from messages.
Used to build the downstream-bound message list — the adapter has no
concept of a compaction block, so it must not see one.
"""
- cleaned: List[Dict[str, Any]] = []
+ cleaned: List[Dict[str, object]] = []
for msg in messages:
content = msg.get("content")
if not isinstance(content, list):
@@ -503,9 +515,9 @@ def _strip_compaction_blocks(
def _augment_system_with_summary(
- system: Optional[Union[str, List[Dict[str, Any]]]],
+ system: Optional[Union[str, List[Dict[str, object]]]],
summary_text: str,
-) -> Union[str, List[Dict[str, Any]]]:
+) -> Union[str, List[Dict[str, object]]]:
"""Prepend a "Previous conversation summary: ..." block to ``system``."""
prefix = f"{COMPACT_SUMMARY_SYSTEM_PREFIX}{summary_text}\n\n"
if system is None:
@@ -522,7 +534,7 @@ def _augment_system_with_summary(
return [{"type": "text", "text": prefix.rstrip()}, *system]
-def _resolve_trigger_tokens(edit_spec: Dict[str, Any]) -> Tuple[int, List[str]]:
+def _resolve_trigger_tokens(edit_spec: Dict[str, object]) -> Tuple[int, List[str]]:
"""Validate and resolve ``trigger.value``.
Raises ``AnthropicContextManagementError`` if the explicitly-supplied value
@@ -556,7 +568,7 @@ def _resolve_trigger_tokens(edit_spec: Dict[str, Any]) -> Tuple[int, List[str]]:
return value, warnings
-def _build_summary_prompt(edit_spec: Dict[str, Any], tools: Optional[List[Dict[str, Any]]]) -> str:
+def _build_summary_prompt(edit_spec: Dict[str, object], tools: Optional[List[Dict[str, object]]]) -> str:
custom = edit_spec.get("instructions")
if isinstance(custom, str) and custom.strip():
return custom
@@ -567,8 +579,8 @@ def _build_summary_prompt(edit_spec: Dict[str, Any], tools: Optional[List[Dict[s
def _propagate_metadata(
- parent_litellm_metadata: Optional[Dict[str, Any]],
-) -> Dict[str, Any]:
+ parent_litellm_metadata: Optional[Mapping[str, object]],
+) -> Dict[str, object]:
"""Extract the parent request's auth/spend-attribution fields for the summary subcall.
The proxy attaches ``user_api_key``, ``user_api_key_team_id`` etc. to
@@ -579,7 +591,7 @@ def _propagate_metadata(
"""
if not parent_litellm_metadata:
return {}
- propagated: Dict[str, Any] = {}
+ propagated: Dict[str, object] = {}
for key in _PROPAGATED_METADATA_KEYS:
if key in parent_litellm_metadata:
propagated[key] = parent_litellm_metadata[key]
@@ -588,10 +600,10 @@ def _propagate_metadata(
def _count_effective_tokens(
model: str,
- effective_messages: List[Dict[str, Any]],
- compaction_block: Optional[Dict[str, Any]],
- tools: Optional[List[Dict[str, Any]]],
- system: Optional[Union[str, List[Dict[str, Any]]]] = None,
+ effective_messages: List[Dict[str, object]],
+ compaction_block: Optional[CompactionBlock],
+ tools: Optional[List[Dict[str, object]]],
+ system: Optional[Union[str, List[Dict[str, object]]]] = None,
) -> int:
"""Token-count the conversation as it will appear downstream.
@@ -609,25 +621,32 @@ def _count_effective_tokens(
messages_without_compaction = _strip_compaction_blocks(effective_messages)
adapter = LiteLLMAnthropicMessagesAdapter()
try:
- openai_shape = adapter.translate_anthropic_messages_to_openai(messages=cast(Any, messages_without_compaction))
+ openai_shape = adapter.translate_anthropic_messages_to_openai(
+ messages=cast(
+ "List[Union[AnthropicMessagesUserMessageParam, AnthopicMessagesAssistantMessageParam]]",
+ messages_without_compaction,
+ )
+ )
except Exception as e:
verbose_logger.debug(
"compact_20260112: anthropic→openai translation failed during token "
"count, falling back to raw messages: %s",
e,
)
- openai_shape = cast(Any, messages_without_compaction)
+ openai_shape = messages_without_compaction
# Translate Anthropic-shaped tools (``input_schema``) to OpenAI-shaped
# tools (``{"type": "function", "function": {...}}``) so ``token_counter``
# gets a consistent format regardless of which counting path it uses.
# An inaccurate tool token count here could cause the polyfill to skip
# needed compaction or trigger unnecessary summarization.
- openai_tools: Optional[List[Dict[str, Any]]] = None
+ openai_tools: Optional[List[Dict[str, object]]] = None
if tools:
try:
- translated_tools, _ = adapter.translate_anthropic_tools_to_openai(tools=cast(Any, tools))
- openai_tools = cast(List[Dict[str, Any]], translated_tools)
+ translated_tools, _ = adapter.translate_anthropic_tools_to_openai(
+ tools=cast("List[AllAnthropicToolsValues]", tools)
+ )
+ openai_tools = cast(List[Dict[str, object]], translated_tools)
except Exception as e:
verbose_logger.debug(
"compact_20260112: anthropic→openai tools translation failed "
@@ -638,8 +657,8 @@ def _count_effective_tokens(
total = litellm.token_counter(
model=model,
- messages=cast(Any, openai_shape),
- tools=cast(Any, openai_tools),
+ messages=cast(List[Dict[str, object]], openai_shape),
+ tools=cast("Optional[List[ChatCompletionToolParam]]", openai_tools),
)
if compaction_block is not None:
content = compaction_block.get("content") or ""
@@ -652,7 +671,7 @@ def _count_effective_tokens(
def _system_to_text(
- system: Optional[Union[str, List[Dict[str, Any]]]],
+ system: Optional[Union[str, List[Dict[str, object]]]],
) -> str:
"""Flatten an Anthropic-style ``system`` value into a single string for
token counting. Returns ``""`` when ``system`` carries no text."""
@@ -670,8 +689,8 @@ def _system_to_text(
def _select_last_user_question(
- messages: List[Dict[str, Any]],
-) -> List[Dict[str, Any]]:
+ messages: List[Dict[str, object]],
+) -> List[Dict[str, object]]:
"""Pick the most recent ``user`` turn that is a real question.
Returns a one-element message list with any ``tool_result`` blocks
@@ -735,10 +754,10 @@ def _system_to_openai_message(
def _build_summary_messages(
- effective_messages: List[Dict[str, Any]],
+ effective_messages: List[Dict[str, object]],
prompt: str,
- system: Optional[Union[str, List[Dict[str, Any]]]] = None,
-) -> List[Dict[str, Any]]:
+ system: Optional[Union[str, List[Dict[str, object]]]] = None,
+) -> List[Dict[str, object]]:
"""Build the OpenAI-shape message list for the summary call.
The caller's ``system`` prompt is prepended (the default summarization
@@ -753,7 +772,10 @@ def _build_summary_messages(
stripped = _strip_compaction_blocks(effective_messages)
try:
openai_messages = LiteLLMAnthropicMessagesAdapter().translate_anthropic_messages_to_openai(
- messages=cast(Any, stripped)
+ messages=cast(
+ "List[Union[AnthropicMessagesUserMessageParam, AnthopicMessagesAssistantMessageParam]]",
+ stripped,
+ )
)
except Exception as e:
verbose_logger.warning(
@@ -761,9 +783,9 @@ def _build_summary_messages(
"building summary call; falling back to raw shape: %s",
e,
)
- openai_messages = cast(Any, stripped)
+ openai_messages = stripped
- summary_messages: List[Dict[str, Any]] = []
+ summary_messages: List[Dict[str, object]] = []
system_message = _system_to_openai_message(system)
if system_message is not None:
summary_messages.append(system_message)
@@ -783,7 +805,7 @@ def _build_summary_messages(
return summary_messages
-def _is_user_message(msg: Any) -> bool:
+def _is_user_message(msg: object) -> bool:
return isinstance(msg, dict) and msg.get("role") == "user"
@@ -805,12 +827,12 @@ def _append_text_to_content(content: Any, extra_text: str) -> Any:
async def _call_summary_model(
*,
summary_model: str,
- summary_messages: List[Dict[str, Any]],
- metadata: Dict[str, Any],
+ summary_messages: List[Dict[str, object]],
+ metadata: Mapping[str, object],
llm_router: Any,
allowed_model_region: Optional[str] = None,
max_tokens: int = COMPACT_SUMMARY_MAX_TOKENS,
-) -> Any:
+) -> Union["ModelResponse", "CustomStreamWrapper"]:
"""Invoke the configured summary model.
Prefers ``llm_router.acompletion`` so the model alias resolves against the
@@ -877,7 +899,7 @@ def _extract_response_text(response: Any) -> Optional[str]:
return None
-def _extract_usage(response: Any) -> Tuple[int, int]:
+def _extract_usage(response: object) -> Tuple[int, int]:
usage = getattr(response, "usage", None)
if usage is None:
return 0, 0
@@ -889,8 +911,8 @@ def _extract_usage(response: Any) -> Tuple[int, int]:
def apply_client_compaction_block_history(
*,
- messages: List[Dict[str, Any]],
- system: Optional[Union[str, List[Dict[str, Any]]]],
+ messages: List[Dict[str, object]],
+ system: Optional[Union[str, List[Dict[str, object]]]],
) -> Optional[PolyfillResult]:
"""Honor client-sent compaction blocks without a ``compact_20260112`` edit.
@@ -911,7 +933,7 @@ def apply_client_compaction_block_history(
)
prior_summary_text = prior_compaction_block.get("content") or ""
- augmented_system: Union[str, List[Dict[str, Any]], None] = system
+ augmented_system: Union[str, List[Dict[str, object]], None] = system
if isinstance(prior_summary_text, str) and prior_summary_text:
augmented_system = _augment_system_with_summary(system, prior_summary_text)
verbose_logger.info(
@@ -936,13 +958,13 @@ def apply_client_compaction_block_history(
async def apply_compact_20260112(
*,
model: str,
- messages: List[Dict[str, Any]],
- tools: Optional[List[Dict[str, Any]]],
- system: Optional[Union[str, List[Dict[str, Any]]]],
- edit_spec: Dict[str, Any],
- litellm_metadata: Optional[Dict[str, Any]] = None,
- llm_router: Any = None,
- user_api_key_auth: Any = None,
+ messages: List[Dict[str, object]],
+ tools: Optional[List[Dict[str, object]]],
+ system: Optional[Union[str, List[Dict[str, object]]]],
+ edit_spec: Dict[str, object],
+ litellm_metadata: Optional[Mapping[str, object]] = None,
+ llm_router: Optional["Router"] = None,
+ user_api_key_auth: Optional["UserAPIKeyAuth"] = None,
) -> PolyfillResult:
"""Apply ``compact_20260112``; return a ``PolyfillResult``.
@@ -971,7 +993,7 @@ async def apply_compact_20260112(
# non-Anthropic backends (which would reject them).
effective_messages, prior_compaction_block = _slice_around_compaction_block(messages)
prior_summary_text = prior_compaction_block.get("content") if prior_compaction_block else None
- augmented_system: Union[str, List[Dict[str, Any]], None] = system
+ augmented_system: Union[str, List[Dict[str, object]], None] = system
if isinstance(prior_summary_text, str) and prior_summary_text:
augmented_system = _augment_system_with_summary(system, prior_summary_text)
verbose_logger.info(
diff --git a/litellm/llms/azure/responses/transformation.py b/litellm/llms/azure/responses/transformation.py
index d0b0dbb070d..1a860cca5a9 100644
--- a/litellm/llms/azure/responses/transformation.py
+++ b/litellm/llms/azure/responses/transformation.py
@@ -66,7 +66,7 @@ class AzureOpenAIResponsesAPIConfig(OpenAIResponsesAPIConfig):
)
# Create ResponseReasoningItem object from the item data
- reasoning_item = ResponseReasoningItem(**item_data)
+ reasoning_item = ResponseReasoningItem.model_validate(item_data)
# Convert back to dict with exclude_none=True to exclude None fields
dict_reasoning_item = reasoning_item.model_dump(exclude_none=True)
@@ -346,4 +346,4 @@ class AzureOpenAIResponsesAPIConfig(OpenAIResponsesAPIConfig):
from litellm.llms.azure.chat.gpt_transformation import AzureOpenAIError
raise AzureOpenAIError(message=raw_response.text, status_code=raw_response.status_code)
- return ResponsesAPIResponse(**raw_response_json)
+ return ResponsesAPIResponse.model_validate(raw_response_json)
diff --git a/litellm/llms/bedrock/base_aws_llm.py b/litellm/llms/bedrock/base_aws_llm.py
index 6b89fb69739..8cb15ad26ed 100644
--- a/litellm/llms/bedrock/base_aws_llm.py
+++ b/litellm/llms/bedrock/base_aws_llm.py
@@ -5,6 +5,7 @@ import os
import re
import urllib.parse
from datetime import datetime
+from threading import Lock
from typing import (
TYPE_CHECKING,
Any,
@@ -24,10 +25,14 @@ from pydantic import BaseModel, ValidationError
from litellm._logging import verbose_logger
from litellm.caching.caching import DualCache
+from litellm.caching.in_memory_cache import InMemoryCache
from litellm.constants import (
BEDROCK_EMBEDDING_PROVIDERS_LITERAL,
+ BEDROCK_IAM_CACHE_FETCH_LOCK_STRIPES,
+ BEDROCK_IAM_CACHE_MAX_ENTRIES,
BEDROCK_INVOKE_PROVIDERS_LITERAL,
BEDROCK_MAX_POLICY_SIZE,
+ STS_CREDENTIAL_EXPIRY_SAFETY_MARGIN_SECONDS,
)
from litellm.litellm_core_utils.dd_tracing import tracer
from litellm.secret_managers.main import get_secret, get_secret_str
@@ -75,14 +80,28 @@ class AwsAuthError(Exception):
class BaseAWSLLM:
# Process-wide IAM credential cache (shared across instances — Bedrock passthrough is per-request).
- # Storage is in-process memory only: default ``DualCache()`` has no Redis backend unless attached
- # elsewhere. Entry TTL: static access-key + secret + region use ``_get_default_ttl_for_boto3_credentials``
- # (~59 minutes); ambient env (``_auth_with_env_vars`` returns ``ttl=None``) uses ``InMemoryCache``'s
- # ``default_ttl`` (600 seconds / 10 minutes); web identity STS credentials use
- # ``_get_default_ttl_for_boto3_credentials`` (~59 minutes), keyed on all aws_* credential args
- # plus ssl_verify. AssumeRole, profiles, and explicit session-token tuples are not cached — see
- # ``get_credentials`` and ``_get_or_set_cached_credentials``.
- _shared_iam_cache: ClassVar[DualCache] = DualCache()
+ # Storage is in-process memory only: no Redis backend unless attached elsewhere. Entry TTL: static
+ # access-key + secret + region use ``_get_default_ttl_for_boto3_credentials`` (~59 minutes); ambient
+ # env (``_auth_with_env_vars`` returns ``ttl=None``) uses ``InMemoryCache``'s ``default_ttl``
+ # (600 seconds / 10 minutes); web identity STS credentials use
+ # ``_get_default_ttl_for_boto3_credentials`` (~59 minutes); AssumeRole STS credentials expire with
+ # the STS session itself (Expiration minus a safety margin). All are keyed on all aws_* credential
+ # args plus ssl_verify, so ``aws_session_name`` scopes an entry to one attributed identity. Profiles
+ # and explicit session-token tuples are not cached — see ``get_credentials`` and
+ # ``_get_or_set_cached_credentials``. The bound is larger than ``InMemoryCache``'s default because
+ # per-user cost attribution puts one entry per attributed identity in this cache.
+ _shared_iam_cache: ClassVar[DualCache] = DualCache(
+ in_memory_cache=InMemoryCache(max_size_in_memory=BEDROCK_IAM_CACHE_MAX_ENTRIES)
+ )
+
+ # Striped single-flight locks over ``_shared_iam_cache``. Concurrent misses on one credential
+ # key would otherwise each issue their own STS call, which is the same thundering herd the cache
+ # exists to prevent, just moved to the miss window. Striping keeps distinct identities from
+ # serialising behind each other without a per-key registry that grows with the identity count.
+ # A cache hit holds its stripe only for the lookup itself.
+ _credential_fetch_locks: ClassVar[tuple[Lock, ...]] = tuple(
+ Lock() for _ in range(BEDROCK_IAM_CACHE_FETCH_LOCK_STRIPES)
+ )
def __init__(self) -> None:
self.iam_cache = BaseAWSLLM._shared_iam_cache
@@ -140,19 +159,21 @@ class BaseAWSLLM:
Used for static access-key credentials, ambient credentials from
``_auth_with_env_vars`` (including when skipping AssumeRole because the runtime identity
- already matches ``aws_role_name``), and web identity STS credentials (plain
- non-refreshable ``Credentials`` cached ~59 min, inside the 3600s STS session).
+ already matches ``aws_role_name``), web identity STS credentials (plain
+ non-refreshable ``Credentials`` cached ~59 min, inside the 3600s STS session), and AssumeRole
+ STS credentials (cached for the lifetime of the STS session minus a safety margin).
- AssumeRole, profiles, and explicit session-token tuples are not
- cached here — shared ``Credentials`` / refresh state must not span logical sessions.
+ Profiles and explicit session-token tuples are not cached here — shared ``Credentials`` /
+ refresh state must not span logical sessions.
"""
cache_key = self.get_cache_key(credential_args)
- _cached = self.iam_cache.get_cache(cache_key)
- if _cached:
- return _cached
- credentials, ttl = credential_fetcher()
- self.iam_cache.set_cache(cache_key, credentials, ttl=ttl)
- return credentials
+ with self._credential_fetch_locks[hash(cache_key) % len(self._credential_fetch_locks)]:
+ _cached = self.iam_cache.get_cache(cache_key)
+ if _cached:
+ return _cached
+ credentials, ttl = credential_fetcher()
+ self.iam_cache.set_cache(cache_key, credentials, ttl=ttl)
+ return credentials
@staticmethod
def _is_auth_with_web_identity_token(
@@ -269,8 +290,8 @@ class BaseAWSLLM:
# Credentials - boto3.Credentials
# cache ttl - Optional[int]. If None, the credentials are not cached. Some auth flows have no expiry time.
#
- # iam_cache: static keys, ambient env (including skip-AssumeRole path), and web identity.
- # Do not cache AssumeRole / profile / explicit session-token paths here.
+ # iam_cache: static keys, ambient env (including skip-AssumeRole path), web identity, and
+ # AssumeRole. Do not cache profile / explicit session-token paths here.
#########################################################
if self._is_auth_with_web_identity_token(
aws_web_identity_token,
@@ -290,30 +311,20 @@ class BaseAWSLLM:
),
)
elif self._is_auth_with_aws_role(aws_role_name):
- # Same role (IRSA/ECS/EC2): ambient creds via _get_or_set_cached_credentials like the
- # default env branch; never pre-read cache (must run _is_already_running_as_role first).
- if self._is_already_running_as_role(cast(str, aws_role_name), ssl_verify=ssl_verify):
- verbose_logger.debug(
- "Already running as target role %s, using ambient credentials",
- aws_role_name,
- )
- return self._get_or_set_cached_credentials(args, self._auth_with_env_vars)
- 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, _assume_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=cast(str, aws_role_name),
- aws_session_name=aws_session_name,
- aws_region_name=aws_region_name,
- aws_sts_endpoint=aws_sts_endpoint,
- aws_external_id=aws_external_id,
- ssl_verify=ssl_verify,
+ return self._get_or_set_cached_credentials(
+ args,
+ lambda: self._resolve_role_credentials(
+ 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=cast(str, aws_role_name),
+ aws_session_name=aws_session_name,
+ aws_region_name=aws_region_name,
+ aws_sts_endpoint=aws_sts_endpoint,
+ aws_external_id=aws_external_id,
+ ssl_verify=ssl_verify,
+ ),
)
- return credentials
elif self._is_auth_with_aws_profile(aws_profile_name):
credentials, _cache_ttl = self._auth_with_aws_profile(cast(str, aws_profile_name))
@@ -1046,7 +1057,11 @@ class BaseAWSLLM:
return sts_client.assume_role(**assume_role_params)
def _extract_credentials_and_ttl(self, sts_response: dict) -> Tuple[Credentials, Optional[int]]:
- """Extract credentials and TTL from STS response."""
+ """Extract credentials and TTL from STS response.
+
+ The TTL carries the same safety margin as the non-IRSA assume path, so a cached entry is
+ never handed out close enough to expiry to die mid-request.
+ """
from botocore.credentials import Credentials
sts_credentials = sts_response["Credentials"]
@@ -1057,10 +1072,52 @@ class BaseAWSLLM:
)
expiration_time = sts_credentials["Expiration"]
- ttl = int((expiration_time - datetime.now(expiration_time.tzinfo)).total_seconds())
+ ttl = int(
+ (expiration_time - datetime.now(expiration_time.tzinfo)).total_seconds()
+ - STS_CREDENTIAL_EXPIRY_SAFETY_MARGIN_SECONDS
+ )
return credentials, ttl
+ def _resolve_role_credentials(
+ self,
+ aws_access_key_id: str | None,
+ aws_secret_access_key: str | None,
+ aws_session_token: str | None,
+ aws_role_name: str,
+ aws_session_name: str | None,
+ aws_region_name: str | None,
+ aws_sts_endpoint: str | None,
+ aws_external_id: str | None,
+ ssl_verify: bool | str | None,
+ ) -> tuple[Credentials, int | None]:
+ """
+ Resolve credentials for a target role, either from the ambient identity or via sts:AssumeRole.
+
+ Both the ``sts:GetCallerIdentity`` probe and the assume itself run here, so a cache hit on the
+ caller's key skips both. ``aws_session_name`` defaults inside this fetcher rather than in
+ ``get_credentials`` so the cache key stays stable when the caller does not supply one.
+ """
+ if self._is_already_running_as_role(aws_role_name, ssl_verify=ssl_verify):
+ verbose_logger.debug(
+ "Already running as target role %s, using ambient credentials",
+ aws_role_name,
+ )
+ return self._auth_with_env_vars()
+
+ verbose_logger.debug("Using role assumption: calling _auth_with_aws_role")
+ return 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 or f"litellm-session-{int(datetime.now().timestamp())}",
+ aws_region_name=aws_region_name,
+ aws_sts_endpoint=aws_sts_endpoint,
+ aws_external_id=aws_external_id,
+ ssl_verify=ssl_verify,
+ )
+
@tracer.wrap()
def _auth_with_aws_role(
self,
@@ -1192,7 +1249,7 @@ class BaseAWSLLM:
sts_expiry = sts_credentials["Expiration"]
# Convert to timezone-aware datetime for comparison
current_time = datetime.now(sts_expiry.tzinfo)
- sts_ttl = (sts_expiry - current_time).total_seconds() - 60
+ sts_ttl = (sts_expiry - current_time).total_seconds() - STS_CREDENTIAL_EXPIRY_SAFETY_MARGIN_SECONDS
return credentials, sts_ttl
@tracer.wrap()
diff --git a/litellm/llms/custom_httpx/llm_http_handler.py b/litellm/llms/custom_httpx/llm_http_handler.py
index ec1301e5923..b64d8e3dc7e 100644
--- a/litellm/llms/custom_httpx/llm_http_handler.py
+++ b/litellm/llms/custom_httpx/llm_http_handler.py
@@ -13,8 +13,10 @@ from typing import (
Iterator,
List,
Literal,
+ Mapping,
Optional,
Tuple,
+ TypeVar,
Union,
cast,
get_type_hints,
@@ -162,7 +164,11 @@ from .http_handler import get_shared_realtime_ssl_context
if TYPE_CHECKING:
from aiohttp import ClientSession
+ from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj
+ from litellm.llms.anthropic.experimental_pass_through.messages.fake_stream_iterator import (
+ FakeAnthropicMessagesStreamIterator,
+ )
from litellm.llms.anthropic.experimental_pass_through.messages.streaming_iterator import (
AnthropicMessagesStreamingResponse,
)
@@ -182,6 +188,8 @@ if TYPE_CHECKING:
else:
LiteLLMLoggingObj = Any
+_ResponseT = TypeVar("_ResponseT")
+
def _google_genai_streaming_hidden_params(
*,
@@ -189,11 +197,11 @@ def _google_genai_streaming_hidden_params(
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
response_headers: httpx.Headers,
-) -> Dict[str, Any]:
+) -> Dict[str, object]:
"""Pre-stream metadata for proxy response headers (mirrors CustomStreamWrapper._hidden_params)."""
from litellm.litellm_core_utils.core_helpers import process_response_headers
- _model_info: Dict[str, Any] = dict(getattr(litellm_params, "model_info", None) or {})
+ _model_info: Mapping[str, object] = dict(getattr(litellm_params, "model_info", None) or {})
_raw_id = _model_info.get("id") or logging_obj.get_router_model_id() or ""
_model_id = _raw_id if isinstance(_raw_id, str) else str(_raw_id)
return {
@@ -210,7 +218,7 @@ def _responses_api_optional_request_param_names() -> frozenset[str]:
return frozenset(get_type_hints(ResponsesAPIOptionalRequestParams).keys())
-def _custom_logger_callbacks(logging_obj: Any) -> list[Any]:
+def _custom_logger_callbacks(logging_obj: LiteLLMLoggingObj) -> list["CustomLogger"]:
from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.litellm_logging import (
get_custom_logger_compatible_class,
@@ -221,7 +229,7 @@ def _custom_logger_callbacks(logging_obj: Any) -> list[Any]:
if isinstance(dynamic_success_callbacks, (list, tuple)):
callbacks.extend(dynamic_success_callbacks)
- custom_loggers: list[Any] = []
+ custom_loggers: list[CustomLogger] = []
for cb in callbacks:
if isinstance(cb, str):
resolved = get_custom_logger_compatible_class(cb) # type: ignore[arg-type]
@@ -233,7 +241,7 @@ def _custom_logger_callbacks(logging_obj: Any) -> list[Any]:
return custom_loggers
-def _has_pre_call_deployment_hook(logging_obj: Any) -> bool:
+def _has_pre_call_deployment_hook(logging_obj: LiteLLMLoggingObj) -> bool:
from litellm.integrations.custom_logger import CustomLogger
base_func = CustomLogger.async_pre_call_deployment_hook
@@ -359,7 +367,7 @@ class BaseLLMHTTPHandler:
messages: list,
optional_params: dict,
litellm_params: dict,
- encoding: Any,
+ encoding: object,
api_key: Optional[str] = None,
client: Optional[AsyncHTTPHandler] = None,
json_mode: bool = False,
@@ -425,7 +433,7 @@ class BaseLLMHTTPHandler:
api_base: Optional[str],
custom_llm_provider: str,
model_response: ModelResponse,
- encoding,
+ encoding: object,
logging_obj: LiteLLMLoggingObj,
optional_params: dict,
timeout: Union[float, httpx.Timeout],
@@ -474,7 +482,7 @@ class BaseLLMHTTPHandler:
litellm_params=litellm_params,
)
- data = provider_config.transform_request(
+ data: Dict[str, object] = provider_config.transform_request(
model=model,
messages=messages,
optional_params=optional_params,
@@ -651,7 +659,7 @@ class BaseLLMHTTPHandler:
fake_stream: bool = False,
client: Optional[HTTPHandler] = None,
json_mode: bool = False,
- ) -> Tuple[Any, dict]:
+ ) -> Tuple[object, dict]:
if client is None or not isinstance(client, HTTPHandler):
sync_httpx_client = _get_httpx_client(
{
@@ -691,7 +699,7 @@ class BaseLLMHTTPHandler:
json_mode=json_mode,
)
- completion_stream: Any = MockResponseIterator(model_response=model_response, json_mode=json_mode)
+ completion_stream: object = MockResponseIterator(model_response=model_response, json_mode=json_mode)
else:
completion_stream = provider_config.get_model_response_iterator(
streaming_response=response.iter_lines(),
@@ -783,7 +791,7 @@ class BaseLLMHTTPHandler:
client: Optional[AsyncHTTPHandler] = None,
json_mode: Optional[bool] = None,
signed_json_body: Optional[bytes] = None,
- ) -> Tuple[Any, httpx.Headers]:
+ ) -> Tuple[object, httpx.Headers]:
"""
Helper function for making an async call with stream.
@@ -827,7 +835,7 @@ class BaseLLMHTTPHandler:
json_mode=json_mode,
)
- completion_stream: Any = MockResponseIterator(model_response=model_response, json_mode=json_mode)
+ completion_stream: object = MockResponseIterator(model_response=model_response, json_mode=json_mode)
else:
completion_stream = provider_config.get_model_response_iterator(
streaming_response=response.aiter_lines(), sync_stream=False
@@ -846,10 +854,10 @@ class BaseLLMHTTPHandler:
def _add_stream_param_to_request_body(
self,
- data: dict,
+ data: Dict[str, object],
provider_config: BaseConfig,
fake_stream: bool,
- ) -> dict:
+ ) -> Dict[str, object]:
"""
Some providers like Bedrock invoke do not support the stream parameter in the request body, we only pass `stream` in the request body the provider supports it.
"""
@@ -1051,7 +1059,7 @@ class BaseLLMHTTPHandler:
timeout: Optional[Union[float, httpx.Timeout]],
model_response: RerankResponse,
_is_async: bool = False,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
api_base: Optional[str] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
@@ -1177,7 +1185,7 @@ class BaseLLMHTTPHandler:
logging_obj: LiteLLMLoggingObj,
api_key: Optional[str],
api_base: Optional[str],
- headers: Optional[Dict[str, Any]],
+ headers: Optional[Dict[str, object]],
provider_config: BaseAudioTranscriptionConfig,
) -> Tuple[dict, str, Union[dict, bytes, None], Optional[dict]]:
"""
@@ -1266,10 +1274,10 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
atranscription: bool = False,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
provider_config: Optional[BaseAudioTranscriptionConfig] = None,
shared_session: Optional["ClientSession"] = None,
- ) -> Union[TranscriptionResponse, Coroutine[Any, Any, TranscriptionResponse]]:
+ ) -> Union[TranscriptionResponse, Coroutine[object, object, TranscriptionResponse]]:
if provider_config is None:
raise ValueError(f"No provider config found for model: {model} and provider: {custom_llm_provider}")
@@ -1351,7 +1359,7 @@ class BaseLLMHTTPHandler:
api_base: Optional[str],
custom_llm_provider: str,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
provider_config: Optional[BaseAudioTranscriptionConfig] = None,
shared_session: Optional["ClientSession"] = None,
) -> TranscriptionResponse:
@@ -1417,7 +1425,7 @@ class BaseLLMHTTPHandler:
logging_obj: LiteLLMLoggingObj,
api_key: Optional[str],
api_base: Optional[str],
- headers: Optional[Dict[str, Any]],
+ headers: Optional[Dict[str, object]],
provider_config: BaseOCRConfig,
litellm_params: dict,
) -> Tuple[Dict[str, Any], str, Dict[str, Any], None]:
@@ -1483,7 +1491,7 @@ class BaseLLMHTTPHandler:
logging_obj: LiteLLMLoggingObj,
api_key: Optional[str],
api_base: Optional[str],
- headers: Optional[Dict[str, Any]],
+ headers: Optional[Dict[str, object]],
provider_config: BaseOCRConfig,
litellm_params: dict,
) -> Tuple[Dict[str, Any], str, Dict[str, Any], None]:
@@ -1567,10 +1575,10 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
aocr: bool = False,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
provider_config: Optional[BaseOCRConfig] = None,
litellm_params: Optional[dict] = None,
- ) -> Union[OCRResponse, Coroutine[Any, Any, OCRResponse]]:
+ ) -> Union[OCRResponse, Coroutine[object, object, OCRResponse]]:
"""
Sync OCR handler.
"""
@@ -1641,7 +1649,7 @@ class BaseLLMHTTPHandler:
api_base: Optional[str],
custom_llm_provider: str,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
provider_config: Optional[BaseOCRConfig] = None,
litellm_params: Optional[dict] = None,
) -> OCRResponse:
@@ -1703,9 +1711,9 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
asearch: bool = False,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
provider_config: Optional[BaseSearchConfig] = None,
- ) -> Union[SearchResponse, Coroutine[Any, Any, SearchResponse]]:
+ ) -> Union[SearchResponse, Coroutine[object, object, SearchResponse]]:
"""
Sync Search handler.
"""
@@ -1798,7 +1806,7 @@ class BaseLLMHTTPHandler:
api_base: Optional[str],
custom_llm_provider: str,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- headers: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, object]] = None,
provider_config: Optional[BaseSearchConfig] = None,
) -> SearchResponse:
"""
@@ -1976,7 +1984,7 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
client: Optional[AsyncHTTPHandler] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
api_base: Optional[str] = None,
stream: Optional[bool] = False,
@@ -2339,10 +2347,10 @@ class BaseLLMHTTPHandler:
api_key: Optional[str] = None,
api_base: Optional[str] = None,
stream: Optional[bool] = False,
- kwargs: Optional[Dict[str, Any]] = None,
+ kwargs: Optional[Dict[str, object]] = None,
) -> Union[
AnthropicMessagesResponse,
- Coroutine[Any, Any, Union[AnthropicMessagesResponse, AsyncIterator]],
+ Coroutine[object, object, Union[AnthropicMessagesResponse, AsyncIterator]],
]:
"""
LLM HTTP Handler for Anthropic Messages
@@ -2449,18 +2457,18 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Mapping[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
shared_session: Optional["ClientSession"] = None,
) -> Union[
ResponsesAPIResponse,
BaseResponsesAPIStreamingIterator,
- Coroutine[Any, Any, Union[ResponsesAPIResponse, BaseResponsesAPIStreamingIterator]],
+ Coroutine[object, object, Union[ResponsesAPIResponse, BaseResponsesAPIStreamingIterator]],
]:
"""
Handles responses API requests.
@@ -2543,7 +2551,7 @@ class BaseLLMHTTPHandler:
# Preserve the OpenAI-style request context (not sent to the provider) for streaming
# hooks/metadata; the streaming iterator now consumes this to run deployment hooks
# with the same info as chat, including litellm_params.
- request_context: Dict[str, Any] = {"input": input}
+ request_context: Dict[str, object] = {"input": input}
try:
request_context.update(response_api_optional_request_params)
except Exception:
@@ -2663,12 +2671,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Mapping[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
shared_session: Optional["ClientSession"] = None,
) -> Union[ResponsesAPIResponse, BaseResponsesAPIStreamingIterator]:
"""
@@ -2720,7 +2728,7 @@ class BaseLLMHTTPHandler:
# Preserve the OpenAI-style request context (not sent to the provider) for streaming
# hooks/metadata; the streaming iterator now consumes this to run deployment hooks
# with the same info as chat, including litellm_params.
- request_context: Dict[str, Any] = {"input": input}
+ request_context: Dict[str, object] = {"input": input}
try:
request_context.update(response_api_optional_request_params)
except Exception:
@@ -2847,8 +2855,8 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -2931,13 +2939,13 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union[DeleteResponseResult, Coroutine[Any, Any, DeleteResponseResult]]:
+ ) -> Union[DeleteResponseResult, Coroutine[object, object, DeleteResponseResult]]:
"""
Async version of the responses API handler.
Uses async HTTP client to make requests.
@@ -3021,13 +3029,13 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union[ResponsesAPIResponse, Coroutine[Any, Any, ResponsesAPIResponse]]:
+ ) -> Union[ResponsesAPIResponse, Coroutine[object, object, ResponsesAPIResponse]]:
"""
Get a response by ID
Uses GET /v1/responses/{response_id} endpoint in the responses API
@@ -3102,8 +3110,8 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -3183,12 +3191,12 @@ class BaseLLMHTTPHandler:
include: Optional[List[str]] = None,
limit: int = 20,
order: Literal["asc", "desc"] = "desc",
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union[Dict, Coroutine[Any, Any, Dict]]:
+ ) -> Union[Dict, Coroutine[object, object, Dict]]:
if _is_async:
return self.async_list_responses_input_items(
response_id=response_id,
@@ -3269,7 +3277,7 @@ class BaseLLMHTTPHandler:
include: Optional[List[str]] = None,
limit: int = 20,
order: Literal["asc", "desc"] = "desc",
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -3375,7 +3383,7 @@ class BaseLLMHTTPHandler:
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
- ) -> Union[OpenAIFileObject, Coroutine[Any, Any, OpenAIFileObject]]:
+ ) -> Union[OpenAIFileObject, Coroutine[object, object, OpenAIFileObject]]:
"""
Creates a file using Gemini's two-step upload process
"""
@@ -3789,7 +3797,7 @@ class BaseLLMHTTPHandler:
client: Optional[Union["HTTPHandler", "AsyncHTTPHandler"]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
model: Optional[str] = None,
- ) -> Union["LiteLLMBatch", Coroutine[Any, Any, "LiteLLMBatch"]]:
+ ) -> Union["LiteLLMBatch", Coroutine[object, object, "LiteLLMBatch"]]:
"""
Creates a batch using provider-specific batch creation process
"""
@@ -3901,7 +3909,7 @@ class BaseLLMHTTPHandler:
client: Optional[Union["HTTPHandler", "AsyncHTTPHandler"]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
model: Optional[str] = None,
- ) -> Union["LiteLLMBatch", Coroutine[Any, Any, "LiteLLMBatch"]]:
+ ) -> Union["LiteLLMBatch", Coroutine[object, object, "LiteLLMBatch"]]:
"""
Retrieve a batch using provider-specific configuration.
"""
@@ -4138,13 +4146,13 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union[ResponsesAPIResponse, Coroutine[Any, Any, ResponsesAPIResponse]]:
+ ) -> Union[ResponsesAPIResponse, Coroutine[object, object, ResponsesAPIResponse]]:
"""
Async version of the responses API handler.
Uses async HTTP client to make requests.
@@ -4218,8 +4226,8 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -4294,13 +4302,13 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union[ResponsesAPIResponse, Coroutine[Any, Any, ResponsesAPIResponse]]:
+ ) -> Union[ResponsesAPIResponse, Coroutine[object, object, ResponsesAPIResponse]]:
"""
Handler for the compact responses API.
"""
@@ -4393,8 +4401,8 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -4485,7 +4493,7 @@ class BaseLLMHTTPHandler:
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
- ) -> Union[OpenAIFileObject, Coroutine[Any, Any, OpenAIFileObject]]:
+ ) -> Union[OpenAIFileObject, Coroutine[object, object, OpenAIFileObject]]:
"""
Retrieve file metadata by ID
"""
@@ -4609,7 +4617,7 @@ class BaseLLMHTTPHandler:
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
- ) -> Union["FileDeleted", Coroutine[Any, Any, "FileDeleted"]]:
+ ) -> Union["FileDeleted", Coroutine[object, object, "FileDeleted"]]:
"""
Delete a file by ID
"""
@@ -4733,7 +4741,7 @@ class BaseLLMHTTPHandler:
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
- ) -> Union[List[OpenAIFileObject], Coroutine[Any, Any, List[OpenAIFileObject]]]:
+ ) -> Union[List[OpenAIFileObject], Coroutine[object, object, List[OpenAIFileObject]]]:
"""
List all files
"""
@@ -4857,7 +4865,7 @@ class BaseLLMHTTPHandler:
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
- ) -> Union["HttpxBinaryResponseContent", Coroutine[Any, Any, "HttpxBinaryResponseContent"]]:
+ ) -> Union["HttpxBinaryResponseContent", Coroutine[object, object, "HttpxBinaryResponseContent"]]:
"""
Retrieve file content by ID
"""
@@ -5008,7 +5016,7 @@ class BaseLLMHTTPHandler:
return depth, max(max_loops, 1), fingerprints
@staticmethod
- def _has_agentic_completion_hook(logging_obj: Any) -> bool:
+ def _has_agentic_completion_hook(logging_obj: LiteLLMLoggingObj) -> bool:
"""
True if any registered callback actually overrides
``async_should_run_agentic_loop`` (the gate every agentic hook goes
@@ -5039,7 +5047,7 @@ class BaseLLMHTTPHandler:
@staticmethod
def _check_agentic_loop_safety(
- tool_calls: Any,
+ tool_calls: object,
fingerprints: List[str],
depth: int,
max_loops: int,
@@ -5062,7 +5070,7 @@ class BaseLLMHTTPHandler:
return fingerprint
@staticmethod
- def _fingerprint_agentic_tools(tools: Dict) -> str:
+ def _fingerprint_agentic_tools(tools: object) -> str:
try:
return json.dumps(tools, sort_keys=True, default=str)
except Exception:
@@ -5081,8 +5089,8 @@ class BaseLLMHTTPHandler:
fingerprints: List[str],
fingerprint: str,
stream: bool = False,
- callback: Optional[Any] = None,
- ) -> Any:
+ callback: Optional["CustomLogger"] = None,
+ ) -> Union[AnthropicMessagesResponse, AsyncIterator[object]]:
from litellm.anthropic_interface import messages as anthropic_messages
patch = plan.request_patch or AgenticLoopRequestPatch()
@@ -5091,7 +5099,7 @@ class BaseLLMHTTPHandler:
full_model_name = model
if logging_obj is not None:
- agentic_params = logging_obj.model_call_details.get("agentic_loop_params", {})
+ agentic_params: Mapping[str, object] = logging_obj.model_call_details.get("agentic_loop_params", {})
full_model_name = cast(str, agentic_params.get("model", model))
optional_params = dict(anthropic_messages_optional_request_params)
@@ -5121,7 +5129,7 @@ class BaseLLMHTTPHandler:
kwargs_for_followup["max_agentic_loops"] = max_loops
kwargs_for_followup["_agentic_loop_fingerprints"] = fingerprints + [fingerprint]
- response = await anthropic_messages.acreate(
+ response: Union[AnthropicMessagesResponse, AsyncIterator[object]] = await anthropic_messages.acreate(
**{
"max_tokens": max_tokens,
"messages": patch.messages,
@@ -5160,8 +5168,8 @@ class BaseLLMHTTPHandler:
max_loops: int,
fingerprints: list[str],
fingerprint: str,
- callback: Any | None = None,
- ) -> Any:
+ callback: Optional["CustomLogger"] = None,
+ ) -> Union[ResponsesAPIResponse, BaseResponsesAPIStreamingIterator]:
patch = plan.request_patch or AgenticLoopRequestPatch()
if patch.messages is None:
raise ValueError("Agentic loop plan missing patched responses input")
@@ -5192,7 +5200,7 @@ class BaseLLMHTTPHandler:
kwargs_for_followup["_agentic_loop_fingerprints"] = fingerprints + [fingerprint]
try:
- response = await litellm.aresponses(
+ response: Union[ResponsesAPIResponse, BaseResponsesAPIStreamingIterator] = await litellm.aresponses(
model=patch.model or model,
input=patch.messages,
**optional_params,
@@ -5227,7 +5235,7 @@ class BaseLLMHTTPHandler:
@staticmethod
async def _run_agentic_loop_cleanup(
- callback: Any,
+ callback: "CustomLogger",
plan: AgenticLoopPlan,
kwargs: dict,
logging_obj: "LiteLLMLoggingObj",
@@ -5248,10 +5256,10 @@ class BaseLLMHTTPHandler:
self,
result: Any,
model: str,
- responses_api_provider_config: Any,
+ responses_api_provider_config: BaseResponsesAPIConfig,
logging_obj: "LiteLLMLoggingObj",
custom_llm_provider: str,
- ) -> Any:
+ ) -> MockResponsesAPIStreamingIterator:
"""
Wrap a completed responses result as a synthetic stream.
@@ -5330,10 +5338,10 @@ class BaseLLMHTTPHandler:
def _maybe_wrap_in_fake_stream(
self,
- response: Any,
+ response: _ResponseT,
logging_obj: Optional["LiteLLMLoggingObj"],
api_surface: str,
- ) -> Any:
+ ) -> Union[_ResponseT, "FakeAnthropicMessagesStreamIterator"]:
"""
If the original request was streaming but converted to non-streaming for
WebSearch interception, wrap the dict response in a FakeAnthropicMessagesStreamIterator.
@@ -5402,7 +5410,7 @@ class BaseLLMHTTPHandler:
continue
should_run: bool = False
- tool_calls: Any = None
+ tool_calls: object = None
try:
# First: Check if agentic loop should run. Wrap in try/except
# to shield from buggy user callbacks — a callback crash should
@@ -5449,7 +5457,7 @@ class BaseLLMHTTPHandler:
callback.__class__.async_build_agentic_loop_plan is not CustomLogger.async_build_agentic_loop_plan
)
if not build_plan_overridden:
- agentic_result = await callback.async_run_agentic_loop(
+ agentic_result: object = await callback.async_run_agentic_loop(
tools=tool_calls,
model=model,
messages=messages,
@@ -5571,7 +5579,7 @@ class BaseLLMHTTPHandler:
continue
should_run: bool = False
- tool_calls: Any = None
+ tool_calls: object = None
try:
(
should_run,
@@ -5828,7 +5836,7 @@ class BaseLLMHTTPHandler:
client: Optional[Any] = None,
timeout: Optional[float] = None,
user_api_key_dict: Optional[Any] = None,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
query_params: Optional[RealtimeQueryParams] = None,
):
import websockets
@@ -5927,7 +5935,7 @@ class BaseLLMHTTPHandler:
timeout: Union[float, httpx.Timeout],
provider_config: Optional[Any] = None,
model: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
api_version: Optional[str] = None,
) -> httpx.Response:
@@ -5960,7 +5968,7 @@ class BaseLLMHTTPHandler:
timeout: Union[float, httpx.Timeout],
provider_config: Optional[Any] = None,
model: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
api_version: Optional[str] = None,
) -> httpx.Response:
@@ -5989,7 +5997,7 @@ class BaseLLMHTTPHandler:
timeout: Union[float, httpx.Timeout],
provider_config: Optional[Any] = None,
model: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
api_version: Optional[str] = None,
) -> httpx.Response:
@@ -6061,8 +6069,8 @@ class BaseLLMHTTPHandler:
timeout: Union[float, httpx.Timeout],
provider_config: Optional[Any] = None,
model: Optional[str] = None,
- session_config: Optional[Dict[str, Any]] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
+ session_config: Optional[Dict[str, object]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
api_version: Optional[str] = None,
) -> httpx.Response:
@@ -6144,7 +6152,7 @@ class BaseLLMHTTPHandler:
api_key: Optional[str] = None,
timeout: Optional[float] = None,
user_api_key_dict: Optional[Any] = None,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
custom_llm_provider: Optional[str] = None,
first_message: Optional[str] = None,
**kwargs: Any,
@@ -6184,10 +6192,12 @@ class BaseLLMHTTPHandler:
import websockets
from websockets.asyncio.client import ClientConnection
- litellm_params = GenericLiteLLMParams(
- api_base=api_base,
- api_key=api_key,
- **kwargs,
+ litellm_params = GenericLiteLLMParams.model_validate(
+ {
+ "api_base": api_base,
+ "api_key": api_key,
+ **kwargs,
+ }
)
headers = responses_api_provider_config.validate_environment(
headers={},
@@ -6322,15 +6332,15 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
) -> Union[
ImageResponse,
- Coroutine[Any, Any, ImageResponse],
+ Coroutine[object, object, ImageResponse],
]:
"""
@@ -6442,11 +6452,11 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
) -> ImageResponse:
"""
Async version of the image edit handler.
@@ -6540,16 +6550,16 @@ class BaseLLMHTTPHandler:
litellm_params: Dict,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
) -> Union[
ImageResponse,
- Coroutine[Any, Any, ImageResponse],
+ Coroutine[object, object, ImageResponse],
]:
"""
Handles image generation requests.
@@ -6667,11 +6677,11 @@ class BaseLLMHTTPHandler:
litellm_params: Dict,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
) -> ImageResponse:
"""
@@ -6775,16 +6785,16 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
) -> Union[
VideoObject,
- Coroutine[Any, Any, VideoObject],
+ Coroutine[object, object, VideoObject],
]:
"""
Handles video generation requests.
@@ -6899,11 +6909,11 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
fake_stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
) -> VideoObject:
"""
@@ -6999,12 +7009,12 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
variant: Optional[str] = None,
- ) -> Union[bytes, Coroutine[Any, Any, bytes]]:
+ ) -> Union[bytes, Coroutine[object, object, bytes]]:
"""
Handle video content download requests.
"""
@@ -7089,7 +7099,7 @@ class BaseLLMHTTPHandler:
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
api_key: Optional[str] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
variant: Optional[str] = None,
@@ -7167,8 +7177,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -7266,8 +7276,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -7349,7 +7359,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -7433,7 +7443,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -7504,7 +7514,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -7573,7 +7583,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -7632,8 +7642,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -7741,8 +7751,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -7838,8 +7848,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -7927,8 +7937,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -8002,8 +8012,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -8056,8 +8066,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -8137,7 +8147,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -8213,8 +8223,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
_is_async: bool = False,
client=None,
@@ -8318,8 +8328,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params,
logging_obj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[float] = None,
client=None,
api_key: Optional[str] = None,
@@ -8408,11 +8418,11 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- ) -> Union["ContainerObject", Coroutine[Any, Any, "ContainerObject"]]:
+ ) -> Union["ContainerObject", Coroutine[object, object, "ContainerObject"]]:
if _is_async:
# Return the async coroutine if called with _is_async=True
return self.async_container_create_handler(
@@ -8495,7 +8505,7 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> "ContainerObject":
@@ -8572,12 +8582,12 @@ class BaseLLMHTTPHandler:
after: Optional[str] = None,
limit: Optional[int] = None,
order: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- ) -> Union["ContainerListResponse", Coroutine[Any, Any, "ContainerListResponse"]]:
+ ) -> Union["ContainerListResponse", Coroutine[object, object, "ContainerListResponse"]]:
if _is_async:
# Return the async coroutine if called with _is_async=True
return self.async_container_list_handler(
@@ -8662,8 +8672,8 @@ class BaseLLMHTTPHandler:
after: Optional[str] = None,
limit: Optional[int] = None,
order: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> "ContainerListResponse":
@@ -8737,12 +8747,12 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- ) -> Union["ContainerObject", Coroutine[Any, Any, "ContainerObject"]]:
+ ) -> Union["ContainerObject", Coroutine[object, object, "ContainerObject"]]:
if _is_async:
# Return the async coroutine if called with _is_async=True
return self.async_container_retrieve_handler(
@@ -8825,8 +8835,8 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> "ContainerObject":
@@ -8902,12 +8912,12 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- ) -> Union["DeleteContainerResult", Coroutine[Any, Any, "DeleteContainerResult"]]:
+ ) -> Union["DeleteContainerResult", Coroutine[object, object, "DeleteContainerResult"]]:
if _is_async:
# Return the async coroutine if called with _is_async=True
return self.async_container_delete_handler(
@@ -8990,8 +9000,8 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> "DeleteContainerResult":
@@ -9070,12 +9080,12 @@ class BaseLLMHTTPHandler:
after: Optional[str] = None,
limit: Optional[int] = None,
order: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- ) -> Union["ContainerFileListResponse", Coroutine[Any, Any, "ContainerFileListResponse"]]:
+ ) -> Union["ContainerFileListResponse", Coroutine[object, object, "ContainerFileListResponse"]]:
if _is_async:
return self.async_container_file_list_handler(
container_id=container_id,
@@ -9162,8 +9172,8 @@ class BaseLLMHTTPHandler:
after: Optional[str] = None,
limit: Optional[int] = None,
order: Optional[str] = None,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> "ContainerFileListResponse":
@@ -9239,11 +9249,11 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
- ) -> Union[bytes, Coroutine[Any, Any, bytes]]:
+ ) -> Union[bytes, Coroutine[object, object, bytes]]:
if _is_async:
return self.async_container_file_content_handler(
container_id=container_id,
@@ -9325,7 +9335,7 @@ class BaseLLMHTTPHandler:
container_provider_config: "BaseContainerConfig",
litellm_params: GenericLiteLLMParams,
logging_obj: "LiteLLMLoggingObj",
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Union[float, httpx.Timeout] = 600,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> bytes:
@@ -9404,8 +9414,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -9502,12 +9512,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreSearchResponse, Coroutine[Any, Any, VectorStoreSearchResponse]]:
+ ) -> Union[VectorStoreSearchResponse, Coroutine[object, object, VectorStoreSearchResponse]]:
if _is_async:
return self.async_vector_store_search_handler(
vector_store_id=vector_store_id,
@@ -9596,8 +9606,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -9656,12 +9666,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreCreateResponse, Coroutine[Any, Any, VectorStoreCreateResponse]]:
+ ) -> Union[VectorStoreCreateResponse, Coroutine[object, object, VectorStoreCreateResponse]]:
if _is_async:
return self.async_vector_store_create_handler(
vector_store_create_optional_params=vector_store_create_optional_params,
@@ -9726,8 +9736,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreCreateResponse:
@@ -9779,12 +9789,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreCreateResponse, Coroutine[Any, Any, VectorStoreCreateResponse]]:
+ ) -> Union[VectorStoreCreateResponse, Coroutine[object, object, VectorStoreCreateResponse]]:
if _is_async:
return self.async_vector_store_retrieve_handler(
vector_store_id=vector_store_id,
@@ -9846,8 +9856,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
):
@@ -9910,8 +9920,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -9986,8 +9996,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreCreateResponse:
@@ -10052,12 +10062,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreCreateResponse, Coroutine[Any, Any, VectorStoreCreateResponse]]:
+ ) -> Union[VectorStoreCreateResponse, Coroutine[object, object, VectorStoreCreateResponse]]:
if _is_async:
return self.async_vector_store_update_handler(
vector_store_id=vector_store_id,
@@ -10129,8 +10139,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
):
@@ -10180,8 +10190,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
@@ -10247,8 +10257,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreFileObject:
@@ -10312,12 +10322,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreFileObject, Coroutine[Any, Any, VectorStoreFileObject]]:
+ ) -> Union[VectorStoreFileObject, Coroutine[object, object, VectorStoreFileObject]]:
if _is_async:
return self.async_vector_store_file_create_handler(
vector_store_id=vector_store_id,
@@ -10389,8 +10399,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreFileListResponse:
@@ -10453,12 +10463,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_query: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
+ extra_query: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreFileListResponse, Coroutine[Any, Any, VectorStoreFileListResponse]]:
+ ) -> Union[VectorStoreFileListResponse, Coroutine[object, object, VectorStoreFileListResponse]]:
if _is_async:
return self.async_vector_store_file_list_handler(
vector_store_id=vector_store_id,
@@ -10529,7 +10539,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreFileObject:
@@ -10588,11 +10598,11 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreFileObject, Coroutine[Any, Any, VectorStoreFileObject]]:
+ ) -> Union[VectorStoreFileObject, Coroutine[object, object, VectorStoreFileObject]]:
if _is_async:
return self.async_vector_store_file_retrieve_handler(
vector_store_id=vector_store_id,
@@ -10658,7 +10668,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreFileContentResponse:
@@ -10719,13 +10729,13 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
) -> Union[
VectorStoreFileContentResponse,
- Coroutine[Any, Any, VectorStoreFileContentResponse],
+ Coroutine[object, object, VectorStoreFileContentResponse],
]:
if _is_async:
return self.async_vector_store_file_content_handler(
@@ -10795,8 +10805,8 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreFileObject:
@@ -10861,12 +10871,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
- ) -> Union[VectorStoreFileObject, Coroutine[Any, Any, VectorStoreFileObject]]:
+ ) -> Union[VectorStoreFileObject, Coroutine[object, object, VectorStoreFileObject]]:
if _is_async:
return self.async_vector_store_file_update_handler(
vector_store_id=vector_store_id,
@@ -10939,7 +10949,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> VectorStoreFileDeleteResponse:
@@ -10998,13 +11008,13 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, str]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
) -> Union[
VectorStoreFileDeleteResponse,
- Coroutine[Any, Any, VectorStoreFileDeleteResponse],
+ Coroutine[object, object, VectorStoreFileDeleteResponse],
]:
if _is_async:
return self.async_vector_store_file_delete_handler(
@@ -11075,13 +11085,13 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
_is_async: bool = False,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
system_instruction: Optional[Any] = None,
) -> Any:
"""
@@ -11207,12 +11217,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[AsyncHTTPHandler] = None,
stream: bool = False,
- litellm_metadata: Optional[Dict[str, Any]] = None,
+ litellm_metadata: Optional[Dict[str, object]] = None,
system_instruction: Optional[Any] = None,
) -> Any:
"""
@@ -11326,12 +11336,12 @@ class BaseLLMHTTPHandler:
litellm_params: Dict,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
) -> Union[
"HttpxBinaryResponseContent",
- Coroutine[Any, Any, "HttpxBinaryResponseContent"],
+ Coroutine[object, object, "HttpxBinaryResponseContent"],
]:
"""
Handles text-to-speech requests.
@@ -11441,7 +11451,7 @@ class BaseLLMHTTPHandler:
litellm_params: Dict,
logging_obj: LiteLLMLoggingObj,
timeout: Union[float, httpx.Timeout],
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
) -> "HttpxBinaryResponseContent":
"""
@@ -11573,12 +11583,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Skill", Coroutine[Any, Any, "Skill"]]:
+ ) -> Union["Skill", Coroutine[object, object, "Skill"]]:
"""Create a skill"""
if _is_async:
return self.async_create_skill_handler(
@@ -11639,7 +11649,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -11695,12 +11705,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["ListSkillsResponse", Coroutine[Any, Any, "ListSkillsResponse"]]:
+ ) -> Union["ListSkillsResponse", Coroutine[object, object, "ListSkillsResponse"]]:
"""List skills"""
if _is_async:
return self.async_list_skills_handler(
@@ -11754,7 +11764,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -11800,12 +11810,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Skill", Coroutine[Any, Any, "Skill"]]:
+ ) -> Union["Skill", Coroutine[object, object, "Skill"]]:
"""Get a skill"""
if _is_async:
return self.async_get_skill_handler(
@@ -11856,7 +11866,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -11901,12 +11911,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["DeleteSkillResponse", Coroutine[Any, Any, "DeleteSkillResponse"]]:
+ ) -> Union["DeleteSkillResponse", Coroutine[object, object, "DeleteSkillResponse"]]:
"""Delete a skill"""
if _is_async:
return self.async_delete_skill_handler(
@@ -11957,7 +11967,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12007,12 +12017,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Eval", Coroutine[Any, Any, "Eval"]]:
+ ) -> Union["Eval", Coroutine[object, object, "Eval"]]:
"""Create an eval"""
if _is_async:
return self.async_create_eval_handler(
@@ -12066,7 +12076,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12113,12 +12123,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["ListEvalsResponse", Coroutine[Any, Any, "ListEvalsResponse"]]:
+ ) -> Union["ListEvalsResponse", Coroutine[object, object, "ListEvalsResponse"]]:
"""List evals"""
if _is_async:
return self.async_list_evals_handler(
@@ -12172,7 +12182,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12218,12 +12228,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Eval", Coroutine[Any, Any, "Eval"]]:
+ ) -> Union["Eval", Coroutine[object, object, "Eval"]]:
"""Get an eval"""
if _is_async:
return self.async_get_eval_handler(
@@ -12274,7 +12284,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12320,12 +12330,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Eval", Coroutine[Any, Any, "Eval"]]:
+ ) -> Union["Eval", Coroutine[object, object, "Eval"]]:
"""Update an eval"""
if _is_async:
return self.async_update_eval_handler(
@@ -12379,7 +12389,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12425,12 +12435,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["DeleteEvalResponse", Coroutine[Any, Any, "DeleteEvalResponse"]]:
+ ) -> Union["DeleteEvalResponse", Coroutine[object, object, "DeleteEvalResponse"]]:
"""Delete an eval"""
if _is_async:
return self.async_delete_eval_handler(
@@ -12481,7 +12491,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12526,12 +12536,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["CancelEvalResponse", Coroutine[Any, Any, "CancelEvalResponse"]]:
+ ) -> Union["CancelEvalResponse", Coroutine[object, object, "CancelEvalResponse"]]:
"""Cancel an eval"""
if _is_async:
return self.async_cancel_eval_handler(
@@ -12582,7 +12592,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12632,12 +12642,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Run", Coroutine[Any, Any, "Run"]]:
+ ) -> Union["Run", Coroutine[object, object, "Run"]]:
"""Create a run"""
if _is_async:
return self.async_create_run_handler(
@@ -12691,7 +12701,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12738,12 +12748,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["ListRunsResponse", Coroutine[Any, Any, "ListRunsResponse"]]:
+ ) -> Union["ListRunsResponse", Coroutine[object, object, "ListRunsResponse"]]:
"""List runs"""
if _is_async:
return self.async_list_runs_handler(
@@ -12797,7 +12807,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12843,12 +12853,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["Run", Coroutine[Any, Any, "Run"]]:
+ ) -> Union["Run", Coroutine[object, object, "Run"]]:
"""Get a run"""
if _is_async:
return self.async_get_run_handler(
@@ -12899,7 +12909,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -12944,12 +12954,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["CancelRunResponse", Coroutine[Any, Any, "CancelRunResponse"]]:
+ ) -> Union["CancelRunResponse", Coroutine[object, object, "CancelRunResponse"]]:
"""Cancel a run"""
if _is_async:
return self.async_cancel_run_handler(
@@ -13000,7 +13010,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
@@ -13045,12 +13055,12 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
_is_async: bool = False,
shared_session: Optional["ClientSession"] = None,
- ) -> Union["RunDeleteResponse", Coroutine[Any, Any, "RunDeleteResponse"]]:
+ ) -> Union["RunDeleteResponse", Coroutine[object, object, "RunDeleteResponse"]]:
"""Delete a run"""
if _is_async:
return self.async_delete_run_handler(
@@ -13101,7 +13111,7 @@ class BaseLLMHTTPHandler:
custom_llm_provider: str,
litellm_params: GenericLiteLLMParams,
logging_obj: LiteLLMLoggingObj,
- extra_headers: Optional[Dict[str, Any]] = None,
+ extra_headers: Optional[Dict[str, object]] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
shared_session: Optional["ClientSession"] = None,
diff --git a/litellm/llms/manus/responses/transformation.py b/litellm/llms/manus/responses/transformation.py
index 0db53f90330..e6fbbac0563 100644
--- a/litellm/llms/manus/responses/transformation.py
+++ b/litellm/llms/manus/responses/transformation.py
@@ -217,7 +217,7 @@ class ManusResponsesAPIConfig(OpenAIResponsesAPIConfig):
raw_response_json["id"] = f"unknown-{uuid.uuid4().hex[:8]}"
try:
- response = ResponsesAPIResponse(**raw_response_json)
+ response = ResponsesAPIResponse.model_validate(raw_response_json)
except Exception:
verbose_logger.debug(f"Error constructing ResponsesAPIResponse: {raw_response_json}, using model_construct")
response = ResponsesAPIResponse.model_construct(**raw_response_json)
@@ -305,7 +305,7 @@ class ManusResponsesAPIConfig(OpenAIResponsesAPIConfig):
raw_response_json["id"] = f"unknown-{uuid.uuid4().hex[:8]}"
try:
- response = ResponsesAPIResponse(**raw_response_json)
+ response = ResponsesAPIResponse.model_validate(raw_response_json)
except Exception:
verbose_logger.debug(f"Error constructing ResponsesAPIResponse: {raw_response_json}, using model_construct")
response = ResponsesAPIResponse.model_construct(**raw_response_json)
diff --git a/litellm/llms/openai/videos/transformation.py b/litellm/llms/openai/videos/transformation.py
index 684601367b6..855bc410cea 100644
--- a/litellm/llms/openai/videos/transformation.py
+++ b/litellm/llms/openai/videos/transformation.py
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast
from urllib.parse import quote
import httpx
-from httpx._types import RequestFiles
+from httpx._types import FileContent, FileTypes, RequestFiles
import litellm
from litellm.litellm_core_utils.url_utils import encode_url_path_segment
@@ -128,7 +128,7 @@ class OpenAIVideoConfig(BaseVideoConfig):
# Handle input_reference parameter if provided
_input_reference = video_create_optional_request_params.get("input_reference")
data_without_files = {k: v for k, v in request_dict.items() if k not in ["input_reference"]}
- files_list: List[Tuple[str, Any]] = []
+ files_list: List[Tuple[str, FileTypes]] = []
# Handle input_reference parameter
if _input_reference is not None:
@@ -177,9 +177,7 @@ class OpenAIVideoConfig(BaseVideoConfig):
request_data: Optional[Dict] = None,
) -> VideoObject:
"""Transform the OpenAI video creation response."""
- response_data = raw_response.json()
-
- video_obj = VideoObject(**response_data) # type: ignore[arg-type]
+ video_obj = VideoObject.model_validate(raw_response.json())
if custom_llm_provider and video_obj.id:
video_obj.id = encode_video_id_with_provider(video_obj.id, custom_llm_provider, model)
@@ -223,7 +221,7 @@ class OpenAIVideoConfig(BaseVideoConfig):
url = f"{url}?variant={quote(variant, safe='')}"
# No additional data needed for GET content request
- data: Dict[str, Any] = {}
+ data: Dict[str, object] = {}
return url, data
@@ -274,10 +272,8 @@ class OpenAIVideoConfig(BaseVideoConfig):
"""
Transform the OpenAI video remix response.
"""
- response_data = raw_response.json()
-
# Transform the response data
- video_obj = VideoObject(**response_data) # type: ignore[arg-type]
+ video_obj = VideoObject.model_validate(raw_response.json())
if custom_llm_provider and video_obj.id:
video_obj.id = encode_video_id_with_provider(video_obj.id, custom_llm_provider, None)
@@ -392,7 +388,7 @@ class OpenAIVideoConfig(BaseVideoConfig):
url = f"{api_base.rstrip('/')}/{encoded_video_id}"
# No data needed for DELETE request
- data: Dict[str, Any] = {}
+ data: Dict[str, object] = {}
return url, data
@@ -404,10 +400,8 @@ class OpenAIVideoConfig(BaseVideoConfig):
"""
Transform the OpenAI video delete response.
"""
- response_data = raw_response.json()
-
# Transform the response data
- video_obj = VideoObject(**response_data) # type: ignore[arg-type] # type: ignore[arg-type]
+ video_obj = VideoObject.model_validate(raw_response.json())
return video_obj
@@ -429,7 +423,7 @@ class OpenAIVideoConfig(BaseVideoConfig):
url = f"{api_base.rstrip('/')}/{encoded_video_id}"
# No additional data needed for GET request
- data: Dict[str, Any] = {}
+ data: Dict[str, object] = {}
return url, data
@@ -442,9 +436,8 @@ class OpenAIVideoConfig(BaseVideoConfig):
"""
Transform the OpenAI video retrieve response.
"""
- response_data = raw_response.json()
# Transform the response data
- video_obj = VideoObject(**response_data) # type: ignore[arg-type]
+ video_obj = VideoObject.model_validate(raw_response.json())
if custom_llm_provider and video_obj.id:
video_obj.id = encode_video_id_with_provider(video_obj.id, custom_llm_provider, None)
@@ -465,22 +458,22 @@ class OpenAIVideoConfig(BaseVideoConfig):
def transform_video_create_character_request(
self,
name: str,
- video: Any,
+ video: FileContent,
api_base: str,
litellm_params: GenericLiteLLMParams,
headers: dict,
) -> Tuple[str, list]:
url = f"{api_base.rstrip('/')}/characters"
- files_list: List[Tuple[str, Any]] = [("name", (None, name))]
+ files_list: List[Tuple[str, FileTypes]] = [("name", (None, name))]
self._add_video_to_files(files_list, video, "video")
return url, files_list
def transform_video_create_character_response(
self,
raw_response: httpx.Response,
- logging_obj: Any,
+ logging_obj: LiteLLMLoggingObj,
) -> CharacterObject:
- return CharacterObject(**raw_response.json())
+ return CharacterObject.model_validate(raw_response.json())
def transform_video_get_character_request(
self,
@@ -497,9 +490,9 @@ class OpenAIVideoConfig(BaseVideoConfig):
def transform_video_get_character_response(
self,
raw_response: httpx.Response,
- logging_obj: Any,
+ logging_obj: LiteLLMLoggingObj,
) -> CharacterObject:
- return CharacterObject(**raw_response.json())
+ return CharacterObject.model_validate(raw_response.json())
def transform_video_edit_request(
self,
@@ -508,12 +501,12 @@ class OpenAIVideoConfig(BaseVideoConfig):
api_base: str,
litellm_params: GenericLiteLLMParams,
headers: dict,
- extra_body: Optional[Dict[str, Any]] = None,
- prefetched_source_data: Optional[Dict[str, Any]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
+ prefetched_source_data: Optional[Dict[str, object]] = None,
) -> Tuple[str, Dict]:
original_video_id = extract_original_video_id(video_id)
url = f"{api_base.rstrip('/')}/edits"
- data: Dict[str, Any] = {"prompt": prompt, "video": {"id": original_video_id}}
+ data: Dict[str, object] = {"prompt": prompt, "video": {"id": original_video_id}}
if extra_body:
data.update(extra_body)
return url, data
@@ -521,11 +514,11 @@ class OpenAIVideoConfig(BaseVideoConfig):
def transform_video_edit_response(
self,
raw_response: httpx.Response,
- logging_obj: Any,
+ logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str] = None,
request_data: Optional[Dict] = None,
) -> VideoObject:
- video_obj = VideoObject(**raw_response.json())
+ video_obj = VideoObject.model_validate(raw_response.json())
if custom_llm_provider and video_obj.id:
video_obj.id = encode_video_id_with_provider(video_obj.id, custom_llm_provider, None)
return video_obj
@@ -538,11 +531,11 @@ class OpenAIVideoConfig(BaseVideoConfig):
api_base: str,
litellm_params: GenericLiteLLMParams,
headers: dict,
- extra_body: Optional[Dict[str, Any]] = None,
+ extra_body: Optional[Dict[str, object]] = None,
) -> Tuple[str, Dict]:
original_video_id = extract_original_video_id(video_id)
url = f"{api_base.rstrip('/')}/extensions"
- data: Dict[str, Any] = {
+ data: Dict[str, object] = {
"prompt": prompt,
"seconds": seconds,
"video": {"id": original_video_id},
@@ -554,10 +547,10 @@ class OpenAIVideoConfig(BaseVideoConfig):
def transform_video_extension_response(
self,
raw_response: httpx.Response,
- logging_obj: Any,
+ logging_obj: LiteLLMLoggingObj,
custom_llm_provider: Optional[str] = None,
) -> VideoObject:
- video_obj = VideoObject(**raw_response.json())
+ video_obj = VideoObject.model_validate(raw_response.json())
if custom_llm_provider and video_obj.id:
video_obj.id = encode_video_id_with_provider(video_obj.id, custom_llm_provider, None)
return video_obj
@@ -578,8 +571,8 @@ class OpenAIVideoConfig(BaseVideoConfig):
def _add_video_to_files(
self,
- files_list: List[Tuple[str, Any]],
- video: Any,
+ files_list: List[Tuple[str, FileTypes]],
+ video: FileContent,
field_name: str,
) -> None:
"""
@@ -592,7 +585,7 @@ class OpenAIVideoConfig(BaseVideoConfig):
content_type = self._get_video_content_type(video=video, filename=filename)
files_list.append((field_name, (filename, video, content_type)))
- def _get_video_content_type(self, video: Any, filename: str) -> str:
+ def _get_video_content_type(self, video: FileContent, filename: str) -> str:
guessed_content_type, _ = mimetypes.guess_type(filename)
if guessed_content_type and guessed_content_type.startswith("video/"):
return guessed_content_type
diff --git a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
index db80c0f76ee..0a6d72881be 100644
--- a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
+++ b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
@@ -15,8 +15,19 @@ import re
import time
from collections.abc import Sequence
from contextlib import asynccontextmanager
-from typing import Any, AsyncIterator, Callable, Literal, Optional, Union, cast
-from urllib.parse import urlparse
+from typing import (
+ TYPE_CHECKING,
+ Any,
+ AsyncIterator,
+ Callable,
+ Literal,
+ Optional,
+ TypeAlias,
+ TypedDict,
+ Union,
+ cast,
+)
+from urllib.parse import ParseResult, urlparse
import anyio
import httpx
@@ -32,7 +43,7 @@ from mcp.types import (
ResourceTemplate,
)
from mcp.types import Tool as MCPTool
-from pydantic import AnyUrl
+from pydantic import AnyUrl, BaseModel
import litellm
from litellm._logging import verbose_logger
@@ -139,10 +150,15 @@ from litellm.proxy._types import (
from litellm.proxy.auth.ip_address_utils import IPAddressUtils
from litellm.proxy.common_utils.encrypt_decrypt_utils import decrypt_value_helper
from litellm.proxy.common_utils.user_api_key_cache import get_management_object_ttl
-from litellm.proxy.utils import ProxyLogging, get_server_root_path
+from litellm.proxy.utils import PrismaClient, ProxyLogging, get_server_root_path
from litellm.repositories.table_repositories import MCPServerRepository
from litellm.types.llms.custom_http import httpxSpecialProvider
-from litellm.types.mcp import DEFAULT_SUBJECT_TOKEN_TYPE, MCPAuth, MCPStdioConfig
+from litellm.types.mcp import (
+ DEFAULT_SUBJECT_TOKEN_TYPE,
+ MCPAuth,
+ MCPStdioConfig,
+ MCPTokenEndpointAuthMethod,
+)
from litellm.types.mcp_server.mcp_server_manager import (
MCPInfo,
MCPOAuthMetadata,
@@ -150,6 +166,14 @@ from litellm.types.mcp_server.mcp_server_manager import (
)
from litellm.types.utils import CallTypes
+if TYPE_CHECKING:
+ from mcp.client.session import ClientSession
+ from mcp.shared.context import RequestContext
+ from mcp.types import CreateMessageRequestParams
+
+ from litellm.caching.caching import InMemoryCache
+ from litellm.types.mcp_server.mcp_toolset import MCPToolset
+
try:
from mcp.shared.tool_name_validation import (
SEP_986_URL,
@@ -209,6 +233,95 @@ _UPSTREAM_OAUTH_DISCOVERY_AUTH_TYPES: tuple[MCPAuth, ...] = (
_OAUTH_DISCOVERY_RETRY_BASE_SECONDS = 30.0
_OAUTH_DISCOVERY_RETRY_MAX_SECONDS = 900.0
+_StringList: TypeAlias = list[str]
+_StringMap: TypeAlias = dict[str, str]
+_ToolParamMap: TypeAlias = dict[str, list[str]]
+_EnvVarList: TypeAlias = list[dict[str, object]]
+_InMemoryCacheDict: TypeAlias = dict[str, object]
+_ToolArguments: TypeAlias = dict[str, object]
+
+
+class MCPServerConfig(TypedDict, total=False):
+ """Shape of a single ``mcp_servers`` entry in config.yaml, as consumed by
+ :meth:`MCPServerManager.load_servers_from_config`. Every key is optional: YAML supplies
+ whatever the admin wrote, and each read applies its own default."""
+
+ alias: str
+ description: str
+ mcp_info: MCPInfo
+ url: str
+ spec_path: str
+ transport: MCPTransportType
+ auth_type: MCPAuthType
+ authentication_token: str
+ auth_value: str
+ instructions: str
+ command: str
+ args: _StringList
+ env: _StringMap
+ client_id: str
+ client_secret: str
+ oauth2_flow: str
+ issuer: str
+ authorization_url: str
+ token_url: str
+ registration_url: str
+ token_endpoint_auth_method: MCPTokenEndpointAuthMethod
+ scopes: str | Sequence[str]
+ dcr_bridge: object
+ extra_headers: _StringList
+ allowed_tools: _StringList
+ disallowed_tools: _StringList
+ allowed_params: _ToolParamMap
+ access_groups: _StringList
+ static_headers: _StringMap
+ env_vars: _EnvVarList
+ allow_all_keys: bool
+ available_on_public_internet: bool
+ delegate_auth_to_upstream: bool
+ oauth_passthrough: bool
+ allow_sampling: bool
+ allow_elicitation: bool
+ aws_access_key_id: str
+ aws_secret_access_key: str
+ aws_session_token: str
+ aws_region_name: str
+ aws_service_name: str
+ aws_role_name: str
+ aws_session_name: str
+ token_exchange_endpoint: str
+ token_exchange_profile: str
+ audience: str
+ subject_token_type: str
+ upstream_resource: str
+ id_jag_resource_token_endpoint: str
+ id_jag_resource: str
+ client_private_key: str
+ client_private_key_id: str
+ client_assertion_signing_alg: str
+ timeout: float
+ max_concurrent_requests: int
+
+
+class _ProtectedResourceMetadataPayload(TypedDict, total=False):
+ """The RFC 9728 protected-resource metadata document fields this gateway reads."""
+
+ authorization_servers: Sequence[object]
+ scopes_supported: Sequence[str]
+ scopes: Sequence[str]
+
+
+class _AuthorizationServerMetadataPayload(TypedDict, total=False):
+ """The RFC 8414 / OpenID Discovery authorization-server metadata fields this gateway reads."""
+
+ issuer: str
+ authorization_endpoint: str
+ token_endpoint: str
+ registration_endpoint: str
+ scopes_supported: Sequence[str]
+ grant_types_supported: Sequence[str]
+ token_endpoint_auth_methods_supported: Sequence[str]
+
def _blank_to_none(value: str | None) -> str | None:
"""Collapse an absent, empty, or whitespace-only string to ``None``.
@@ -968,7 +1081,7 @@ def _warn_internal_delegate_pkce_if_applicable(server: MCPServer, *, source: str
)
-def _deserialize_json_dict(data: Any) -> Optional[dict[str, str]]:
+def _deserialize_json_dict(data: str | _StringMap | None) -> Optional[dict[str, str]]:
"""
Deserialize optional JSON mappings stored in the database.
@@ -1057,7 +1170,7 @@ def _normalize_mcp_server_cost_info(mcp_info: MCPInfo) -> None:
mcp_info["mcp_server_cost_info"] = normalized
-def _create_sampling_callback(user_api_key_auth: Optional[Any] = None):
+def _create_sampling_callback(user_api_key_auth: Optional[UserAPIKeyAuth] = None):
"""
Create a sampling callback for MCP ClientSession.
Returns a callable that handles sampling/createMessage requests from
@@ -1066,7 +1179,10 @@ def _create_sampling_callback(user_api_key_auth: Optional[Any] = None):
if not MCP_SAMPLING_AVAILABLE:
return None
- async def _sampling_callback(context, params):
+ async def _sampling_callback(
+ context: "RequestContext[ClientSession, object]",
+ params: "CreateMessageRequestParams",
+ ):
import litellm
from litellm.proxy._experimental.mcp_server.sampling_handler import (
handle_sampling_create_message,
@@ -1309,8 +1425,9 @@ class MCPServerManager:
if state is None:
return True
failures, attempted_at = state
+ backoff_multiplier: int = 2 ** max(failures - 1, 0)
delay = min(
- _OAUTH_DISCOVERY_RETRY_BASE_SECONDS * (2 ** max(failures - 1, 0)),
+ _OAUTH_DISCOVERY_RETRY_BASE_SECONDS * backoff_multiplier,
_OAUTH_DISCOVERY_RETRY_MAX_SECONDS,
)
return (time.monotonic() - attempted_at) >= delay
@@ -1324,7 +1441,7 @@ class MCPServerManager:
self._oauth_discovery_retry_state[server.server_id] = (failures + 1, time.monotonic())
def _remember_upstream_initialize_instructions(self, server: MCPServer, client: MCPClient) -> None:
- raw = getattr(client, "_last_initialize_instructions", None)
+ raw: str | None = getattr(client, "_last_initialize_instructions", None)
if raw and str(raw).strip():
self._upstream_initialize_instructions_by_server_id[server.server_id] = str(raw).strip()
@@ -1430,9 +1547,10 @@ class MCPServerManager:
# Track which aliases have been used to ensure only first occurrence is used
used_aliases = set()
- for server_name, server_config in mcp_servers_config.items():
+ for server_name, raw_server_config in mcp_servers_config.items():
+ server_config: MCPServerConfig = raw_server_config
validate_mcp_server_name(server_name)
- _mcp_info: dict[str, Any] = server_config.get("mcp_info", None) or {}
+ _mcp_info: MCPInfo = server_config.get("mcp_info", None) or {}
# Preserve all custom fields from config while setting defaults for core fields
mcp_info: MCPInfo = _mcp_info.copy()
# Set default values for core fields if not present
@@ -1895,7 +2013,7 @@ class MCPServerManager:
mcp_server: LiteLLM_MCPServerTable,
*,
env_vars_are_encrypted: bool,
- ) -> Optional[list[dict[str, Any]]]:
+ ) -> Optional[_EnvVarList]:
env_vars_list = _deserialize_json_list(getattr(mcp_server, "env_vars", None))
if env_vars_are_encrypted:
from litellm.proxy._experimental.mcp_server.db import ( # noqa: PLC0415
@@ -2279,7 +2397,7 @@ class MCPServerManager:
async def _get_active_submitted_mcp_server_ids_for_user(
self, user_api_key_auth: UserAPIKeyAuth | None
) -> list[str]:
- submitter_user_id = getattr(user_api_key_auth, "user_id", None) if user_api_key_auth else None
+ submitter_user_id: str | None = getattr(user_api_key_auth, "user_id", None) if user_api_key_auth else None
if not submitter_user_id:
return []
@@ -2551,10 +2669,10 @@ class MCPServerManager:
try:
from litellm.proxy.proxy_server import user_api_key_cache
- in_mem = getattr(user_api_key_cache, "in_memory_cache", None)
+ in_mem: InMemoryCache | None = getattr(user_api_key_cache, "in_memory_cache", None)
if in_mem is None:
return
- cache_dict = getattr(in_mem, "cache_dict", {})
+ cache_dict: _InMemoryCacheDict = getattr(in_mem, "cache_dict", {})
if toolset_id is None:
keys_to_remove = [k for k in cache_dict if k.startswith("toolset_")]
else:
@@ -2574,9 +2692,9 @@ class MCPServerManager:
async def get_toolset_by_name_cached(
self,
- prisma_client: Any,
+ prisma_client: PrismaClient,
toolset_name: str,
- ) -> Optional[Any]:
+ ) -> "Optional[MCPToolset]":
"""Return a toolset by name, cached in ``user_api_key_cache`` (Redis-backed
``DualCache`` in production) to avoid a DB hit on every routed request.
@@ -2803,7 +2921,7 @@ class MCPServerManager:
and report ``unknown`` instead of a misleading ``unhealthy``.
"""
static_headers = server.static_headers
- env_vars = getattr(server, "env_vars", None)
+ env_vars: _EnvVarList | None = getattr(server, "env_vars", None)
if not static_headers or not env_vars:
return False
_global_values, user_specs = parse_admin_env_vars(env_vars)
@@ -2929,7 +3047,7 @@ class MCPServerManager:
"""
if user_api_key_auth is None:
return {}
- user_id = getattr(user_api_key_auth, "user_id", None)
+ user_id: str | None = getattr(user_api_key_auth, "user_id", None)
if not user_id:
return {}
@@ -2976,7 +3094,7 @@ class MCPServerManager:
match await provider.resolve_credentials(to_subject(user_api_key_auth, subject_token), spec):
case Ok(auth):
# NoOpAuth has no header_name and so never conflicts.
- header_name = getattr(auth, "header_name", None)
+ header_name: str | None = getattr(auth, "header_name", None)
conflicts = bool(
header_name and extra_headers and any(key.lower() == header_name.lower() for key in extra_headers)
)
@@ -3546,7 +3664,7 @@ class MCPServerManager:
self,
server: MCPServer,
prompt_name: str,
- arguments: Optional[dict[str, Any]] = None,
+ arguments: Optional[dict[str, str]] = None,
mcp_auth_header: Optional[Union[str, dict[str, str]]] = None,
extra_headers: Optional[dict[str, str]] = None,
raw_headers: Optional[dict[str, str]] = None,
@@ -3606,7 +3724,7 @@ class MCPServerManager:
and base_port == target_port
)
- async def _fetch_oauth_discovery_url(self, url: str, server_url: str) -> Any:
+ async def _fetch_oauth_discovery_url(self, url: str, server_url: str) -> httpx.Response:
client = get_async_httpx_client(
llm_provider=httpxSpecialProvider.MCP,
params={"timeout": MCP_METADATA_TIMEOUT},
@@ -3807,7 +3925,7 @@ class MCPServerManager:
try:
response = await self._fetch_oauth_discovery_url(resource_metadata_url, server_url)
response.raise_for_status()
- data = response.json()
+ data: _ProtectedResourceMetadataPayload = response.json()
except SSRFError as exc:
verbose_logger.warning(
"MCP OAuth discovery: refusing to fetch resource metadata from %s "
@@ -3932,7 +4050,7 @@ class MCPServerManager:
try:
response = await self._fetch_oauth_discovery_url(url, server_url)
response.raise_for_status()
- data = response.json()
+ data: _AuthorizationServerMetadataPayload = response.json()
except SSRFError as exc:
verbose_logger.warning(
"MCP OAuth discovery: refusing to fetch authorization-server "
@@ -3993,7 +4111,7 @@ class MCPServerManager:
@staticmethod
def _build_azure_authorization_server_metadata(
- parsed_issuer_url: Any,
+ parsed_issuer_url: ParseResult,
) -> Optional[MCPOAuthMetadata]:
path_parts = [part for part in (parsed_issuer_url.path or "").split("/") if part]
if parsed_issuer_url.netloc not in _AZURE_ENTRA_HOSTS or len(path_parts) != 2 or path_parts[1] != "v2.0":
@@ -4054,7 +4172,7 @@ class MCPServerManager:
"aws_session_name": credentials_dict.get("aws_session_name"),
}
- def _extract_scopes(self, scopes_value: Any) -> Optional[list[str]]:
+ def _extract_scopes(self, scopes_value: str | Sequence[object] | None) -> Optional[list[str]]:
if isinstance(scopes_value, str):
scopes = [s.strip() for s in scopes_value.split() if s.strip()]
return scopes or None
@@ -4292,7 +4410,7 @@ class MCPServerManager:
return match_known_tool_name(tool_name, server, server.allowed_tools or ()) is not None
return match_known_tool_name(tool_name, server, server.disallowed_tools or ()) is None
- def validate_allowed_params(self, tool_name: str, arguments: dict[str, Any], server: MCPServer) -> None:
+ def validate_allowed_params(self, tool_name: str, arguments: _ToolArguments, server: MCPServer) -> None:
"""
Filter arguments to only include allowed parameters for the given tool.
@@ -4373,7 +4491,7 @@ class MCPServerManager:
self,
server: MCPServer,
tool_name: str,
- arguments: dict[str, Any],
+ arguments: _ToolArguments,
) -> CallToolResult:
"""
Call an OpenAPI tool handler directly.
@@ -4436,13 +4554,18 @@ class MCPServerManager:
arguments: dict[str, Any],
server_name: str,
user_api_key_auth: Optional[UserAPIKeyAuth],
- proxy_logging_obj: ProxyLogging,
+ proxy_logging_obj: ProxyLogging | None,
server: MCPServer,
raw_headers: Optional[dict[str, str]] = None,
) -> dict[str, Any]:
"""
Run pre-call checks and guardrail hooks for an MCP tool call.
+ Authorization runs unconditionally; only the guardrail hooks, which are
+ dispatched through ``proxy_logging_obj``, depend on a logger being
+ present. An absent logger must never be able to turn an authorization
+ decision into a no-op.
+
Returns a dict that may contain:
- "arguments": hook-modified tool arguments (only if changed)
- "extra_headers": headers injected by pre_mcp_call guardrail hooks
@@ -4470,6 +4593,10 @@ class MCPServerManager:
server=server,
)
+ hook_result: dict[str, Any] = {}
+ if proxy_logging_obj is None:
+ return hook_result
+
# Extract incoming Bearer token from raw request headers so
# guardrails like MCPJWTSigner can verify + re-sign it (FR-5).
normalized_raw = {k.lower(): v for k, v in (raw_headers or {}).items()}
@@ -4499,7 +4626,6 @@ class MCPServerManager:
# Convert to LLM format for existing guardrail compatibility
synthetic_llm_data = proxy_logging_obj._convert_mcp_to_llm_format(mcp_request_obj, pre_hook_kwargs)
- hook_result: dict[str, Any] = {}
try:
# Use standard pre_call_hook
modified_data = await proxy_logging_obj.pre_call_hook(
@@ -4529,7 +4655,7 @@ class MCPServerManager:
def _create_during_hook_task(
self,
name: str,
- arguments: dict[str, Any],
+ arguments: _ToolArguments,
server_name_from_prefix: Optional[str],
user_api_key_auth: Optional[UserAPIKeyAuth],
proxy_logging_obj: ProxyLogging,
@@ -4628,7 +4754,7 @@ class MCPServerManager:
self,
mcp_server: MCPServer,
original_tool_name: str,
- arguments: dict[str, Any],
+ arguments: _ToolArguments,
tasks: list,
mcp_auth_header: Optional[str],
mcp_server_auth_headers: Optional[dict[str, dict[str, str]]],
@@ -4982,7 +5108,7 @@ class MCPServerManager:
# shadow the resolver, double-resolving and hiding the per-server challenge.
return oauth2_headers
- user_id = getattr(user_api_key_auth, "user_id", None)
+ user_id: str | None = getattr(user_api_key_auth, "user_id", None)
if not user_id:
return oauth2_headers
@@ -5083,7 +5209,7 @@ class MCPServerManager:
self,
server_name: str,
name: str,
- arguments: dict[str, Any],
+ arguments: _ToolArguments,
user_api_key_auth: Optional[UserAPIKeyAuth] = None,
mcp_auth_header: Optional[str] = None,
mcp_server_auth_headers: Optional[dict[str, dict[str, str]]] = None,
@@ -5125,19 +5251,17 @@ class MCPServerManager:
# Allow validation and modification of tool calls before execution
# Using standard pre_call_hook
#########################################################
- hook_result: dict[str, Any] = {}
- if proxy_logging_obj:
- hook_result = await self.pre_call_tool_check(
- name=name,
- arguments=arguments,
- server_name=server_name,
- user_api_key_auth=user_api_key_auth,
- proxy_logging_obj=proxy_logging_obj,
- server=mcp_server,
- raw_headers=raw_headers,
- )
- if "arguments" in hook_result:
- arguments = hook_result["arguments"]
+ hook_result: dict[str, Any] = await self.pre_call_tool_check(
+ name=name,
+ arguments=arguments,
+ server_name=server_name,
+ user_api_key_auth=user_api_key_auth,
+ proxy_logging_obj=proxy_logging_obj,
+ server=mcp_server,
+ raw_headers=raw_headers,
+ )
+ if "arguments" in hook_result:
+ arguments = hook_result["arguments"]
# Prepare tasks for during hooks
tasks = []
@@ -5324,7 +5448,7 @@ class MCPServerManager:
# Pending/rejected servers are excluded at the DB level so we never load them.
from litellm.proxy._experimental.mcp_server.db import LiteLLM_MCPServerTable
- raw_rows = await MCPServerRepository(prisma_client).table.find_many(
+ raw_rows: Sequence[BaseModel] = await MCPServerRepository(prisma_client).table.find_many(
where={
"OR": [
{"approval_status": None},
@@ -5830,7 +5954,7 @@ class MCPServerManager:
@staticmethod
def _env_vars_to_models(
- env_vars: Optional[list[dict[str, Any]]],
+ env_vars: Optional[_EnvVarList],
) -> Optional[list[MCPEnvVar]]:
if env_vars is None:
return None
diff --git a/litellm/proxy/_experimental/mcp_server/sampling_handler.py b/litellm/proxy/_experimental/mcp_server/sampling_handler.py
index 65630f74e90..5bad530f37b 100644
--- a/litellm/proxy/_experimental/mcp_server/sampling_handler.py
+++ b/litellm/proxy/_experimental/mcp_server/sampling_handler.py
@@ -10,16 +10,23 @@ MCP Spec Reference:
https://modelcontextprotocol.io/specification/2025-11-25/client/sampling
"""
-from typing import Any, Dict, List, Optional, Union
import typing
+from collections.abc import Mapping, Sequence
+from typing import Any, Dict, List, NamedTuple, Optional, Protocol, Union
if typing.TYPE_CHECKING:
+ from fastapi import Request
+ from mcp.client.session import ClientSession
+ from mcp.shared.context import RequestContext
+ from mcp.types import ContentBlock, SamplingMessageContentBlock
+
+ from litellm.proxy._types import UserAPIKeyAuth
from litellm.proxy.utils import ProxyLogging
-from litellm._logging import verbose_logger
-
from fastapi import HTTPException
+from litellm._logging import verbose_logger
+
# Guard imports that require the mcp package
try:
from mcp.types import (
@@ -65,7 +72,7 @@ def _resolve_model_from_preferences(
import litellm
# Build list of available model names from proxy Router or litellm.model_list
- available_model_names: list = []
+ available_model_names: list[str] = []
try:
from litellm.proxy.proxy_server import llm_router
@@ -83,7 +90,7 @@ def _resolve_model_from_preferences(
available_model_names.append(entry)
if model_preferences and model_preferences.hints:
for hint in model_preferences.hints:
- hint_name = getattr(hint, "name", None)
+ hint_name: str | None = getattr(hint, "name", None)
if not hint_name:
continue
# Try direct match first
@@ -133,7 +140,7 @@ def _resolve_model_from_preferences(
)
return available_model_names[0]
# Last resort - use LiteLLM default or raise error
- default_sampling_model = getattr(litellm, "default_mcp_sampling_model", None)
+ default_sampling_model: str | None = getattr(litellm, "default_mcp_sampling_model", None)
if default_sampling_model:
verbose_logger.debug(
"MCP sampling model resolution: using litellm.default_mcp_sampling_model='%s'",
@@ -153,6 +160,13 @@ def _has_priorities(model_preferences: "ModelPreferences") -> bool:
)
+class _ScoredModel(NamedTuple):
+ name: str
+ cost: float
+ max_output: float
+ output_tps: float
+
+
def _select_model_by_priority(
model_names: List[str],
model_preferences: "ModelPreferences",
@@ -183,12 +197,12 @@ def _select_model_by_priority(
"""
import litellm as _litellm
- cost_weight = getattr(model_preferences, "costPriority", None) or 0.0
- speed_weight = getattr(model_preferences, "speedPriority", None) or 0.0
- intel_weight = getattr(model_preferences, "intelligencePriority", None) or 0.0
+ cost_weight: float = getattr(model_preferences, "costPriority", None) or 0.0
+ speed_weight: float = getattr(model_preferences, "speedPriority", None) or 0.0
+ intel_weight: float = getattr(model_preferences, "intelligencePriority", None) or 0.0
# Gather raw metrics for each model
- scored: List[Dict[str, Any]] = []
+ scored: list[_ScoredModel] = []
for name in model_names:
try:
info = _litellm.get_model_info(name)
@@ -200,12 +214,12 @@ def _select_model_by_priority(
max_output = info.get("max_output_tokens") or info.get("max_tokens") or 0
output_tps = info.get("output_tokens_per_second") or 0.0
scored.append(
- {
- "name": name,
- "cost": total_cost,
- "max_output": max_output,
- "output_tps": output_tps,
- }
+ _ScoredModel(
+ name=name,
+ cost=total_cost,
+ max_output=max_output,
+ output_tps=output_tps,
+ )
)
if not scored:
@@ -222,9 +236,9 @@ def _select_model_by_priority(
normed = [1.0 - n for n in normed]
return normed
- costs = [s["cost"] for s in scored]
- max_outputs = [float(s["max_output"]) for s in scored]
- output_tps_values = [s["output_tps"] for s in scored]
+ costs = [s.cost for s in scored]
+ max_outputs = [float(s.max_output) for s in scored]
+ output_tps_values = [s.output_tps for s in scored]
# costPriority: lower cost → higher score (invert)
cost_scores = _normalise(costs, invert=True)
@@ -243,7 +257,7 @@ def _select_model_by_priority(
score = cost_weight * cost_scores[i] + speed_weight * speed_scores[i] + intel_weight * intel_scores[i]
verbose_logger.debug(
"MCP priority scoring: model=%s cost_score=%.3f speed_score=%.3f intel_score=%.3f → weighted=%.3f",
- entry["name"],
+ entry.name,
cost_scores[i],
speed_scores[i],
intel_scores[i],
@@ -251,14 +265,14 @@ def _select_model_by_priority(
)
if score > best_score:
best_score = score
- best_name = entry["name"]
+ best_name = entry.name
return best_name
def _convert_mcp_content_to_openai(
- content: Any,
-) -> Union[str, Dict[str, Any], List[Dict[str, Any]]]:
+ content: "SamplingMessageContentBlock | Sequence[SamplingMessageContentBlock]",
+) -> "str | dict[str, object] | list[dict[str, object]]":
"""
Convert MCP SamplingMessage content to OpenAI message content format.
Handles:
@@ -283,7 +297,7 @@ def _convert_mcp_content_to_openai(
def _convert_single_content(
content: Any,
-) -> Union[Dict[str, Any], List[Dict[str, Any]]]:
+) -> "dict[str, object] | list[dict[str, object]]":
"""Convert a single MCP content item to OpenAI format.
For text/image/audio content, returns a single content-part dict.
@@ -339,7 +353,7 @@ def _convert_single_content(
# Marked so the message-level converter can emit it as a
# separate ``{"role": "tool", ...}`` message.
tool_use_id = getattr(content, "toolUseId", "")
- nested_content = getattr(content, "content", [])
+ nested_content: Sequence[ContentBlock] = getattr(content, "content", [])
if isinstance(nested_content, list):
text_parts = [getattr(c, "text", str(c)) for c in nested_content if getattr(c, "type", None) == "text"]
result_text = "\n".join(text_parts) if text_parts else ""
@@ -358,7 +372,7 @@ def _convert_single_content(
def _convert_mcp_messages_to_openai(
messages: List["SamplingMessage"],
system_prompt: Optional[str] = None,
-) -> List[Dict[str, Any]]:
+) -> "Sequence[Mapping[str, object]]":
"""
Convert MCP SamplingMessage list to OpenAI messages format.
MCP messages use:
@@ -369,7 +383,7 @@ def _convert_mcp_messages_to_openai(
- role: "system" | "user" | "assistant" | "tool"
- content: str | list[content_part]
"""
- openai_messages: List[Dict[str, Any]] = []
+ openai_messages: list[Mapping[str, object]] = []
# Add system prompt if provided
if system_prompt:
openai_messages.append({"role": "system", "content": system_prompt})
@@ -380,7 +394,7 @@ def _convert_mcp_messages_to_openai(
if role == "assistant" and _has_tool_use(content):
tool_calls = _extract_tool_calls(content)
if tool_calls:
- openai_msg: Dict[str, Any] = {
+ openai_msg: dict[str, object] = {
"role": "assistant",
"tool_calls": tool_calls,
}
@@ -400,7 +414,7 @@ def _convert_mcp_messages_to_openai(
# tool_use / tool_result that slipped past the fast-path checks
# above (e.g. unexpected role, single non-list content).
converted = _convert_mcp_content_to_openai(content)
- converted_parts = (
+ converted_parts: Sequence[Mapping[str, object]] = (
converted if isinstance(converted, list) else ([converted] if isinstance(converted, dict) else [])
)
@@ -422,7 +436,7 @@ def _convert_mcp_messages_to_openai(
# Emit assistant message with tool_calls if any were found
if tool_call_markers:
- openai_msg_tc: Dict[str, Any] = {
+ openai_msg_tc: dict[str, object] = {
"role": "assistant",
"tool_calls": tool_call_markers,
}
@@ -442,21 +456,25 @@ def _convert_mcp_messages_to_openai(
return openai_messages
-def _has_tool_use(content: Any) -> bool:
+def _has_tool_use(content: "SamplingMessageContentBlock | Sequence[SamplingMessageContentBlock]") -> bool:
"""Check if content contains ToolUseContent."""
if isinstance(content, list):
return any(getattr(c, "type", None) == "tool_use" for c in content)
- return getattr(content, "type", None) == "tool_use"
+ content_type: str | None = getattr(content, "type", None)
+ return content_type == "tool_use"
-def _has_tool_result(content: Any) -> bool:
+def _has_tool_result(content: "SamplingMessageContentBlock | Sequence[SamplingMessageContentBlock]") -> bool:
"""Check if content contains ToolResultContent."""
if isinstance(content, list):
return any(getattr(c, "type", None) == "tool_result" for c in content)
- return getattr(content, "type", None) == "tool_result"
+ content_type: str | None = getattr(content, "type", None)
+ return content_type == "tool_result"
-def _extract_tool_calls(content: Any) -> List[Dict[str, Any]]:
+def _extract_tool_calls(
+ content: "SamplingMessageContentBlock | Sequence[SamplingMessageContentBlock]",
+) -> "Sequence[Mapping[str, object]]":
"""Extract OpenAI-format tool_calls from MCP ToolUseContent."""
import json
@@ -477,7 +495,9 @@ def _extract_tool_calls(content: Any) -> List[Dict[str, Any]]:
return tool_calls
-def _extract_text_parts(content: Any) -> Optional[str]:
+def _extract_text_parts(
+ content: "SamplingMessageContentBlock | Sequence[SamplingMessageContentBlock]",
+) -> Optional[str]:
"""Extract text parts from mixed content."""
items = content if isinstance(content, list) else [content]
texts = []
@@ -487,7 +507,9 @@ def _extract_text_parts(content: Any) -> Optional[str]:
return "\n".join(texts) if texts else None
-def _extract_tool_results(content: Any) -> List[Dict[str, Any]]:
+def _extract_tool_results(
+ content: "SamplingMessageContentBlock | Sequence[SamplingMessageContentBlock]",
+) -> "Sequence[Mapping[str, object]]":
"""Extract OpenAI-format tool messages from MCP ToolResultContent."""
items = content if isinstance(content, list) else [content]
results = []
@@ -495,7 +517,7 @@ def _extract_tool_results(content: Any) -> List[Dict[str, Any]]:
if getattr(item, "type", None) == "tool_result":
tool_use_id = getattr(item, "toolUseId", "")
# Extract text from nested content
- nested_content = getattr(item, "content", [])
+ nested_content: Sequence[ContentBlock] = getattr(item, "content", [])
if isinstance(nested_content, list):
text_parts = [getattr(c, "text", str(c)) for c in nested_content if getattr(c, "type", None) == "text"]
result_text = "\n".join(text_parts) if text_parts else ""
@@ -513,7 +535,7 @@ def _extract_tool_results(content: Any) -> List[Dict[str, Any]]:
def _convert_mcp_tools_to_openai(
tools: Optional[List["Tool"]],
-) -> Optional[List[Dict[str, Any]]]:
+) -> "Sequence[Mapping[str, object]] | None":
"""
Convert MCP Tool definitions to OpenAI function calling format.
MCP Tool: {name, description, inputSchema}
@@ -541,7 +563,7 @@ def _convert_mcp_tools_to_openai(
def _convert_mcp_tool_choice_to_openai(
tool_choice: Optional["ToolChoice"],
-) -> Optional[Union[str, Dict[str, Any]]]:
+) -> "str | None":
"""
Convert MCP ToolChoice to OpenAI tool_choice format.
MCP: {mode: "auto"} | {mode: "required"} | {mode: "none"}
@@ -559,8 +581,32 @@ def _convert_mcp_tool_choice_to_openai(
return "auto"
+class _SamplingResponseMessage(Protocol):
+ @property
+ def content(self) -> str | None: ...
+
+ @property
+ def tool_calls(self) -> Sequence[object] | None: ...
+
+
+class _SamplingResponseChoice(Protocol):
+ @property
+ def message(self) -> _SamplingResponseMessage: ...
+
+ @property
+ def finish_reason(self) -> str | None: ...
+
+
+class _SamplingCompletionResponse(Protocol):
+ @property
+ def choices(self) -> Sequence[_SamplingResponseChoice]: ...
+
+ @property
+ def model(self) -> str | None: ...
+
+
def _convert_openai_response_to_mcp_result(
- response: Any,
+ response: _SamplingCompletionResponse,
model_name: str,
) -> Union["CreateMessageResult", "CreateMessageResultWithTools", "ErrorData"]:
"""
@@ -593,12 +639,12 @@ def _convert_openai_response_to_mcp_result(
stop_reason = "maxTokens"
else:
stop_reason = "endTurn"
- actual_model = getattr(response, "model", model_name) or model_name
+ actual_model: str = getattr(response, "model", model_name) or model_name
# Check if response has tool calls
tool_calls = getattr(message, "tool_calls", None)
if tool_calls:
# Build ToolUseContent items
- content_parts: "List[Any]" = []
+ content_parts: list[SamplingMessageContentBlock] = []
# Include text content if present
if message.content:
content_parts.append(TextContent(type="text", text=message.content))
@@ -636,7 +682,7 @@ def _convert_openai_response_to_mcp_result(
)
-async def _check_model_access(model: str, user_api_key_auth: Any) -> Optional["ErrorData"]:
+async def _check_model_access(model: str, user_api_key_auth: "UserAPIKeyAuth | None") -> Optional["ErrorData"]:
"""Enforce model-permission checks for MCP sampling requests.
Runs the same authorization checks as ``/chat/completions``:
@@ -678,14 +724,14 @@ async def _check_model_access(model: str, user_api_key_auth: Any) -> Optional["E
try:
import litellm
from litellm.proxy.auth.auth_checks import (
+ _check_team_member_model_access,
can_key_call_model,
+ can_project_access_model,
can_team_access_model,
can_user_call_model,
- can_project_access_model,
- _check_team_member_model_access,
+ get_project_object,
get_team_object,
get_user_object,
- get_project_object,
)
try:
@@ -700,16 +746,20 @@ async def _check_model_access(model: str, user_api_key_auth: Any) -> Optional["E
llm_router=_llm_router,
)
- _team_id = getattr(user_api_key_auth, "team_id", None)
- _user_id = getattr(user_api_key_auth, "user_id", None)
- _project_id = getattr(user_api_key_auth, "project_id", None)
+ _team_id: str | None = getattr(user_api_key_auth, "team_id", None)
+ _user_id: str | None = getattr(user_api_key_auth, "user_id", None)
+ _project_id: str | None = getattr(user_api_key_auth, "project_id", None)
try:
from litellm.proxy.proxy_server import (
prisma_client as _prisma_client,
- user_api_key_cache as _user_api_key_cache,
+ )
+ from litellm.proxy.proxy_server import (
proxy_logging_obj as _proxy_logging_obj,
)
+ from litellm.proxy.proxy_server import (
+ user_api_key_cache as _user_api_key_cache,
+ )
except ImportError:
_prisma_client = None
_user_api_key_cache = None # type: ignore[assignment]
@@ -799,7 +849,7 @@ async def _check_model_access(model: str, user_api_key_auth: Any) -> Optional["E
async def _run_budget_checks(
model: str,
- user_api_key_auth: Any,
+ user_api_key_auth: "UserAPIKeyAuth",
raw_headers: Optional[Dict[str, str]] = None,
client_ip: Optional[str] = None,
) -> Optional["ErrorData"]:
@@ -811,25 +861,33 @@ async def _run_budget_checks(
Returns None if all checks pass, or an ErrorData describing the denial.
"""
try:
- from litellm.proxy.auth.auth_checks import common_checks
- from litellm.proxy.proxy_server import (
- general_settings,
- llm_router as _llm_router,
- prisma_client as _prisma_client,
- proxy_logging_obj as _proxy_logging_obj,
- user_api_key_cache as _user_api_key_cache,
- )
+ import litellm
from litellm.proxy.auth.auth_checks import (
+ common_checks,
get_team_object,
get_user_object,
)
- import litellm
+ from litellm.proxy.proxy_server import (
+ general_settings,
+ )
+ from litellm.proxy.proxy_server import (
+ llm_router as _llm_router,
+ )
+ from litellm.proxy.proxy_server import (
+ prisma_client as _prisma_client,
+ )
+ from litellm.proxy.proxy_server import (
+ proxy_logging_obj as _proxy_logging_obj,
+ )
+ from litellm.proxy.proxy_server import (
+ user_api_key_cache as _user_api_key_cache,
+ )
except ImportError as import_err:
verbose_logger.warning("MCP sampling: budget check imports unavailable: %s", import_err)
return None # Can't enforce budgets without the modules
- _team_id = getattr(user_api_key_auth, "team_id", None)
- _user_id = getattr(user_api_key_auth, "user_id", None)
+ _team_id: str | None = getattr(user_api_key_auth, "team_id", None)
+ _user_id: str | None = getattr(user_api_key_auth, "user_id", None)
team_obj = None
if _team_id and _prisma_client and _user_api_key_cache:
@@ -889,7 +947,7 @@ async def _run_budget_checks(
# common_checks runs. _tag_max_budget_check inside common_checks only
# inspects request_body; without this pre-merge, header-supplied tags
# bypass per-tag budget enforcement (mirroring the regular auth path).
- request_body: Dict[str, Any] = {"model": model}
+ request_body: dict[str, object] = {"model": model}
try:
from litellm.proxy.litellm_pre_call_utils import LiteLLMProxyRequestSetup
@@ -935,7 +993,7 @@ async def _run_budget_checks(
def _build_sampling_request(
raw_headers: Optional[Dict[str, str]] = None,
client_ip: Optional[str] = None,
-) -> Any:
+) -> "Request":
"""Build a synthetic FastAPI Request for sampling sub-calls.
Converts the original MCP connection's HTTP headers into ASGI
@@ -961,7 +1019,7 @@ def _build_sampling_request(
from fastapi import Request
# --- Build ASGI headers ---
- _scope_headers: list = [(b"content-type", b"application/json")]
+ _scope_headers: list[tuple[bytes, bytes]] = [(b"content-type", b"application/json")]
# Hop-by-hop headers that must NOT be forwarded into the
# synthetic request (they describe the original HTTP framing,
# not the logical request).
@@ -1001,8 +1059,8 @@ def _build_sampling_request(
try:
import litellm.proxy.proxy_server as proxy_server
- _proxy_host = getattr(proxy_server, "server_host", None)
- _proxy_port = getattr(proxy_server, "server_port", None)
+ _proxy_host: str | None = getattr(proxy_server, "server_host", None)
+ _proxy_port: str | int | None = getattr(proxy_server, "server_port", None)
if _proxy_host:
_server_host = str(_proxy_host)
@@ -1016,7 +1074,7 @@ def _build_sampling_request(
if client_ip:
_client_tuple = (client_ip, 0)
- scope: Dict[str, Any] = {
+ scope: dict[str, object] = {
"type": "http",
"method": "POST",
"path": "/mcp/sampling/createMessage",
@@ -1035,7 +1093,7 @@ def _build_sampling_request(
async def _build_completion_kwargs(
params: "CreateMessageRequestParams",
model: str,
- user_api_key_auth: Any,
+ user_api_key_auth: "UserAPIKeyAuth",
raw_headers: Optional[Dict[str, str]],
client_ip: Optional[str],
) -> Dict[str, Any]:
@@ -1078,7 +1136,7 @@ async def _build_completion_kwargs(
async def _run_guardrails_and_call_llm(
completion_kwargs: Dict[str, Any],
- user_api_key_auth: Any,
+ user_api_key_auth: "UserAPIKeyAuth",
) -> Any:
try:
from litellm.proxy.proxy_server import proxy_logging_obj as _plo
@@ -1111,10 +1169,10 @@ async def _run_guardrails_and_call_llm(
async def handle_sampling_create_message(
- context: Any,
+ context: "RequestContext[ClientSession, object]",
params: "CreateMessageRequestParams",
default_model: Optional[str] = None,
- user_api_key_auth: Optional[Any] = None,
+ user_api_key_auth: "UserAPIKeyAuth | None" = None,
raw_headers: Optional[Dict[str, str]] = None,
client_ip: Optional[str] = None,
) -> Union["CreateMessageResult", "CreateMessageResultWithTools", "ErrorData"]:
@@ -1184,7 +1242,7 @@ async def handle_sampling_create_message(
client_ip=client_ip,
)
- openai_messages = completion_kwargs["messages"]
+ openai_messages: Sequence[Mapping[str, object]] = completion_kwargs["messages"]
openai_tools = completion_kwargs.get("tools")
verbose_logger.debug(
"MCP sampling: calling litellm.acompletion with model=%s, num_messages=%d, has_tools=%s",
@@ -1193,7 +1251,7 @@ async def handle_sampling_create_message(
bool(openai_tools),
)
- response = await _run_guardrails_and_call_llm(
+ response: _SamplingCompletionResponse = await _run_guardrails_and_call_llm(
completion_kwargs=completion_kwargs,
user_api_key_auth=user_api_key_auth,
)
@@ -1214,7 +1272,6 @@ async def handle_sampling_create_message(
RateLimitError,
ServiceUnavailableError,
)
-
from litellm.proxy._types import ProxyException
if isinstance(
diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.py
index 48effdb0f6e..d8431b9b3bb 100644
--- a/litellm/proxy/_experimental/mcp_server/server.py
+++ b/litellm/proxy/_experimental/mcp_server/server.py
@@ -2902,6 +2902,54 @@ if MCP_AVAILABLE:
# Deprecated: Local MCP Server Tool
#########################################################
else:
+ # Gate only what can actually dispatch. When the unprefixed name is
+ # not in the registry either, `_handle_local_mcp_tool` below reports
+ # 404 and nothing runs, so demanding a server here would turn every
+ # unknown tool name into a misleading 503.
+ if global_mcp_tool_registry.get_tool(original_tool_name) is not None:
+ # `mcp_server` is None here because the tool name is not in the
+ # tool -> server mapping, but the name still carries a prefix
+ # that the server-level check above compared against the
+ # caller's `allowed_mcp_servers` by exact `name`. So the named
+ # server is in that list and can carry the tool-level checks,
+ # even with the mapping cold. Resolve it from
+ # `allowed_mcp_servers` rather than the registry: the registry
+ # would happily return a server the caller holds no grant for,
+ # and matching anything other than `name` would accept a server
+ # the check never validated.
+ prefix_server = next(
+ (candidate for candidate in allowed_mcp_servers if candidate.name == server_name),
+ None,
+ )
+ if prefix_server is None:
+ # A non-empty prefix that passed the server-level check
+ # always matches here, so this arm only fires when the
+ # prefix was empty, which is exactly the case that check
+ # skips. Fail closed rather than dispatch with no server to
+ # evaluate a tool ceiling against.
+ raise HTTPException(
+ status_code=503,
+ detail=(
+ f"MCP server for tool '{original_tool_name}' is not available; "
+ "refusing to dispatch without authorization checks. "
+ "Retry once the server is registered."
+ ),
+ )
+
+ from litellm.proxy.proxy_server import proxy_logging_obj
+
+ hook_result = await global_mcp_server_manager.pre_call_tool_check(
+ name=original_tool_name,
+ arguments=arguments,
+ server_name=server_name,
+ user_api_key_auth=user_api_key_auth,
+ proxy_logging_obj=proxy_logging_obj,
+ server=prefix_server,
+ raw_headers=raw_headers,
+ )
+ if "arguments" in hook_result:
+ arguments = hook_result["arguments"] # pyright: ignore[reportAny] # hook returns untyped args
+
local_content = await _handle_local_mcp_tool(original_tool_name, arguments)
response = CallToolResult(content=cast(Any, local_content), isError=False)
diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html
index 0a164642dab..954cf7c6041 100644
--- a/litellm/proxy/_experimental/out/404.html
+++ b/litellm/proxy/_experimental/out/404.html
@@ -1 +1 @@
-
404: This page could not be found. LiteLLM Dashboard
404
This page could not be found.
\ No newline at end of file
+404: This page could not be found. LiteLLM Dashboard
404
This page could not be found.
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/404/index.html b/litellm/proxy/_experimental/out/404/index.html
index 0a164642dab..954cf7c6041 100644
--- a/litellm/proxy/_experimental/out/404/index.html
+++ b/litellm/proxy/_experimental/out/404/index.html
@@ -1 +1 @@
-404: This page could not be found. LiteLLM Dashboard
404
This page could not be found.
\ No newline at end of file
+404: This page could not be found. LiteLLM Dashboard
404
This page could not be found.
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt
index c10ced8b6bc..583f4376e5b 100644
--- a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt
+++ b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt
@@ -1,9 +1,9 @@
1:"$Sreact.fragment"
-2:I[347257,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientPageRoot"]
-3:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js"],"default"]
-6:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"OutletBoundary"]
+2:I[347257,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientPageRoot"]
+3:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/28md7sjkucknx.js","/litellm-asset-prefix/_next/static/chunks/2x96scis66zmk.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/1azbeyb626rh5.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/0vvnul8uez9kj.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/17gy9d71tfqhd.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/0kx52ovlpa34x.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/2vnpyhxoamx0f.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/3ib18qm2ox61z.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/1abwfud5uqxxq.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/31cwj7vkk3gfz.js","/litellm-asset-prefix/_next/static/chunks/111jj26rg98nb.js","/litellm-asset-prefix/_next/static/chunks/3pu9plov1btip.js","/litellm-asset-prefix/_next/static/chunks/1l1182ye657-m.js","/litellm-asset-prefix/_next/static/chunks/1lndy6n7cwvrq.js","/litellm-asset-prefix/_next/static/chunks/2kt_m68ln2fyr.js","/litellm-asset-prefix/_next/static/chunks/0onjeur4drmh-.js"],"default"]
+6:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"OutletBoundary"]
7:"$Sreact.suspense"
-0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"}
+0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0kx52ovlpa34x.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2vnpyhxoamx0f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3ib18qm2ox61z.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1abwfud5uqxxq.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/31cwj7vkk3gfz.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/111jj26rg98nb.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/3pu9plov1btip.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1l1182ye657-m.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/1lndy6n7cwvrq.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/2kt_m68ln2fyr.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0onjeur4drmh-.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"8bC_aTV0H1nUtrFDXkfaB"}
4:{}
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
8:null
diff --git a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt
index ef8a75b27ce..ec0a813adc3 100644
--- a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt
+++ b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt
@@ -1,7 +1,7 @@
1:"$Sreact.fragment"
-2:I[92825,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientSegmentRoot"]
-3:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js"],"default"]
-4:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-5:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-0:{"rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","async":true}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"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"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"}
+2:I[92825,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientSegmentRoot"]
+3:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/28md7sjkucknx.js","/litellm-asset-prefix/_next/static/chunks/2x96scis66zmk.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/1azbeyb626rh5.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/0vvnul8uez9kj.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/17gy9d71tfqhd.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js"],"default"]
+4:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+5:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+0:{"rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/28md7sjkucknx.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2x96scis66zmk.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1azbeyb626rh5.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0vvnul8uez9kj.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/17gy9d71tfqhd.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"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"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"8bC_aTV0H1nUtrFDXkfaB"}
6:"$0:rsc:props:children:1:props:serverProvidedParams:params"
diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt
index 3ee486db39b..8b9e5e629da 100644
--- a/litellm/proxy/_experimental/out/__next._full.txt
+++ b/litellm/proxy/_experimental/out/__next._full.txt
@@ -1,32 +1,32 @@
1:"$Sreact.fragment"
-2:I[867271,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-3:I[71195,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-4:I[557951,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"AuthProvider"]
-5:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-6:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-7:I[92825,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientSegmentRoot"]
-8:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js"],"default"]
-e:I[168027,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default",1]
+2:I[867271,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+3:I[71195,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+4:I[557951,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"AuthProvider"]
+5:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+6:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+7:I[92825,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientSegmentRoot"]
+8:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/28md7sjkucknx.js","/litellm-asset-prefix/_next/static/chunks/2x96scis66zmk.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/1azbeyb626rh5.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/0vvnul8uez9kj.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/17gy9d71tfqhd.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js"],"default"]
+e:I[168027,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default",1]
:HL["/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","style"]
+:HL["/litellm-asset-prefix/_next/static/chunks/169bqf_mz3j8m.css","style"]
:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.2bn3s6zvc0dyp.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
-0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"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"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","async":true,"nonce":"$undefined"}]],["$","$L7",null,{"Component":"$8","slots":{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$La","forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@b"]}}]]}],{"children":["$Lc",{},null,false,null]},null,false,null]},null,false,null],"$Ld",false]],"m":"$undefined","G":["$e",["$Lf","$L10"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"qXutWsQW5C1Pf62WxTkEI"}
-11:I[347257,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientPageRoot"]
-12:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js"],"default"]
-15:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"OutletBoundary"]
+0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/169bqf_mz3j8m.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"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"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/28md7sjkucknx.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2x96scis66zmk.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1azbeyb626rh5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0vvnul8uez9kj.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/17gy9d71tfqhd.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true,"nonce":"$undefined"}]],["$","$L7",null,{"Component":"$8","slots":{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$La","forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@b"]}}]]}],{"children":["$Lc",{},null,false,null]},null,false,null]},null,false,null],"$Ld",false]],"m":"$undefined","G":["$e",["$Lf","$L10"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"8bC_aTV0H1nUtrFDXkfaB"}
+11:I[347257,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientPageRoot"]
+12:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/28md7sjkucknx.js","/litellm-asset-prefix/_next/static/chunks/2x96scis66zmk.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/1azbeyb626rh5.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/0vvnul8uez9kj.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/17gy9d71tfqhd.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/0kx52ovlpa34x.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/2vnpyhxoamx0f.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/3ib18qm2ox61z.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/1abwfud5uqxxq.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/31cwj7vkk3gfz.js","/litellm-asset-prefix/_next/static/chunks/111jj26rg98nb.js","/litellm-asset-prefix/_next/static/chunks/3pu9plov1btip.js","/litellm-asset-prefix/_next/static/chunks/1l1182ye657-m.js","/litellm-asset-prefix/_next/static/chunks/1lndy6n7cwvrq.js","/litellm-asset-prefix/_next/static/chunks/2kt_m68ln2fyr.js","/litellm-asset-prefix/_next/static/chunks/0onjeur4drmh-.js"],"default"]
+15:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"OutletBoundary"]
16:"$Sreact.suspense"
-18:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ViewportBoundary"]
-1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"MetadataBoundary"]
+18:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ViewportBoundary"]
+1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"MetadataBoundary"]
9:["$","$L6",null,{}]
a:[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]]
-c:["$","$1","c",{"children":[["$","$L11",null,{"Component":"$12","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@13","$@14"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","async":true,"nonce":"$undefined"}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true,"nonce":"$undefined"}]],["$","$L15",null,{"children":["$","$16",null,{"name":"Next.MetadataOutlet","children":"$@17"}]}]]}]
+c:["$","$1","c",{"children":[["$","$L11",null,{"Component":"$12","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@13","$@14"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0kx52ovlpa34x.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2vnpyhxoamx0f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3ib18qm2ox61z.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1abwfud5uqxxq.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/31cwj7vkk3gfz.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/111jj26rg98nb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/3pu9plov1btip.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1l1182ye657-m.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/1lndy6n7cwvrq.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/2kt_m68ln2fyr.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0onjeur4drmh-.js","async":true,"nonce":"$undefined"}]],["$","$L15",null,{"children":["$","$16",null,{"name":"Next.MetadataOutlet","children":"$@17"}]}]]}]
d:["$","$1","h",{"children":[null,["$","$L18",null,{"children":"$L19"}],["$","div",null,{"hidden":true,"children":["$","$L1a",null,{"children":["$","$16",null,{"name":"Next.Metadata","children":"$L1b"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]
f:["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]
-10:["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]
+10:["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/169bqf_mz3j8m.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]
b:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params"
13:{}
14:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params"
19:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
-1c:I[27201,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"IconMark"]
+1c:I[27201,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"IconMark"]
17:null
1b:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3arlap5n8tyzg.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/get_favicon"}],["$","$L1c","4",{}]]
diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt
index 9b12cf54d0c..2a08c7adf14 100644
--- a/litellm/proxy/_experimental/out/__next._head.txt
+++ b/litellm/proxy/_experimental/out/__next._head.txt
@@ -1,6 +1,6 @@
1:"$Sreact.fragment"
-2:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ViewportBoundary"]
-3:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"MetadataBoundary"]
+2:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ViewportBoundary"]
+3:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
-5:I[27201,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"IconMark"]
-0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3arlap5n8tyzg.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/get_favicon"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"}
+5:I[27201,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"IconMark"]
+0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3arlap5n8tyzg.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/get_favicon"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"8bC_aTV0H1nUtrFDXkfaB"}
diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt
index 8649901b01b..365bbbdcfef 100644
--- a/litellm/proxy/_experimental/out/__next._index.txt
+++ b/litellm/proxy/_experimental/out/__next._index.txt
@@ -1,9 +1,9 @@
1:"$Sreact.fragment"
-2:I[867271,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-3:I[71195,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-4:I[557951,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"AuthProvider"]
-5:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
-6:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+2:I[867271,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+3:I[71195,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+4:I[557951,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"AuthProvider"]
+5:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
+6:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"]
:HL["/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","style"]
-0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","template":["$","$L6",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"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"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"}
+:HL["/litellm-asset-prefix/_next/static/chunks/169bqf_mz3j8m.css","style"]
+0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/169bqf_mz3j8m.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/32_ulchi2_aad.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","template":["$","$L6",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"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"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"8bC_aTV0H1nUtrFDXkfaB"}
diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt
index db0015f1f41..442efb21b45 100644
--- a/litellm/proxy/_experimental/out/__next._tree.txt
+++ b/litellm/proxy/_experimental/out/__next._tree.txt
@@ -1,4 +1,4 @@
:HL["/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","style"]
+:HL["/litellm-asset-prefix/_next/static/chunks/169bqf_mz3j8m.css","style"]
:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.2bn3s6zvc0dyp.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
-0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"(dashboard)","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"qXutWsQW5C1Pf62WxTkEI"}
+0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"(dashboard)","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"8bC_aTV0H1nUtrFDXkfaB"}
diff --git a/litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/8bC_aTV0H1nUtrFDXkfaB/_buildManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_buildManifest.js
rename to litellm/proxy/_experimental/out/_next/static/8bC_aTV0H1nUtrFDXkfaB/_buildManifest.js
diff --git a/litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_clientMiddlewareManifest.js b/litellm/proxy/_experimental/out/_next/static/8bC_aTV0H1nUtrFDXkfaB/_clientMiddlewareManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_clientMiddlewareManifest.js
rename to litellm/proxy/_experimental/out/_next/static/8bC_aTV0H1nUtrFDXkfaB/_clientMiddlewareManifest.js
diff --git a/litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/8bC_aTV0H1nUtrFDXkfaB/_ssgManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_ssgManifest.js
rename to litellm/proxy/_experimental/out/_next/static/8bC_aTV0H1nUtrFDXkfaB/_ssgManifest.js
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js b/litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js
deleted file mode 100644
index 248cab25929..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,263005,e=>{"use strict";var t=e.i(843476);e.s(["PageHeader",0,function({title:e,subtitle:a,icon:l,actions:i}){return(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[null!=l&&(0,t.jsx)("span",{className:"flex flex-none items-center text-foreground",children:l}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),null!=a&&(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:a})]})]}),null!=i&&(0,t.jsx)("div",{className:"flex items-center gap-2",children:i})]})}])},655063,e=>{"use strict";var t=e.i(399029),a=e.i(271645);e.s(["useDebouncedValue",0,function(e,l,i){let[r,s,n]=(0,t.useDebouncedState)(e,l,i);return(0,a.useEffect)(()=>{s(e)},[e,s]),[r,n]}])},624687,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(115504);let i=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,l.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(115504),i=e.i(519455),r=e.i(793479),s=e.i(624687);let n=(0,l.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,l.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=a.forwardRef(({className:e,type:a="button",variant:r="ghost",size:s="xs",...n},d)=>(0,t.jsx)(i.Button,{ref:d,type:a,"data-size":s,variant:r,className:(0,l.cn)(o({size:s}),e),...n}));d.displayName="InputGroupButton";let u=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Input,{ref:i,"data-slot":"input-group-control",className:(0,l.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a}));u.displayName="InputGroupInput",a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,l.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,l.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})},"InputGroupAddon",0,function({className:e,align:a="inline-start",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:(0,l.cn)(n({align:a}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...a}){return(0,t.jsx)("span",{className:(0,l.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}])},552546,e=>{"use strict";var t=e.i(843476),a=e.i(131792);let l=(e,t)=>{let a=t.trim().toLowerCase();return!a||e.label.toLowerCase().includes(a)||(e.sublabel?.toLowerCase().includes(a)??!1)};e.s(["SearchSelect",0,function({options:e,value:i,onValueChange:r,placeholder:s="Select…",emptyText:n="No results",disabled:o=!1,className:d}){let u=e.find(e=>e.value===i)??null;return(0,t.jsxs)(a.Combobox,{items:e,value:u,onValueChange:e=>r(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:l,disabled:o,children:[(0,t.jsx)(a.ComboboxInput,{placeholder:s,showClear:null!=i&&""!==i,className:`w-full ${d??""}`}),(0,t.jsxs)(a.ComboboxContent,{children:[(0,t.jsx)(a.ComboboxEmpty,{children:n}),(0,t.jsx)(a.ComboboxList,{children:e=>(0,t.jsx)(a.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},611363,e=>{"use strict";e.s(["navigateWithParams",0,function(e){let t=new URLSearchParams(window.location.search);e(t);let a=t.toString(),l=a?`${window.location.pathname}?${a}`:window.location.pathname;window.history.pushState(null,"",l)}])},502501,e=>{"use strict";var t=e.i(843476),a=e.i(785242),l=e.i(135214),i=e.i(268004),r=e.i(309426),s=e.i(350967),n=e.i(947293),o=e.i(271645),d=e.i(602869);let u=async(e,t,a,l,i)=>{i("Admin"!=a&&"Admin Viewer"!=a?await (0,d.teamListCall)(e,l?.organization_id||null,t):await (0,d.teamListCall)(e,l?.organization_id||null))};var c=e.i(702597),m=e.i(618566),g=e.i(611363),p=e.i(266027),x=e.i(207082),h=e.i(109799),f=e.i(741466);e.i(707701);var b=e.i(807235),v=e.i(981080),y=e.i(531649),_=e.i(552546),w=e.i(263005),k=e.i(793479),j=e.i(655063),S=e.i(465261),C=e.i(20147),I=e.i(827252),N=e.i(282786),z=e.i(898586),D=e.i(494862),T=e.i(302747);e.i(622826);var U=e.i(200208),E=e.i(399536),A=e.i(997422),R=e.i(547227),K=e.i(630500),V=e.i(112179),M=e.i(304911);let L=[{id:"spend",label:"Spend"},{id:"max_budget",label:"Budget"}],P=({userAlias:e,userEmail:a,userId:l,width:i})=>{let r=e||a||l,s="default_user_id"===l,n=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:e},{label:"User Email",value:a},{label:"User ID",value:l}].map(({label:e,value:a})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),a?(0,t.jsx)(z.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:a},copyable:!0,children:a}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!s||e||a?(0,t.jsx)(N.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:i,overflow:"hidden"},children:r||"-"})}):(0,t.jsx)(N.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(M.default,{userId:l})})})},B=({label:e,tooltip:a})=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[e,(0,t.jsx)(N.Popover,{content:a,trigger:"hover",children:(0,t.jsx)(I.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),O={token:!1,organization_alias:!1,created_by:!1,updated_at:!1,expires:!1,rate_limits:!1},F=[{id:"created_at",desc:!0}],G={team_id:"Team",org_id:"Organization",user_id:"User ID",key_hash:"Key ID"};function H({headerActions:e}){let i,r,s,{data:n}=(0,h.useOrganizations)(),u=(0,o.useMemo)(()=>n??[],[n]),{data:c}=(0,a.useAllTeams)(),I=(0,o.useMemo)(()=>c??[],[c]),{keyId:N,openKey:z,close:M}=(i=(0,m.useSearchParams)(),r=(0,o.useCallback)(e=>{(0,g.navigateWithParams)(t=>{t.set("key",e)})},[]),s=(0,o.useCallback)(()=>{(0,g.navigateWithParams)(e=>{e.delete("key")})},[]),{keyId:i?.get("key")??null,openKey:r,close:s}),[W,q]=(0,o.useState)(F),[$,J]=(0,o.useState)({pageIndex:0,pageSize:50}),[Q,X]=(0,o.useState)([]),[Y,Z]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(""),[ea]=(0,j.useDebouncedValue)(ee,{wait:f.DEBOUNCE_WAIT_MS}),el=(0,o.useCallback)(e=>{let t=Q.find(t=>t.id===e);return"string"==typeof t?.value&&t.value.trim()?t.value.trim():void 0},[Q]),ei=W[0]?.id,er=(e=>{let t=e[0];if(t)return t.desc?"desc":"asc"})(W),es={teamID:el("team_id"),organizationID:el("org_id"),selectedKeyAlias:ea.trim()||void 0,userID:el("user_id"),keyHash:el("key_hash"),sortBy:ei,sortOrder:er,expand:"user"},{data:en,isPending:eo,isFetching:ed,refetch:eu}=(0,x.useKeys)($.pageIndex+1,$.pageSize,es),ec=(0,o.useMemo)(()=>en?.keys??[],[en]),em=en?.total_count??0,eg=(0,o.useCallback)(e=>{et(e),J(e=>({...e,pageIndex:0}))},[]),ep=(0,o.useCallback)(e=>{q(e),J(e=>({...e,pageIndex:0}))},[]),ex=(0,o.useCallback)(e=>{X(e),J(e=>({...e,pageIndex:0}))},[]),eh=(0,o.useMemo)(()=>(({allTeams:e,organizations:a,onSelectKey:l})=>[{id:"key_alias",accessorKey:"key_alias",meta:{title:"Key",renderSkeleton:()=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,t.jsx)(T.Skeleton,{className:"h-4 w-32"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Skeleton,{className:"h-3 w-20"}),(0,t.jsx)(T.Skeleton,{className:"h-5 w-16 rounded-full"})]})]})},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Key",variant:"header-cycle"}),size:260,enableSorting:!0,cell:({row:e})=>{let a=(e=>{if(!0===e.blocked)return{tone:"error",label:"Blocked",tooltip:e.metadata?.scim_blocked===!0?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401."};let t=e.expires?Date.parse(e.expires):NaN;return!Number.isNaN(t)&&tl(e.original)})}},{id:"token",accessorKey:"token",meta:{title:"Key ID"},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Key ID",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(E.IdCell,{value:e.getValue(),onClick:()=>l(e.row.original)})},{id:"team_alias",accessorKey:"team_id",meta:{title:"Team"},header:"Team",size:120,enableSorting:!1,cell:a=>{let l=a.getValue();if(!l)return"-";let i=e.find(e=>e.team_id===l),r=i?.team_alias||l,s=a.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",meta:{title:"Organization"},header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let i=a.find(e=>e.organization_id===l),r=i?.organization_alias||l,s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:r})}},{id:"user",accessorKey:"user",meta:{title:"User"},header:()=>(0,t.jsx)(B,{label:"User",tooltip:"Displays the first available value: User Alias, User Email, or User ID."}),size:160,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsx)(P,{userAlias:a.user?.user_alias??null,userEmail:a.user?.user_email??a.user_email??null,userId:a.user_id??null,width:160})}},{id:"created_at",accessorKey:"created_at",meta:{title:"Created At"},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Created At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date"})},{id:"created_by",accessorKey:"created_by",meta:{title:"Created By"},header:"Created By",size:160,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"-";let l=e.row.original.created_by_user;return(0,t.jsx)(P,{userAlias:l?.user_alias??null,userEmail:l?.user_email??null,userId:a,width:160})}},{id:"updated_at",accessorKey:"updated_at",meta:{title:"Updated At"},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Updated At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"last_active",accessorKey:"last_active",meta:{title:"Last Active"},header:()=>(0,t.jsx)(B,{label:"Last Active",tooltip:"This is a new field and is not backfilled. Only new key usage will update this value."}),size:130,enableSorting:!1,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date",fallback:"Unknown"})},{id:"expires",accessorKey:"expires",meta:{title:"Expires"},header:"Expires",size:120,enableSorting:!1,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend / Budget",skeleton:"meter"},header:({table:e})=>(0,t.jsx)(D.DataTableMultiSortHeader,{table:e,fields:L}),size:180,enableSorting:!0,cell:({row:a})=>{let l=a.original.team_id,i=e.find(e=>e.team_id===l);return(0,t.jsx)(K.SpendBudgetCell,{spend:a.original.spend,maxBudget:a.original.max_budget,teamMaxBudget:i?.max_budget??null})}},{id:"budget_reset_at",accessorKey:"budget_reset_at",meta:{title:"Budget Reset"},header:"Budget Reset",size:130,enableSorting:!1,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),fallback:"Never"})},{id:"models",accessorKey:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:220,enableSorting:!1,cell:e=>(0,t.jsx)(R.ModelsCell,{models:e.getValue(),allowedRoutes:e.row.original.allowed_routes,keyType:e.row.original.key_type})},{id:"rate_limits",meta:{title:"Rate Limits"},header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}])({allTeams:I,organizations:u,onSelectKey:e=>z(e.token)}),[I,u,z]),ef=(0,o.useMemo)(()=>ec.find(e=>e.token===N),[ec,N]),{data:eb,isError:ev}=function(e,t){let{accessToken:a}=(0,l.default)();return(0,p.useQuery)({queryKey:[...x.keyKeys.detail(e??""),a],queryFn:async()=>{if(!a||!e)throw Error("Missing access token or key id");return{...(await (0,d.keyInfoV1Call)(a,e)).info,token:e,api_key:e}},enabled:!!(a&&e)&&(t?.enabled??!0)})}(N,{enabled:!ef}),ey=ef??eb,e_=(0,o.useMemo)(()=>I.map(e=>({label:e.team_alias||e.team_id,value:e.team_id,sublabel:e.team_alias?e.team_id:void 0})),[I]),ew=(0,o.useMemo)(()=>u.filter(e=>e.organization_id).map(e=>{let t=e.organization_id;return{label:e.organization_alias||t,value:t,sublabel:e.organization_alias?t:void 0}}),[u]),ek=(0,o.useCallback)((e,t)=>{let a=String(t);return"team_id"===e?I.find(e=>e.team_id===a)?.team_alias||a:"org_id"===e&&u.find(e=>e.organization_id===a)?.organization_alias||a},[I,u]);return N?ey||ev?(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsx)(C.default,{keyId:N,onClose:M,keyData:ey,teams:I,onDelete:eu})}):(0,t.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading key..."}):(0,t.jsxs)("div",{className:"flex h-full flex-col gap-4 overflow-hidden py-2",children:[(0,t.jsx)(w.PageHeader,{icon:(0,t.jsx)(S.KeyRound,{className:"size-5"}),title:"Virtual Keys",subtitle:"Every key that authenticates requests to the gateway."}),e,(0,t.jsx)(b.DataTable,{data:ec,columns:eh,getRowId:e=>e.token,defaultColumnVisibility:O,sortingMode:"server",sorting:W,onSortingChange:ep,paginationMode:"server",pagination:$,onPaginationChange:J,rowCount:em,filterMode:"server",columnFilters:Q,onColumnFiltersChange:ex,enableColumnResizing:!0,columnResizeMode:"onChange",isLoading:eo,loadingMessage:"Loading keys...",noDataMessage:"No keys found",maxBodyHeight:"calc(75vh - 210px)",size:"compact",toolbar:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.DataTableToolbar,{table:e,searchValue:ee,onSearchChange:eg,searchPlaceholder:"Search by key alias…",onRefresh:()=>eu?.(),isRefreshing:ed,onOpenFilters:()=>Z(!0),filterLabels:G,formatFilterValue:ek}),(0,t.jsx)(v.DataTableFilterDrawer,{table:e,open:Y,onOpenChange:Z,title:"Filters",description:"Narrow down virtual keys",children:({get:e,set:a})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.DataTableFilterField,{label:"Team",children:(0,t.jsx)(_.SearchSelect,{options:e_,value:e("team_id")||void 0,onValueChange:e=>a("team_id",e),placeholder:"Select a team…",emptyText:"No teams found"})}),(0,t.jsx)(v.DataTableFilterField,{label:"Organization",children:(0,t.jsx)(_.SearchSelect,{options:ew,value:e("org_id")||void 0,onValueChange:e=>a("org_id",e),placeholder:"Select an organization…",emptyText:"No organizations found"})}),(0,t.jsx)(v.DataTableFilterField,{label:"User ID",children:(0,t.jsx)(k.Input,{value:e("user_id")??"",onChange:e=>a("user_id",e.target.value),placeholder:"Enter User ID…"})}),(0,t.jsx)(v.DataTableFilterField,{label:"Key ID",children:(0,t.jsx)(k.Input,{value:e("key_hash")??"",onChange:e=>a("key_hash",e.target.value),placeholder:"Enter Key ID…"})})]})})]})})]})}let W=({userID:e,userRole:a,teams:l,keys:m,setUserRole:g,userEmail:p,setUserEmail:x,setTeams:h,setKeys:f,premiumUser:b,addKey:v,createClicked:y,autoOpenCreate:_,prefillData:w})=>{let[k,j]=(0,o.useState)(null),[S,C]=(0,o.useState)(null),I=(0,i.getCookie)("token"),[N,z]=(0,o.useState)(null),[D,T]=(0,o.useState)(null),[U,E]=(0,o.useState)([]),[A,R]=(0,o.useState)(null),[K,V]=(0,o.useState)(null);function M(){(0,i.clearTokenCookies)();let e=(0,d.getProxyBaseUrl)(),t=e?`${e}/sso/key/generate`:"/sso/key/generate";return window.location.href=t,null}if((0,o.useEffect)(()=>{let e=()=>{let e=sessionStorage.getItem("token");sessionStorage.clear(),e&&sessionStorage.setItem("token",e)};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(I){let e=(0,n.jwtDecode)(I);e&&(z(e.key),e.user_role&&g(function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role)),e.user_email&&x(e.user_email))}if(e&&N&&a&&!k){let t=sessionStorage.getItem("userModels"+e);t?E(JSON.parse(t)):((async()=>{try{let t=await (0,d.getProxyUISettings)(N);R(t);let l=await (0,d.userGetInfoV2)(N,e);j(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let i=(await (0,d.modelAvailableCall)(N,e,a)).data.map(e=>e.id);E(i),sessionStorage.setItem("userModels"+e,JSON.stringify(i))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&M()}})(),u(N,e,a,S,h))}},[e,I,N,a]),(0,o.useEffect)(()=>{N&&(async()=>{try{await (0,d.keyInfoCall)(N,[N])}catch(e){e.message.includes("Invalid proxy server token passed")&&M()}})()},[N]),(0,o.useEffect)(()=>{N&&u(N,e,a,S,h)},[S]),(0,o.useEffect)(()=>{if(null!==m&&null!=K&&null!==K.team_id){let e=0;for(let t of m)K.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===K.team_id&&(e+=t.spend);T(e)}else if(null!==m){let e=0;for(let t of m)e+=t.spend;T(e)}},[K]),null==I)return M(),null;try{let e=(0,n.jwtDecode)(I).exp,t=Math.floor(Date.now()/1e3);if(e&&t>=e)return M(),null}catch(e){return console.error("Error decoding token:",e),(0,i.clearTokenCookies)(),M(),null}if(null==N)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});null==a&&g("App Owner");let L="Admin Viewer"!==a&&"proxy_admin_viewer"!==a;return(0,t.jsx)("div",{className:"mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsx)(r.Col,{numColSpan:1,className:"flex flex-col gap-2",children:(0,t.jsx)(H,{headerActions:L?(0,t.jsx)(c.default,{team:K,teams:l,data:m,addKey:v,autoOpenCreate:_,prefillData:w},K?K.team_id:null):void 0})})})})};var q=e.i(557951);e.s(["default",0,function(){let{userId:e,userRole:i,userEmail:r,accessToken:s,premiumUser:n}=(0,l.default)(),{setUserRole:d,setUserEmail:u}=(0,q.useAuth)(),c=(0,m.useSearchParams)(),[g,p]=(0,o.useState)(null),[x,h]=(0,o.useState)([]),[f,b]=(0,o.useState)(!1),v="true"===c.get("create"),y=(0,o.useMemo)(()=>{if(!v)return;let e=c.get("owned_by"),t=c.get("team_id"),a=c.get("key_alias"),l=c.get("models"),i=c.get("key_type");if(!e&&!t&&!a&&!l&&!i)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,s=i&&["default","llm_api","management"].includes(i)?i:void 0,n=a?a.trim().slice(0,256):void 0,o=l?l.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:r,team_id:t?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:s}},[c,v]);return(0,o.useEffect)(()=>{s&&e&&i&&(0,a.teamListCall)(s,1,100,{userID:"Admin"!==i&&"Admin Viewer"!==i?e:null}).then(e=>p(e.teams??[])).catch(console.error)},[s,e,i]),(0,t.jsx)(W,{userID:e,userRole:i,premiumUser:n??!1,teams:g,keys:x,setUserRole:d,userEmail:r,setUserEmail:u,setTeams:p,setKeys:h,addKey:e=>{h(t=>t?[...t,e]:[e]),b(e=>!e)},createClicked:f,autoOpenCreate:v,prefillData:y})}],502501)},871135,e=>{"use strict";var t=e.i(843476),a=e.i(502501),l=e.i(936578),i=e.i(602869),r=e.i(207082),s=e.i(708347),n=e.i(557951),o=e.i(321836),d=e.i(571353),u=e.i(618566),c=e.i(271645);function m(){let{authLoading:e,token:m,userRole:g,userID:p}=(0,n.useAuth)(),x=(0,u.useRouter)(),h=(0,u.useSearchParams)(),f=h.get("page"),b=(0,c.useRef)(!1),v=(0,c.useRef)(!1),y=!1===e&&null===m;(0,c.useEffect)(()=>{if(y){(0,o.storeReturnUrl)();let e=(0,o.getLoginUrl)(i.proxyBaseUrl||""),t=(0,o.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[y]);let _=null!==f&&f in d.MIGRATED_PAGES;(0,c.useEffect)(()=>{!e&&_&&x.replace((0,d.migratedHref)(d.MIGRATED_PAGES[f]))},[e,_,f,x]),(0,c.useEffect)(()=>{if(e||!m||b.current)return;b.current=!0;let t=(0,o.consumeReturnUrl)();if(t&&(0,o.isValidReturnUrl)(t)){let e=new URL(t,window.location.origin);if(e.origin!==window.location.origin)return;let a=window.location.href;(0,o.normalizeUrlForCompare)(t)!==(0,o.normalizeUrlForCompare)(a)&&(v.current=!0,window.location.replace(e.href))}},[e,m]),(0,c.useEffect)(()=>{m||(b.current=!1,v.current=!1)},[m]);let w="success"===h.get("login"),k=!e&&!!m,j=w&&k&&""===g,S=w&&k&&s.internalUserRoles.includes(g),{data:C,isLoading:I}=(0,r.useKeys)(1,1,{userID:p},S),N=S&&!I&&C?.keys?.length===0,z=S&&I||N;(0,c.useEffect)(()=>{N&&!v.current&&x.replace((0,d.migratedHref)("connect"))},[N,x]);let D=y||_||j||z;return e||D?(0,t.jsx)(l.default,{}):(0,t.jsx)(a.default,{})}e.s(["default",0,function(){return(0,t.jsx)(c.Suspense,{fallback:(0,t.jsx)(l.default,{}),children:(0,t.jsx)(m,{})})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/00lwtxl1k_z8t.js b/litellm/proxy/_experimental/out/_next/static/chunks/00lwtxl1k_z8t.js
new file mode 100644
index 00000000000..12cc40b8fd0
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/00lwtxl1k_z8t.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,540626,e=>{"use strict";let t;var n,i=e.i(271645);let s=(0,i.createContext)(null);function o(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=l(e);if(n.length!==l(t).length)return!1;for(let i=0;ie,n){let s=n?.compare??r,o=(0,i.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),l=(0,i.useCallback)(()=>e.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(o,l,l,t,s)}function d(e,...t){return"function"==typeof e?e(...t):e}var u=class{#e=!0;#t;#n;#i;#s;#o;#l;#a;#r=0;#c=5;#d=!1;#u=!1;#g=null;#h=()=>{this.debugLog("Connected to event bus"),this.#o=!0,this.#d=!1,this.debugLog("Emitting queued events",this.#s),this.#s.forEach(e=>this.emitEventToBus(e)),this.#s=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#h)};#v=()=>{if(this.#r{this.#d||(this.#d=!0,this.#n().addEventListener("tanstack-connect-success",this.#h),this.#v())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:i=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#i=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#s=[],this.#o=!1,this.#u=!1,this.#l=null,this.#a=i}startConnectLoop(){null!==this.#l||this.#o||(this.debugLog(`Starting connect loop (every ${this.#a}ms)`),this.#l=setInterval(this.#v,this.#a))}stopConnectLoop(){this.#d=!1,null!==this.#l&&(clearInterval(this.#l),this.#l=null,this.#s=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#i&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#g&&(this.debugLog("Emitting event to internal event target",e,t),this.#g.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#u)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#o){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#s.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#d&&(this.#p(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let i=n?.withEventTarget??!1,s=`${this.#t}:${e}`;if(i&&(this.#g||(this.#g=new EventTarget),this.#g.addEventListener(s,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",s),()=>{};let o=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(s,o),this.debugLog("Registered event to bus",s),()=>{i&&this.#g?.removeEventListener(s,o),this.#n().removeEventListener(s,o)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let g=new Map;function h(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let v=new class extends u{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}},p=((n={})[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n);function f(e,t,n){let i="object"==typeof e,s=i?e:void 0;return{next:(i?e.next:e)?.bind(s),error:(i?e.error:t)?.bind(s),complete:(i?e.complete:n)?.bind(s)}}let m=[],b=0,{link:E,unlink:T,propagate:y,checkDirty:S,shallowPropagate:x}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let i=t.depsTail;if(void 0!==i&&i.dep===e)return;let s=void 0!==i?i.nextDep:t.deps;if(void 0!==s&&s.dep===e){s.version=n,t.depsTail=s;return}let o=e.subsTail;if(void 0!==o&&o.version===n&&o.sub===t)return;let l=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:i,nextDep:s,prevSub:o,nextSub:void 0};void 0!==s&&(s.prevDep=l),void 0!==i?i.nextDep=l:t.deps=l,void 0!==o?o.nextSub=l:e.subs=l},unlink:function(e,t=e.sub){let i=e.dep,s=e.prevDep,o=e.nextDep,l=e.nextSub,a=e.prevSub;return void 0!==o?o.prevDep=s:t.depsTail=s,void 0!==s?s.nextDep=o:t.deps=o,void 0!==l?l.prevSub=a:i.subsTail=a,void 0!==a?a.nextSub=l:void 0===(i.subs=l)&&n(i),o},propagate:function(e){let n,i=e.nextSub;e:for(;;){let s=e.sub,o=s.flags;if(o&(p.RecursedCheck|p.Recursed|p.Dirty|p.Pending)?o&(p.RecursedCheck|p.Recursed)?o&p.RecursedCheck?!(o&(p.Dirty|p.Pending))&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,s)?(s.flags=o|(p.Recursed|p.Pending),o&=p.Mutable):o=p.None:s.flags=o&~p.Recursed|p.Pending:o=p.None:s.flags=o|p.Pending,o&p.Watching&&t(s),o&p.Mutable){let t=s.subs;if(void 0!==t){let s=(e=t).nextSub;void 0!==s&&(n={value:i,prev:n},i=s);continue}}if(void 0!==(e=i)){i=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){i=e.nextSub;continue e}break}},checkDirty:function(t,n){let s,o=0,l=!1;e:for(;;){let a=t.dep,r=a.flags;if(n.flags&p.Dirty)l=!0;else if((r&(p.Mutable|p.Dirty))==(p.Mutable|p.Dirty)){if(e(a)){let e=a.subs;void 0!==e.nextSub&&i(e),l=!0}}else if((r&(p.Mutable|p.Pending))==(p.Mutable|p.Pending)){(void 0!==t.nextSub||void 0!==t.prevSub)&&(s={value:t,prev:s}),t=a.deps,n=a,++o;continue}if(!l){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;o--;){let o=n.subs,a=void 0!==o.nextSub;if(a?(t=s.value,s=s.prev):t=o,l){if(e(n)){a&&i(o),n=t.sub;continue}l=!1}else n.flags&=~p.Pending;n=t.sub;let r=t.nextDep;if(void 0!==r){t=r;continue e}}return l}},shallowPropagate:i};function i(e){do{let n=e.sub,i=n.flags;(i&(p.Pending|p.Dirty))===p.Pending&&(n.flags=i|p.Dirty,(i&(p.Watching|p.RecursedCheck))===p.Watching&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){m[L++]=e,e.flags&=~p.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=p.Mutable|p.Dirty,I(e))}}),C=0,L=0;function I(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=T(n,e)}var w=class{constructor(e,n){this.atom=function(e){let n="function"==typeof e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?p.None:p.Mutable,get:()=>(void 0!==t&&E(i,t,b),i._snapshot),subscribe(e){var n;let s,o,l=f(e),a={current:!1},r=(n=()=>{i.get(),a.current?l.next?.(i._snapshot):a.current=!0},s=()=>{let e=t;t=o,++b,o.depsTail=void 0,o.flags=p.Watching|p.RecursedCheck;try{return n()}finally{t=e,o.flags&=~p.RecursedCheck,I(o)}},o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:p.Watching|p.RecursedCheck,notify(){let e=this.flags;e&p.Dirty||e&p.Pending&&S(this.deps,this)?s():this.flags=p.Watching},stop(){this.flags=p.None,this.depsTail=void 0,I(this)}},s(),o);return{unsubscribe:()=>{r.stop()}}},_update(s){let o=t,l=(void 0)??Object.is;if(n)t=i,++b,i.depsTail=void 0;else if(void 0===s)return!1;n&&(i.flags=p.Mutable|p.RecursedCheck);try{let t=i._snapshot,o="function"==typeof s?s(t):void 0===s&&n?e(t):s;if(void 0===t||!l(t,o))return i._snapshot=o,!0;return!1}finally{t=o,n&&(i.flags&=~p.RecursedCheck),I(i)}}};return n?(i.flags=p.Mutable|p.Dirty,i.get=function(){let e=i.flags;if(e&p.Dirty||e&p.Pending&&S(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&x(e)}}else e&p.Pending&&(i.flags=e&~p.Pending);return void 0!==t&&E(i,t,b),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;if(void 0!==e&&(y(e),x(e),1)){for(;C{this.options={...this.options,...e},this.#m()||this.cancel()},this.#b=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:i}=n;return{...n,status:this.#m()?i?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;if(n){var i,s;g.set(n,t),v.emit(e,{key:(i={...t,key:n}).key,store:{state:h("function"==typeof(s=i.store).get?s.get():s.state)},options:h(i.options)})}})("Debouncer",this)},this.#m=()=>!!d(this.options.enabled,this),this.#E=()=>d(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#m())return;this.#b({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#b({canLeadingExecute:!1}),t=!0,this.#T(...e)),this.options.trailing&&this.#b({isPending:!0,lastArgs:e}),this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#b({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#T(...e)},this.#E())},this.#T=(...e)=>{this.#m()&&(this.fn(...e),this.#b({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#y(),this.#T(...this.store.state.lastArgs))},this.#y=()=>{this.#f&&(clearTimeout(this.#f),this.#f=void 0)},this.cancel=()=>{this.#y(),this.#b({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#b(M())},this.key=t.key,this.options={...k,...t},this.#b(this.options.initialState??{}),this.key&&v.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#b(e.payload.store.state),this.setOptions(e.payload.options))})}#b;#m;#E;#T;#y};e.s(["useDebouncer",0,function(e,t,n=()=>({})){let l={...((0,i.useContext)(s)?.defaultOptions??{}).debouncer,...t},[a]=(0,i.useState)(()=>{let t=new D(e,l);return t.Subscribe=function(e){let n=c(t.store,e.selector,{compare:o});return"function"==typeof e.children?e.children(n):e.children},t});a.fn=e,a.setOptions(l),(0,i.useEffect)(()=>()=>{l.onUnmount?l.onUnmount(a):a.cancel()},[]);let r=c(a.store,n,{compare:o});return(0,i.useMemo)(()=>({...a,state:r}),[a,r])}],540626)},741466,e=>{"use strict";e.s(["DEBOUNCE_WAIT_MS",0,300])},399029,e=>{"use strict";var t=e.i(540626),n=e.i(271645);e.s(["useDebouncedState",0,function(e,i,s){let[o,l]=(0,n.useState)(e),a=(0,t.useDebouncer)(l,i,s);return[o,a.maybeExecute,a]}])},663435,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(199133),s=e.i(898586),o=e.i(56456),l=e.i(399029),a=e.i(785242),r=e.i(741466);let{Text:c}=s.Typography;e.s(["default",0,({value:e,onChange:s,onTeamSelect:d,disabled:u,organizationId:g,pageSize:h=20})=>{let[v,p]=(0,n.useState)(""),[f,m]=(0,l.useDebouncedState)("",{wait:r.DEBOUNCE_WAIT_MS}),{data:b,fetchNextPage:E,hasNextPage:T,isFetchingNextPage:y,isLoading:S}=(0,a.useInfiniteTeams)(h,f||void 0,g),x=(0,n.useMemo)(()=>{if(!b?.pages)return[];let e=new Set,t=[];for(let n of b.pages)for(let i of n.teams)e.has(i.team_id)||(e.add(i.team_id),t.push(i));return t},[b]);return(0,t.jsx)(i.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{s?.(e??""),d&&d(e?x.find(t=>t.team_id===e)??null:null)},disabled:u,allowClear:!0,filterOption:!1,onSearch:e=>{p(e),m(e)},searchValue:v,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&T&&!y&&E()},loading:S,notFoundContent:S?(0,t.jsx)(o.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,y&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(o.LoadingOutlined,{spin:!0})})]}),children:x.map(e=>(0,t.jsxs)(i.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(c,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}])},350967,46757,e=>{"use strict";var t=e.i(290571),n=e.i(444755),i=e.i(673706),s=e.i(271645);let o={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"},l={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"},a={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"},r={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,o,"gridColsLg",0,r,"gridColsMd",0,a,"gridColsSm",0,l],46757);let c=(0,i.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=s.default.forwardRef((e,i)=>{let{numItems:u=1,numItemsSm:g,numItemsMd:h,numItemsLg:v,children:p,className:f}=e,m=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=d(u,o),E=d(g,l),T=d(h,a),y=d(v,r),S=(0,n.tremorTwMerge)(b,E,T,y);return s.default.createElement("div",Object.assign({ref:i,className:(0,n.tremorTwMerge)(c("root"),"grid",S,f)},m),p)});u.displayName="Grid",e.s(["Grid",0,u],350967)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var s=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(s.default,(0,t.default)({},e,{ref:o,icon:i}))});e.s(["UploadOutlined",0,o],519756)},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var s=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(s.default,(0,t.default)({},e,{ref:o,icon:i}))});e.s(["default",0,o],184163)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var s=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(s.default,(0,t.default)({},e,{ref:o,icon:i}))});e.s(["default",0,o],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var s=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(s.default,(0,t.default)({},e,{ref:o,icon:i}))});e.s(["FileTextOutlined",0,o],993914)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/10-c3gjiv7yt0.js b/litellm/proxy/_experimental/out/_next/static/chunks/011as3ct2u0nu.js
similarity index 62%
rename from litellm/proxy/_experimental/out/_next/static/chunks/10-c3gjiv7yt0.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/011as3ct2u0nu.js
index 8eab6e37d9a..b0a8c9490b7 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/10-c3gjiv7yt0.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/011as3ct2u0nu.js
@@ -1,8 +1,8 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,951047,380883,925395,268416,865296,320311,e=>{"use strict";e.s([],951047),e.i(247167);var t=e.i(271645),n=e.i(896499),r=e.i(146376),a=e.i(733332);let i=t.createContext(void 0);e.s(["TooltipRootContext",0,i,"useTooltipRootContext",0,function(e){let n=t.useContext(i);if(void 0===n&&!e)throw Error((0,a.default)(72));return n}],380883);var o=e.i(574735),l=e.i(667865),s=e.i(229315),u=e.i(647554),c=e.i(157940);function d(e){return null!=e&&null!=e.clientX}var p=e.i(17989),g=e.i(675606),f=e.i(264111),m=e.i(176782),h=e.i(616269),x=e.i(301252),b=e.i(56434),y=e.i(116786),v=e.i(990627);let C={...y.popupStoreSelectors,disabled:(0,h.createSelector)(e=>e.disabled),instantType:(0,h.createSelector)(e=>e.instantType),isInstantPhase:(0,h.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,h.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,h.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,h.createSelector)(e=>e.openChangeReason),closeOnClick:(0,h.createSelector)(e=>e.closeOnClick),closeDelay:(0,h.createSelector)(e=>e.closeDelay),hasViewport:(0,h.createSelector)(e=>e.hasViewport)};class S extends x.ReactStore{constructor(e,n,r=!1){const a=new v.PopupTriggerMap,i={...(0,y.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e};i.floatingRootContext=(0,y.createPopupFloatingRootContext)(a,n,r),super(i,{popupRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:a},C)}setOpen=(e,t)=>{(0,f.applyPopupOpenChange)(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,(0,g.createChangeEventDetails)(b.REASONS.triggerPress,e))}static useStore(e,t){return(0,f.usePopupStore)(e,(e,n)=>new S(t,e,n)).store}}e.s(["TooltipStore",0,S],925395);var E=e.i(843476);let $=(0,n.fastComponent)(function(e){let{disabled:n=!1,defaultOpen:a=!1,open:o,disableHoverablePopup:l=!1,trackCursorAxis:s="none",actionsRef:u,onOpenChange:c,onOpenChangeComplete:d,handle:p,triggerId:m,defaultTriggerId:h=null,children:x}=e,y=S.useStore(p?.store,{open:a,openProp:o,activeTriggerId:h,triggerIdProp:m});(0,f.useInitialOpenSync)(y,o,a,h),y.useControlledProp("openProp",o),y.useControlledProp("triggerIdProp",m),y.useContextCallback("onOpenChange",c),y.useContextCallback("onOpenChangeComplete",d);let v=y.useState("open"),C=!n&&v,$=y.useState("activeTriggerId"),R=y.useState("mounted"),j=y.useState("payload");y.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:l}),y.useSyncedValue("disabled",n),(0,f.useImplicitActiveTrigger)(y,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:w,transitionStatus:T}=(0,f.useOpenStateTransitions)(C,y),P=y.useState("isInstantPhase"),k=y.useState("instantType"),N=y.useState("lastOpenChangeReason"),M=t.useRef(null);(0,r.useIsoLayoutEffect)(()=>{v&&n&&y.setOpen(!1,(0,g.createChangeEventDetails)(b.REASONS.disabled))},[v,n,y]),(0,r.useIsoLayoutEffect)(()=>{"ending"===T&&N===b.REASONS.none||"ending"!==T&&P?("delay"!==k&&(M.current=k),y.set("instantType","delay")):null!==M.current&&(y.set("instantType",M.current),M.current=null)},[T,P,N,k,y]),(0,r.useIsoLayoutEffect)(()=>{C&&null==$&&y.set("payload",void 0)},[y,$,C]);let A=t.useCallback(()=>{y.setOpen(!1,(0,g.createChangeEventDetails)(b.REASONS.imperativeAction))},[y]);t.useImperativeHandle(u,()=>({unmount:w,close:A}),[w,A]);let I=C||R||!n&&"none"!==s;return(0,E.jsxs)(i.Provider,{value:y,children:[I&&(0,E.jsx)(O,{store:y,disabled:n,trackCursorAxis:s}),"function"==typeof x?x({payload:j}):x]})});function O({store:e,disabled:n,trackCursorAxis:r}){let a=e.useState("floatingRootContext"),i=(0,p.useDismiss)(a,{enabled:!n,referencePress:()=>e.select("closeOnClick")}),g=function(e,n={}){let{enabled:r=!0,axis:a="both"}=n,i="rootStore"in e?e.rootStore:e,p=i.useState("open"),g=i.useState("floatingElement"),f=i.useState("domReferenceElement"),m=i.context.dataRef,h=t.useRef(!1),x=t.useRef(null),[b,y]=t.useState(),[v,C]=t.useState([]),S=(0,l.useStableCallback)(e=>{i.set("positionReference",e)}),E=(0,l.useStableCallback)((e,t,n)=>{if(!h.current&&(!m.current.openEvent||d(m.current.openEvent))){var r,o;let l,s,u;i.set("positionReference",(r=n??f,o={x:e,y:t,axis:a,dataRef:m,pointerType:b},l=null,s=null,u=!1,{contextElement:r||void 0,getBoundingClientRect(){let e=r?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===o.axis||"both"===o.axis,n="y"===o.axis||"both"===o.axis,a=["mouseenter","mousemove"].includes(o.dataRef.current.openEvent?.type||"")&&"touch"!==o.pointerType,i=e.width,c=e.height,d=e.x,p=e.y;return null==l&&o.x&&t&&(l=e.x-o.x),null==s&&o.y&&n&&(s=e.y-o.y),d-=l||0,p-=s||0,i=0,c=0,!u||a?(i="y"===o.axis?e.width:0,c="x"===o.axis?e.height:0,d=t&&null!=o.x?o.x:d,p=n&&null!=o.y?o.y:p):u&&!a&&(c="x"===o.axis?e.height:c,i="y"===o.axis?e.width:i),u=!0,{width:i,height:c,x:d,y:p,top:p,right:d+i,bottom:p+c,left:d}}}))}}),$=(0,l.useStableCallback)(e=>{p?x.current||(E(e.clientX,e.clientY,e.currentTarget),C([])):E(e.clientX,e.clientY,e.currentTarget)}),O=(0,c.isMouseLikePointerType)(b)?g:p;t.useEffect(()=>{if(!r)return void S(f);if(!O)return;function e(){x.current?.(),x.current=null}let t=(0,s.getWindow)(g);return!m.current.openEvent||d(m.current.openEvent)?x.current=(0,o.addEventListener)(t,"mousemove",function(t){let n=(0,u.getTarget)(t);(0,u.contains)(g,n)?e():E(t.clientX,t.clientY)}):S(f),e},[O,r,g,m,f,i,E,S,v]),t.useEffect(()=>()=>{i.set("positionReference",null)},[i]),t.useEffect(()=>{r&&!g&&(h.current=!1)},[r,g]),t.useEffect(()=>{!r&&p&&(h.current=!0)},[r,p]);let R=t.useMemo(()=>{function e(e){y(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:$,onMouseEnter:$}},[$]);return t.useMemo(()=>r?{reference:R,trigger:R}:{},[r,R])}(a,{enabled:!n&&"none"!==r,axis:"none"===r?void 0:r}),h=t.useMemo(()=>(0,m.mergeProps)(g.reference,i.reference),[g.reference,i.reference]),x=t.useMemo(()=>(0,m.mergeProps)(g.trigger,i.trigger),[g.trigger,i.trigger]),b=t.useMemo(()=>(0,m.mergeProps)(f.FOCUSABLE_POPUP_PROPS,g.floating,i.floating),[g.floating,i.floating]);return(0,f.usePopupInteractionProps)(e,{activeTriggerProps:h,inactiveTriggerProps:x,popupProps:b}),null}e.s(["TooltipRoot",0,$],268416);let R=t.createContext(void 0);e.s(["TooltipProviderContext",0,R,"useTooltipProviderContext",0,function(){return t.useContext(R)}],865296);var j=e.i(439957),w=e.i(944681);let T=t.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new j.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});e.s(["FloatingDelayGroup",0,function(e){let{children:n,delay:a,timeoutMs:i=0}=e,o=t.useRef(a),l=t.useRef(a),s=t.useRef(null),u=t.useRef(null),c=(0,j.useTimeout)();return(0,r.useIsoLayoutEffect)(()=>{if(l.current=a,!s.current){o.current=a;return}o.current={open:(0,w.getDelay)(o.current,"open"),close:(0,w.getDelay)(a,"close")}},[a,s,o,l]),(0,E.jsx)(T.Provider,{value:t.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:l,currentIdRef:s,timeoutMs:i,currentContextRef:u,timeout:c}),[i,c]),children:n})},"useDelayGroup",0,function(e,n={open:!1}){let{open:a}=n,i="rootStore"in e?e.rootStore:e,o=i.useState("floatingId"),{currentIdRef:l,delayRef:s,timeoutMs:u,initialDelayRef:c,currentContextRef:d,hasProvider:p,timeout:f}=t.useContext(T),[m,h]=t.useState(!1),x=t.useRef(a),y=t.useRef(!1);return(0,r.useIsoLayoutEffect)(()=>{x.current=a},[a]),(0,r.useIsoLayoutEffect)(()=>()=>{y.current=!0},[]),(0,r.useIsoLayoutEffect)(()=>{function e(){y.current||h(!1),d.current?.setIsInstantPhase(!1),l.current=null,d.current=null,s.current=c.current,f.clear()}if(l.current&&!a&&l.current===o){if(h(!1),u)return f.start(u,()=>{i.select("open")||l.current&&l.current!==o||e()}),()=>{(x.current||l.current!==o)&&f.clear()};e()}},[a,o,l,s,u,c,d,f,i]),(0,r.useIsoLayoutEffect)(()=>{if(!a)return;let e=d.current,t=l.current;f.clear(),d.current={onOpenChange:i.setOpen,setIsInstantPhase:h},l.current=o,s.current={open:0,close:(0,w.getDelay)(c.current,"close")},null!==t&&t!==o?(h(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,g.createChangeEventDetails)(b.REASONS.none))):(h(!1),e?.setIsInstantPhase(!1))},[a,o,i,l,s,c,d,f]),(0,r.useIsoLayoutEffect)(()=>()=>{l.current===o&&(d.current=null,x.current)&&(l.current=null,s.current=c.current,f.clear())},[d,l,s,o,c,f]),t.useMemo(()=>({hasProvider:p,delayRef:s,isInstantPhase:m}),[p,s,m])}],320311)},413082,e=>{"use strict";var t=e.i(271645),n=e.i(574735),r=e.i(328744),a=e.i(365420),i=e.i(108868),o=e.i(439957),l=e.i(229315),s=e.i(451321),u=e.i(647554),c=e.i(596296),d=e.i(675606),p=e.i(56434);let g=r.platform.os.mac&&r.platform.engine.webkit;e.s(["useFocus",0,function(e,r={}){let{enabled:f=!0,delay:m}=r,h="rootStore"in e?e.rootStore:e,{events:x,dataRef:b}=h.context,y=t.useRef(!1),v=t.useRef(null),C=t.useRef(!0),S=(0,o.useTimeout)();t.useEffect(()=>{let e=h.select("domReferenceElement");if(!f)return;let t=(0,l.getWindow)(e);return(0,a.mergeCleanups)((0,n.addEventListener)(t,"blur",function(){let e=h.select("domReferenceElement");!h.select("open")&&(0,l.isHTMLElement)(e)&&e===(0,u.activeElement)((0,i.ownerDocument)(e))&&(y.current=!0)}),g&&(0,n.addEventListener)(t,"keydown",function(){C.current=!0},!0),g&&(0,n.addEventListener)(t,"pointerdown",function(){C.current=!1},!0))},[h,f]),t.useEffect(()=>{if(f)return x.on("openchange",e),()=>{x.off("openchange",e)};function e(e){if(e.reason===p.REASONS.triggerPress||e.reason===p.REASONS.escapeKey){let e=h.select("domReferenceElement");(0,l.isElement)(e)&&(v.current=e,y.current=!0)}}},[x,f,h]);let E=t.useMemo(()=>{function e(){y.current=!1,v.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(y.current){if(v.current===n)return;e()}let r=(0,u.getTarget)(t.nativeEvent);if((0,l.isElement)(r)){if(g&&!t.relatedTarget){if(!C.current&&!(0,c.isTypeableElement)(r))return}else if(!(0,c.matchesFocusVisible)(r))return}let a=(0,c.isTargetInsideEnabledTrigger)(t.relatedTarget,h.context.triggerElements),{nativeEvent:i,currentTarget:o}=t,s="function"==typeof m?m():m;h.select("open")&&a||0===s||void 0===s?h.setOpen(!0,(0,d.createChangeEventDetails)(p.REASONS.triggerFocus,i,o)):S.start(s,()=>{y.current||h.setOpen(!0,(0,d.createChangeEventDetails)(p.REASONS.triggerFocus,i,o))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=(0,l.isElement)(n)&&n.hasAttribute((0,s.createAttribute)("focus-guard"))&&"outside"===n.getAttribute("data-type");S.start(0,()=>{let e=h.select("domReferenceElement"),t=(0,u.activeElement)((0,i.ownerDocument)(e));if(!n&&t===e||(0,u.contains)(b.current.floatingContext?.refs.floating.current,t)||(0,u.contains)(e,t)||a)return;let o=n??t;(0,c.isTargetInsideEnabledTrigger)(o,h.context.triggerElements)||h.setOpen(!1,(0,d.createChangeEventDetails)(p.REASONS.triggerFocus,r))})}}},[b,m,h,S]);return t.useMemo(()=>f?{reference:E,trigger:E}:{},[f,E])}])},746798,378680,e=>{"use strict";var t,n,r=e.i(843476);e.i(951047);var a=e.i(268416);e.i(247167);var i=e.i(733332),o=e.i(271645),l=e.i(229315),s=e.i(896499),u=e.i(439957),c=e.i(446265),d=e.i(380883),p=e.i(405005),g=e.i(552245),f=e.i(264111),m=e.i(788015),h=e.i(865296),x=e.i(650316),b=e.i(320311),y=e.i(413082),v=e.i(872135),C=e.i(647554),S=e.i(157940),E=e.i(675606),$=e.i(56434);let O=((t={})[t.popupOpen=p.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t);var R=e.i(673752);let j="data-base-ui-tooltip-trigger";function w(e){if("composedPath"in e){let t=e.composedPath();for(let e=0;e"ending"===F.select("transitionStatus"),shouldOpen:()=>!er.current}),eu=(0,y.useFocus)(B,{enabled:!Z}).reference,ec=F.useState("triggerProps",Q),ed=Q||"none"!==et;return(0,g.useRenderElement)("button",e,{state:{open:L},ref:[t,_,z],props:[es,eu,ed?ec:void 0,{onMouseOver(e){(e=>{let t,n=er.current,r=w(e),a=(er.current=t=el(r),t&&(Y.openChangeTimeout.clear(),Y.restTimeout.clear(),Y.restTimeoutPending=!1,ea.clear()),t),i=z.current,o=i&&r&&(0,C.contains)(i,r);if(a&&F.select("open")&&F.select("lastOpenChangeReason")===$.REASONS.triggerHover)return F.setOpen(!1,(0,E.createChangeEventDetails)($.REASONS.triggerHover,e));if(n&&!a&&o&&!ee.current&&!F.select("open")&&i&&(0,S.isMouseLikePointerType)(ei.current)){let t=()=>{er.current||ee.current||F.select("open")||F.setOpen(!0,(0,E.createChangeEventDetails)($.REASONS.triggerHover,e,i))},n=eo();0===n?(ea.clear(),t()):ea.start(n,t)}})(e.nativeEvent)},onFocus(e){el(w(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){er.current=!1,ea.clear(),ei.current=void 0},onPointerEnter(e){ei.current=e.pointerType},onPointerDown(e){ei.current=e.pointerType,F.set("closeOnClick",N),N&&!F.select("open")&&F.cancelPendingOpen(e.nativeEvent)},onClick(e){N&&!F.select("open")&&F.cancelPendingOpen(e.nativeEvent)},id:q,[O.triggerDisabled]:Z?"":void 0,[j]:Z?void 0:""},I],stateAttributesMapping:p.triggerOpenStateMapping})}),P=o.createContext(void 0);var k=e.i(174080),N=e.i(726674);let M=o.forwardRef(function(e,t){let{children:n,container:a,className:i,render:l,style:s,...u}=e,{portalNode:c,portalSubtree:d}=(0,N.useFloatingPortalNode)({container:a,ref:t,componentProps:e,elementProps:u});return d||c?(0,r.jsxs)(o.Fragment,{children:[d,c&&k.createPortal(n,c)]}):null});e.s(["FloatingPortalLite",0,M],378680);let A=o.forwardRef(function(e,t){let{keepMounted:n=!1,...a}=e;return(0,d.useTooltipRootContext)().useState("mounted")||n?(0,r.jsx)(P.Provider,{value:n,children:(0,r.jsx)(M,{ref:t,...a})}):null}),I=o.createContext(void 0);function D(){let e=o.useContext(I);if(void 0===e)throw Error((0,i.default)(71));return e}var F=e.i(329365),q=e.i(638396),H=e.i(360495),L=e.i(789579);let B=o.forwardRef(function(e,t){let{render:n,className:a,anchor:l,positionMethod:s="absolute",side:u="top",align:c="center",sideOffset:p=0,alignOffset:g=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:x=!1,disableAnchorTracking:b=!1,collisionAvoidance:y=q.POPUP_COLLISION_AVOIDANCE,style:v,...C}=e,S=(0,d.useTooltipRootContext)(),E=function(){let e=o.useContext(P);if(void 0===e)throw Error((0,i.default)(70));return e}(),$=S.useState("open"),O=S.useState("mounted"),R=S.useState("trackCursorAxis"),j=S.useState("disableHoverablePopup"),w=S.useState("floatingRootContext"),T=S.useState("instantType"),k=S.useState("transitionStatus"),N=S.useState("hasViewport"),M=(0,F.useAnchorPositioning)({anchor:l,positionMethod:s,floatingRootContext:w,mounted:O,side:u,sideOffset:p,align:c,alignOffset:g,collisionBoundary:f,collisionPadding:m,sticky:x,arrowPadding:h,disableAnchorTracking:b,keepMounted:E,collisionAvoidance:y,adaptiveOrigin:N?H.adaptiveOrigin:void 0}),A=o.useMemo(()=>({open:$,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:"none"!==R?"tracking-cursor":T}),[$,M.side,M.align,M.anchorHidden,R,T]),D=(0,L.usePositioner)(e,A,{styles:M.positionerStyles,transitionStatus:k,props:C,refs:[t,S.useStateSetter("positionerElement")],hidden:!O,inert:!$||"both"===R||j});return(0,r.jsx)(I.Provider,{value:M,children:D})});var z=e.i(209407),W=e.i(137584),K=e.i(815982),_=e.i(431157);let Q={...p.popupStateMapping,...z.transitionStatusMapping},V=o.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,o=(0,d.useTooltipRootContext)(),{side:l,align:s}=D(),u=o.useState("open"),c=o.useState("instantType"),p=o.useState("transitionStatus"),f=o.useState("popupProps"),m=o.useState("floatingRootContext"),h=o.useState("disabled"),x=o.useState("closeDelay");(0,W.useOpenChangeComplete)({open:u,ref:o.context.popupRef,onComplete(){u&&o.context.onOpenChangeComplete?.(!0)}}),(0,_.useHoverFloatingInteraction)(m,{enabled:!h,closeDelay:x});let b=o.useStateSetter("popupElement");return(0,g.useRenderElement)("div",e,{state:{open:u,side:l,align:s,instant:c,transitionStatus:p},ref:[t,o.context.popupRef,b],props:[f,(0,K.getDisabledMountTransitionStyles)(p),i],stateAttributesMapping:Q})}),G=o.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,o=(0,d.useTooltipRootContext)(),{arrowRef:l,side:s,align:u,arrowUncentered:c,arrowStyles:f}=D(),m=o.useState("open"),h=o.useState("instantType");return(0,g.useRenderElement)("div",e,{state:{open:m,side:s,align:u,uncentered:c,instant:h},ref:[t,l],props:[{style:f,"aria-hidden":!0},i],stateAttributesMapping:p.popupStateMapping})}),U=((n={}).popupWidth="--popup-width",n.popupHeight="--popup-height",n);var X=e.i(818390);let Y={activationDirection:e=>e?{"data-activation-direction":e}:null},J=o.forwardRef(function(e,t){let{render:n,className:r,style:a,children:i,...o}=e,l=(0,d.useTooltipRootContext)(),s=D(),u=l.useState("instantType"),{children:c,state:p}=(0,X.usePopupViewport)({store:l,side:s.side,cssVars:U,children:i}),f={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:u};return(0,g.useRenderElement)("div",e,{state:f,ref:t,props:[o,{children:c}],stateAttributesMapping:Y})});var Z=e.i(925395);class ee{constructor(){this.store=new Z.TooltipStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,i.default)(81,e));this.store.setOpen(!0,(0,E.createChangeEventDetails)($.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,E.createChangeEventDetails)($.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Arrow",0,G,"Handle",0,ee,"Popup",0,V,"Portal",0,A,"Positioner",0,B,"Provider",0,function(e){let{delay:t,closeDelay:n,timeout:a=400}=e,i=o.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),l=o.useMemo(()=>({open:t,close:n}),[t,n]);return(0,r.jsx)(h.TooltipProviderContext.Provider,{value:i,children:(0,r.jsx)(b.FloatingDelayGroup,{delay:l,timeoutMs:a,children:e.children})})},"Root",()=>a.TooltipRoot,"Trigger",0,T,"Viewport",0,J,"createHandle",0,function(){return new ee}],599643);var et=e.i(599643),et=et,en=e.i(115504);e.s(["Tooltip",0,function({...e}){return(0,r.jsx)(et.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:n=4,align:a="center",alignOffset:i=0,children:o,...l}){return(0,r.jsx)(et.Portal,{children:(0,r.jsx)(et.Positioner,{align:a,alignOffset:i,side:t,sideOffset:n,className:"isolate z-50",children:(0,r.jsxs)(et.Popup,{"data-slot":"tooltip-content",className:(0,en.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[o,(0,r.jsx)(et.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,r.jsx)(et.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,r.jsx)(et.Trigger,{"data-slot":"tooltip-trigger",...e})}],746798)},112179,581070,e=>{"use strict";var t=e.i(843476),n=e.i(487486),r=e.i(115504),a=e.i(746798);function i({content:e,trigger:n}){return(0,t.jsx)(a.TooltipProvider,{delay:300,children:(0,t.jsxs)(a.Tooltip,{children:[(0,t.jsx)(a.TooltipTrigger,{render:n}),(0,t.jsx)(a.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,i],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:a,tooltip:l,dataTestId:s}){let u=(0,t.jsx)(n.Badge,{variant:"outline","data-testid":s,className:(0,r.cn)("whitespace-nowrap font-normal",o[e]),children:a});return l?(0,t.jsx)(i,{content:l,trigger:u}):u}],112179)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),a=e.i(529681);let i=e=>{let{prefixCls:r,className:a,style:i,size:o,shape:l}=e,s=(0,n.default)({[`${r}-lg`]:"large"===o,[`${r}-sm`]:"small"===o}),u=(0,n.default)({[`${r}-circle`]:"circle"===l,[`${r}-square`]:"square"===l,[`${r}-round`]:"round"===l}),c=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,n.default)(r,s,u,a),style:Object.assign(Object.assign({},c),i)})};e.i(296059);var o=e.i(694758),l=e.i(915654),s=e.i(246422),u=e.i(838378);let c=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),d=e=>({height:e,lineHeight:(0,l.unit)(e)}),p=e=>Object.assign({width:e},d(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},d(e)),f=e=>Object.assign({width:e},d(e)),m=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},h=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},d(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:a,skeletonButtonCls:i,skeletonInputCls:o,skeletonImageCls:l,controlHeight:s,controlHeightLG:u,controlHeightSM:d,gradientFromColor:x,padding:b,marginSM:y,borderRadius:v,titleHeight:C,blockRadius:S,paragraphLiHeight:E,controlHeightXS:$,paragraphMarginTop:O}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},p(u)),[`${n}-sm`]:Object.assign({},p(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:C,background:x,borderRadius:S,[`+ ${a}`]:{marginBlockStart:d}},[a]:{padding:0,"> li":{width:"100%",height:E,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${a} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:y,[`+ ${a}`]:{marginBlockStart:O}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:a,controlHeightSM:i,gradientFromColor:o,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal()},h(r,l))},m(e,r,n)),{[`${n}-lg`]:Object.assign({},h(a,l))}),m(e,a,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},h(i,l))}),m(e,i,`${n}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:a,controlHeightSM:i}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},p(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(a)),[`${t}${t}-sm`]:Object.assign({},p(i))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:a,controlHeightSM:i,gradientFromColor:o,calc:l}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:n},g(t,l)),[`${r}-lg`]:Object.assign({},g(a,l)),[`${r}-sm`]:Object.assign({},g(i,l))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:a,calc:i}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:a},f(i(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,951047,380883,925395,268416,865296,320311,e=>{"use strict";e.s([],951047),e.i(247167);var t=e.i(271645),n=e.i(896499),r=e.i(146376),a=e.i(733332);let i=t.createContext(void 0);e.s(["TooltipRootContext",0,i,"useTooltipRootContext",0,function(e){let n=t.useContext(i);if(void 0===n&&!e)throw Error((0,a.default)(72));return n}],380883);var o=e.i(574735),l=e.i(667865),s=e.i(229315),u=e.i(647554),c=e.i(157940);function d(e){return null!=e&&null!=e.clientX}var p=e.i(17989),g=e.i(675606),f=e.i(264111),m=e.i(176782),h=e.i(616269),x=e.i(301252),y=e.i(56434),b=e.i(116786),v=e.i(990627);let C={...b.popupStoreSelectors,disabled:(0,h.createSelector)(e=>e.disabled),instantType:(0,h.createSelector)(e=>e.instantType),isInstantPhase:(0,h.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,h.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,h.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,h.createSelector)(e=>e.openChangeReason),closeOnClick:(0,h.createSelector)(e=>e.closeOnClick),closeDelay:(0,h.createSelector)(e=>e.closeDelay),hasViewport:(0,h.createSelector)(e=>e.hasViewport)};class S extends x.ReactStore{constructor(e,n,r=!1){const a=new v.PopupTriggerMap,i={...(0,b.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e};i.floatingRootContext=(0,b.createPopupFloatingRootContext)(a,n,r),super(i,{popupRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:a},C)}setOpen=(e,t)=>{(0,f.applyPopupOpenChange)(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,(0,g.createChangeEventDetails)(y.REASONS.triggerPress,e))}static useStore(e,t){return(0,f.usePopupStore)(e,(e,n)=>new S(t,e,n)).store}}e.s(["TooltipStore",0,S],925395);var E=e.i(843476);let $=(0,n.fastComponent)(function(e){let{disabled:n=!1,defaultOpen:a=!1,open:o,disableHoverablePopup:l=!1,trackCursorAxis:s="none",actionsRef:u,onOpenChange:c,onOpenChangeComplete:d,handle:p,triggerId:m,defaultTriggerId:h=null,children:x}=e,b=S.useStore(p?.store,{open:a,openProp:o,activeTriggerId:h,triggerIdProp:m});(0,f.useInitialOpenSync)(b,o,a,h),b.useControlledProp("openProp",o),b.useControlledProp("triggerIdProp",m),b.useContextCallback("onOpenChange",c),b.useContextCallback("onOpenChangeComplete",d);let v=b.useState("open"),C=!n&&v,$=b.useState("activeTriggerId"),R=b.useState("mounted"),j=b.useState("payload");b.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:l}),b.useSyncedValue("disabled",n),(0,f.useImplicitActiveTrigger)(b,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:w,transitionStatus:T}=(0,f.useOpenStateTransitions)(C,b),P=b.useState("isInstantPhase"),k=b.useState("instantType"),N=b.useState("lastOpenChangeReason"),A=t.useRef(null);(0,r.useIsoLayoutEffect)(()=>{v&&n&&b.setOpen(!1,(0,g.createChangeEventDetails)(y.REASONS.disabled))},[v,n,b]),(0,r.useIsoLayoutEffect)(()=>{"ending"===T&&N===y.REASONS.none||"ending"!==T&&P?("delay"!==k&&(A.current=k),b.set("instantType","delay")):null!==A.current&&(b.set("instantType",A.current),A.current=null)},[T,P,N,k,b]),(0,r.useIsoLayoutEffect)(()=>{C&&null==$&&b.set("payload",void 0)},[b,$,C]);let M=t.useCallback(()=>{b.setOpen(!1,(0,g.createChangeEventDetails)(y.REASONS.imperativeAction))},[b]);t.useImperativeHandle(u,()=>({unmount:w,close:M}),[w,M]);let I=C||R||!n&&"none"!==s;return(0,E.jsxs)(i.Provider,{value:b,children:[I&&(0,E.jsx)(O,{store:b,disabled:n,trackCursorAxis:s}),"function"==typeof x?x({payload:j}):x]})});function O({store:e,disabled:n,trackCursorAxis:r}){let a=e.useState("floatingRootContext"),i=(0,p.useDismiss)(a,{enabled:!n,referencePress:()=>e.select("closeOnClick")}),g=function(e,n={}){let{enabled:r=!0,axis:a="both"}=n,i="rootStore"in e?e.rootStore:e,p=i.useState("open"),g=i.useState("floatingElement"),f=i.useState("domReferenceElement"),m=i.context.dataRef,h=t.useRef(!1),x=t.useRef(null),[y,b]=t.useState(),[v,C]=t.useState([]),S=(0,l.useStableCallback)(e=>{i.set("positionReference",e)}),E=(0,l.useStableCallback)((e,t,n)=>{if(!h.current&&(!m.current.openEvent||d(m.current.openEvent))){var r,o;let l,s,u;i.set("positionReference",(r=n??f,o={x:e,y:t,axis:a,dataRef:m,pointerType:y},l=null,s=null,u=!1,{contextElement:r||void 0,getBoundingClientRect(){let e=r?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===o.axis||"both"===o.axis,n="y"===o.axis||"both"===o.axis,a=["mouseenter","mousemove"].includes(o.dataRef.current.openEvent?.type||"")&&"touch"!==o.pointerType,i=e.width,c=e.height,d=e.x,p=e.y;return null==l&&o.x&&t&&(l=e.x-o.x),null==s&&o.y&&n&&(s=e.y-o.y),d-=l||0,p-=s||0,i=0,c=0,!u||a?(i="y"===o.axis?e.width:0,c="x"===o.axis?e.height:0,d=t&&null!=o.x?o.x:d,p=n&&null!=o.y?o.y:p):u&&!a&&(c="x"===o.axis?e.height:c,i="y"===o.axis?e.width:i),u=!0,{width:i,height:c,x:d,y:p,top:p,right:d+i,bottom:p+c,left:d}}}))}}),$=(0,l.useStableCallback)(e=>{p?x.current||(E(e.clientX,e.clientY,e.currentTarget),C([])):E(e.clientX,e.clientY,e.currentTarget)}),O=(0,c.isMouseLikePointerType)(y)?g:p;t.useEffect(()=>{if(!r)return void S(f);if(!O)return;function e(){x.current?.(),x.current=null}let t=(0,s.getWindow)(g);return!m.current.openEvent||d(m.current.openEvent)?x.current=(0,o.addEventListener)(t,"mousemove",function(t){let n=(0,u.getTarget)(t);(0,u.contains)(g,n)?e():E(t.clientX,t.clientY)}):S(f),e},[O,r,g,m,f,i,E,S,v]),t.useEffect(()=>()=>{i.set("positionReference",null)},[i]),t.useEffect(()=>{r&&!g&&(h.current=!1)},[r,g]),t.useEffect(()=>{!r&&p&&(h.current=!0)},[r,p]);let R=t.useMemo(()=>{function e(e){b(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:$,onMouseEnter:$}},[$]);return t.useMemo(()=>r?{reference:R,trigger:R}:{},[r,R])}(a,{enabled:!n&&"none"!==r,axis:"none"===r?void 0:r}),h=t.useMemo(()=>(0,m.mergeProps)(g.reference,i.reference),[g.reference,i.reference]),x=t.useMemo(()=>(0,m.mergeProps)(g.trigger,i.trigger),[g.trigger,i.trigger]),y=t.useMemo(()=>(0,m.mergeProps)(f.FOCUSABLE_POPUP_PROPS,g.floating,i.floating),[g.floating,i.floating]);return(0,f.usePopupInteractionProps)(e,{activeTriggerProps:h,inactiveTriggerProps:x,popupProps:y}),null}e.s(["TooltipRoot",0,$],268416);let R=t.createContext(void 0);e.s(["TooltipProviderContext",0,R,"useTooltipProviderContext",0,function(){return t.useContext(R)}],865296);var j=e.i(439957),w=e.i(944681);let T=t.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new j.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});e.s(["FloatingDelayGroup",0,function(e){let{children:n,delay:a,timeoutMs:i=0}=e,o=t.useRef(a),l=t.useRef(a),s=t.useRef(null),u=t.useRef(null),c=(0,j.useTimeout)();return(0,r.useIsoLayoutEffect)(()=>{if(l.current=a,!s.current){o.current=a;return}o.current={open:(0,w.getDelay)(o.current,"open"),close:(0,w.getDelay)(a,"close")}},[a,s,o,l]),(0,E.jsx)(T.Provider,{value:t.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:l,currentIdRef:s,timeoutMs:i,currentContextRef:u,timeout:c}),[i,c]),children:n})},"useDelayGroup",0,function(e,n={open:!1}){let{open:a}=n,i="rootStore"in e?e.rootStore:e,o=i.useState("floatingId"),{currentIdRef:l,delayRef:s,timeoutMs:u,initialDelayRef:c,currentContextRef:d,hasProvider:p,timeout:f}=t.useContext(T),[m,h]=t.useState(!1),x=t.useRef(a),b=t.useRef(!1);return(0,r.useIsoLayoutEffect)(()=>{x.current=a},[a]),(0,r.useIsoLayoutEffect)(()=>()=>{b.current=!0},[]),(0,r.useIsoLayoutEffect)(()=>{function e(){b.current||h(!1),d.current?.setIsInstantPhase(!1),l.current=null,d.current=null,s.current=c.current,f.clear()}if(l.current&&!a&&l.current===o){if(h(!1),u)return f.start(u,()=>{i.select("open")||l.current&&l.current!==o||e()}),()=>{(x.current||l.current!==o)&&f.clear()};e()}},[a,o,l,s,u,c,d,f,i]),(0,r.useIsoLayoutEffect)(()=>{if(!a)return;let e=d.current,t=l.current;f.clear(),d.current={onOpenChange:i.setOpen,setIsInstantPhase:h},l.current=o,s.current={open:0,close:(0,w.getDelay)(c.current,"close")},null!==t&&t!==o?(h(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,g.createChangeEventDetails)(y.REASONS.none))):(h(!1),e?.setIsInstantPhase(!1))},[a,o,i,l,s,c,d,f]),(0,r.useIsoLayoutEffect)(()=>()=>{l.current===o&&(d.current=null,x.current)&&(l.current=null,s.current=c.current,f.clear())},[d,l,s,o,c,f]),t.useMemo(()=>({hasProvider:p,delayRef:s,isInstantPhase:m}),[p,s,m])}],320311)},413082,e=>{"use strict";var t=e.i(271645),n=e.i(574735),r=e.i(328744),a=e.i(365420),i=e.i(108868),o=e.i(439957),l=e.i(229315),s=e.i(451321),u=e.i(647554),c=e.i(596296),d=e.i(675606),p=e.i(56434);let g=r.platform.os.mac&&r.platform.engine.webkit;e.s(["useFocus",0,function(e,r={}){let{enabled:f=!0,delay:m}=r,h="rootStore"in e?e.rootStore:e,{events:x,dataRef:y}=h.context,b=t.useRef(!1),v=t.useRef(null),C=t.useRef(!0),S=(0,o.useTimeout)();t.useEffect(()=>{let e=h.select("domReferenceElement");if(!f)return;let t=(0,l.getWindow)(e);return(0,a.mergeCleanups)((0,n.addEventListener)(t,"blur",function(){let e=h.select("domReferenceElement");!h.select("open")&&(0,l.isHTMLElement)(e)&&e===(0,u.activeElement)((0,i.ownerDocument)(e))&&(b.current=!0)}),g&&(0,n.addEventListener)(t,"keydown",function(){C.current=!0},!0),g&&(0,n.addEventListener)(t,"pointerdown",function(){C.current=!1},!0))},[h,f]),t.useEffect(()=>{if(f)return x.on("openchange",e),()=>{x.off("openchange",e)};function e(e){if(e.reason===p.REASONS.triggerPress||e.reason===p.REASONS.escapeKey){let e=h.select("domReferenceElement");(0,l.isElement)(e)&&(v.current=e,b.current=!0)}}},[x,f,h]);let E=t.useMemo(()=>{function e(){b.current=!1,v.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(b.current){if(v.current===n)return;e()}let r=(0,u.getTarget)(t.nativeEvent);if((0,l.isElement)(r)){if(g&&!t.relatedTarget){if(!C.current&&!(0,c.isTypeableElement)(r))return}else if(!(0,c.matchesFocusVisible)(r))return}let a=(0,c.isTargetInsideEnabledTrigger)(t.relatedTarget,h.context.triggerElements),{nativeEvent:i,currentTarget:o}=t,s="function"==typeof m?m():m;h.select("open")&&a||0===s||void 0===s?h.setOpen(!0,(0,d.createChangeEventDetails)(p.REASONS.triggerFocus,i,o)):S.start(s,()=>{b.current||h.setOpen(!0,(0,d.createChangeEventDetails)(p.REASONS.triggerFocus,i,o))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=(0,l.isElement)(n)&&n.hasAttribute((0,s.createAttribute)("focus-guard"))&&"outside"===n.getAttribute("data-type");S.start(0,()=>{let e=h.select("domReferenceElement"),t=(0,u.activeElement)((0,i.ownerDocument)(e));if(!n&&t===e||(0,u.contains)(y.current.floatingContext?.refs.floating.current,t)||(0,u.contains)(e,t)||a)return;let o=n??t;(0,c.isTargetInsideEnabledTrigger)(o,h.context.triggerElements)||h.setOpen(!1,(0,d.createChangeEventDetails)(p.REASONS.triggerFocus,r))})}}},[y,m,h,S]);return t.useMemo(()=>f?{reference:E,trigger:E}:{},[f,E])}])},746798,378680,e=>{"use strict";var t,n,r=e.i(843476);e.i(951047);var a=e.i(268416);e.i(247167);var i=e.i(733332),o=e.i(271645),l=e.i(229315),s=e.i(896499),u=e.i(439957),c=e.i(446265),d=e.i(380883),p=e.i(405005),g=e.i(552245),f=e.i(264111),m=e.i(788015),h=e.i(865296),x=e.i(650316),y=e.i(320311),b=e.i(413082),v=e.i(872135),C=e.i(647554),S=e.i(157940),E=e.i(675606),$=e.i(56434);let O=((t={})[t.popupOpen=p.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t);var R=e.i(673752);let j="data-base-ui-tooltip-trigger";function w(e){if("composedPath"in e){let t=e.composedPath();for(let e=0;e"ending"===F.select("transitionStatus"),shouldOpen:()=>!er.current}),eu=(0,b.useFocus)(B,{enabled:!Z}).reference,ec=F.useState("triggerProps",_),ed=_||"none"!==et;return(0,g.useRenderElement)("button",e,{state:{open:L},ref:[t,Q,z],props:[es,eu,ed?ec:void 0,{onMouseOver(e){(e=>{let t,n=er.current,r=w(e),a=(er.current=t=el(r),t&&(Y.openChangeTimeout.clear(),Y.restTimeout.clear(),Y.restTimeoutPending=!1,ea.clear()),t),i=z.current,o=i&&r&&(0,C.contains)(i,r);if(a&&F.select("open")&&F.select("lastOpenChangeReason")===$.REASONS.triggerHover)return F.setOpen(!1,(0,E.createChangeEventDetails)($.REASONS.triggerHover,e));if(n&&!a&&o&&!ee.current&&!F.select("open")&&i&&(0,S.isMouseLikePointerType)(ei.current)){let t=()=>{er.current||ee.current||F.select("open")||F.setOpen(!0,(0,E.createChangeEventDetails)($.REASONS.triggerHover,e,i))},n=eo();0===n?(ea.clear(),t()):ea.start(n,t)}})(e.nativeEvent)},onFocus(e){el(w(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){er.current=!1,ea.clear(),ei.current=void 0},onPointerEnter(e){ei.current=e.pointerType},onPointerDown(e){ei.current=e.pointerType,F.set("closeOnClick",N),N&&!F.select("open")&&F.cancelPendingOpen(e.nativeEvent)},onClick(e){N&&!F.select("open")&&F.cancelPendingOpen(e.nativeEvent)},id:q,[O.triggerDisabled]:Z?"":void 0,[j]:Z?void 0:""},I],stateAttributesMapping:p.triggerOpenStateMapping})}),P=o.createContext(void 0);var k=e.i(174080),N=e.i(726674);let A=o.forwardRef(function(e,t){let{children:n,container:a,className:i,render:l,style:s,...u}=e,{portalNode:c,portalSubtree:d}=(0,N.useFloatingPortalNode)({container:a,ref:t,componentProps:e,elementProps:u});return d||c?(0,r.jsxs)(o.Fragment,{children:[d,c&&k.createPortal(n,c)]}):null});e.s(["FloatingPortalLite",0,A],378680);let M=o.forwardRef(function(e,t){let{keepMounted:n=!1,...a}=e;return(0,d.useTooltipRootContext)().useState("mounted")||n?(0,r.jsx)(P.Provider,{value:n,children:(0,r.jsx)(A,{ref:t,...a})}):null}),I=o.createContext(void 0);function D(){let e=o.useContext(I);if(void 0===e)throw Error((0,i.default)(71));return e}var F=e.i(329365),q=e.i(638396),H=e.i(360495),L=e.i(789579);let B=o.forwardRef(function(e,t){let{render:n,className:a,anchor:l,positionMethod:s="absolute",side:u="top",align:c="center",sideOffset:p=0,alignOffset:g=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:x=!1,disableAnchorTracking:y=!1,collisionAvoidance:b=q.POPUP_COLLISION_AVOIDANCE,style:v,...C}=e,S=(0,d.useTooltipRootContext)(),E=function(){let e=o.useContext(P);if(void 0===e)throw Error((0,i.default)(70));return e}(),$=S.useState("open"),O=S.useState("mounted"),R=S.useState("trackCursorAxis"),j=S.useState("disableHoverablePopup"),w=S.useState("floatingRootContext"),T=S.useState("instantType"),k=S.useState("transitionStatus"),N=S.useState("hasViewport"),A=(0,F.useAnchorPositioning)({anchor:l,positionMethod:s,floatingRootContext:w,mounted:O,side:u,sideOffset:p,align:c,alignOffset:g,collisionBoundary:f,collisionPadding:m,sticky:x,arrowPadding:h,disableAnchorTracking:y,keepMounted:E,collisionAvoidance:b,adaptiveOrigin:N?H.adaptiveOrigin:void 0}),M=o.useMemo(()=>({open:$,side:A.side,align:A.align,anchorHidden:A.anchorHidden,instant:"none"!==R?"tracking-cursor":T}),[$,A.side,A.align,A.anchorHidden,R,T]),D=(0,L.usePositioner)(e,M,{styles:A.positionerStyles,transitionStatus:k,props:C,refs:[t,S.useStateSetter("positionerElement")],hidden:!O,inert:!$||"both"===R||j});return(0,r.jsx)(I.Provider,{value:A,children:D})});var z=e.i(209407),K=e.i(137584),W=e.i(815982),Q=e.i(431157);let _={...p.popupStateMapping,...z.transitionStatusMapping},V=o.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,o=(0,d.useTooltipRootContext)(),{side:l,align:s}=D(),u=o.useState("open"),c=o.useState("instantType"),p=o.useState("transitionStatus"),f=o.useState("popupProps"),m=o.useState("floatingRootContext"),h=o.useState("disabled"),x=o.useState("closeDelay");(0,K.useOpenChangeComplete)({open:u,ref:o.context.popupRef,onComplete(){u&&o.context.onOpenChangeComplete?.(!0)}}),(0,Q.useHoverFloatingInteraction)(m,{enabled:!h,closeDelay:x});let y=o.useStateSetter("popupElement");return(0,g.useRenderElement)("div",e,{state:{open:u,side:l,align:s,instant:c,transitionStatus:p},ref:[t,o.context.popupRef,y],props:[f,(0,W.getDisabledMountTransitionStyles)(p),i],stateAttributesMapping:_})}),U=o.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,o=(0,d.useTooltipRootContext)(),{arrowRef:l,side:s,align:u,arrowUncentered:c,arrowStyles:f}=D(),m=o.useState("open"),h=o.useState("instantType");return(0,g.useRenderElement)("div",e,{state:{open:m,side:s,align:u,uncentered:c,instant:h},ref:[t,l],props:[{style:f,"aria-hidden":!0},i],stateAttributesMapping:p.popupStateMapping})}),G=((n={}).popupWidth="--popup-width",n.popupHeight="--popup-height",n);var X=e.i(818390);let Y={activationDirection:e=>e?{"data-activation-direction":e}:null},J=o.forwardRef(function(e,t){let{render:n,className:r,style:a,children:i,...o}=e,l=(0,d.useTooltipRootContext)(),s=D(),u=l.useState("instantType"),{children:c,state:p}=(0,X.usePopupViewport)({store:l,side:s.side,cssVars:G,children:i}),f={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:u};return(0,g.useRenderElement)("div",e,{state:f,ref:t,props:[o,{children:c}],stateAttributesMapping:Y})});var Z=e.i(925395);class ee{constructor(){this.store=new Z.TooltipStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,i.default)(81,e));this.store.setOpen(!0,(0,E.createChangeEventDetails)($.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,E.createChangeEventDetails)($.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Arrow",0,U,"Handle",0,ee,"Popup",0,V,"Portal",0,M,"Positioner",0,B,"Provider",0,function(e){let{delay:t,closeDelay:n,timeout:a=400}=e,i=o.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),l=o.useMemo(()=>({open:t,close:n}),[t,n]);return(0,r.jsx)(h.TooltipProviderContext.Provider,{value:i,children:(0,r.jsx)(y.FloatingDelayGroup,{delay:l,timeoutMs:a,children:e.children})})},"Root",()=>a.TooltipRoot,"Trigger",0,T,"Viewport",0,J,"createHandle",0,function(){return new ee}],599643);var et=e.i(599643),et=et,en=e.i(115504);e.s(["Tooltip",0,function({...e}){return(0,r.jsx)(et.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:n=4,align:a="center",alignOffset:i=0,children:o,...l}){return(0,r.jsx)(et.Portal,{children:(0,r.jsx)(et.Positioner,{align:a,alignOffset:i,side:t,sideOffset:n,className:"isolate z-50",children:(0,r.jsxs)(et.Popup,{"data-slot":"tooltip-content",className:(0,en.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[o,(0,r.jsx)(et.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,r.jsx)(et.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,r.jsx)(et.Trigger,{"data-slot":"tooltip-trigger",...e})}],746798)},112179,581070,e=>{"use strict";var t=e.i(843476),n=e.i(487486),r=e.i(115504),a=e.i(746798);function i({content:e,trigger:n}){return(0,t.jsx)(a.TooltipProvider,{delay:300,children:(0,t.jsxs)(a.Tooltip,{children:[(0,t.jsx)(a.TooltipTrigger,{render:n}),(0,t.jsx)(a.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,i],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:a,tooltip:l,dataTestId:s}){let u=(0,t.jsx)(n.Badge,{variant:"outline","data-testid":s,className:(0,r.cn)("whitespace-nowrap font-normal",o[e]),children:a});return l?(0,t.jsx)(i,{content:l,trigger:u}):u}],112179)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),a=e.i(529681);let i=e=>{let{prefixCls:r,className:a,style:i,size:o,shape:l}=e,s=(0,n.default)({[`${r}-lg`]:"large"===o,[`${r}-sm`]:"small"===o}),u=(0,n.default)({[`${r}-circle`]:"circle"===l,[`${r}-square`]:"square"===l,[`${r}-round`]:"round"===l}),c=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,n.default)(r,s,u,a),style:Object.assign(Object.assign({},c),i)})};e.i(296059);var o=e.i(694758),l=e.i(915654),s=e.i(246422),u=e.i(838378);let c=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),d=e=>({height:e,lineHeight:(0,l.unit)(e)}),p=e=>Object.assign({width:e},d(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},d(e)),f=e=>Object.assign({width:e},d(e)),m=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},h=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},d(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:a,skeletonButtonCls:i,skeletonInputCls:o,skeletonImageCls:l,controlHeight:s,controlHeightLG:u,controlHeightSM:d,gradientFromColor:x,padding:y,marginSM:b,borderRadius:v,titleHeight:C,blockRadius:S,paragraphLiHeight:E,controlHeightXS:$,paragraphMarginTop:O}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:y,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},p(u)),[`${n}-sm`]:Object.assign({},p(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:C,background:x,borderRadius:S,[`+ ${a}`]:{marginBlockStart:d}},[a]:{padding:0,"> li":{width:"100%",height:E,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${a} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:b,[`+ ${a}`]:{marginBlockStart:O}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:a,controlHeightSM:i,gradientFromColor:o,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal()},h(r,l))},m(e,r,n)),{[`${n}-lg`]:Object.assign({},h(a,l))}),m(e,a,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},h(i,l))}),m(e,i,`${n}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:a,controlHeightSM:i}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},p(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(a)),[`${t}${t}-sm`]:Object.assign({},p(i))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:a,controlHeightSM:i,gradientFromColor:o,calc:l}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:n},g(t,l)),[`${r}-lg`]:Object.assign({},g(a,l)),[`${r}-sm`]:Object.assign({},g(i,l))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:a,calc:i}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:a},f(i(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
${r},
${a} > li,
${n},
${i},
${o},
${l}
- `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,u.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${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"]]}),b=e=>{let{prefixCls:r,className:a,style:i,rows:o=0}=e,l=Array.from({length:o}).map((n,r)=>t.createElement("li",{key:r,style:{width:((e,t)=>{let{width:n,rows:r=2}=t;return Array.isArray(n)?n[e]:r-1===e?n:void 0})(r,e)}}));return t.createElement("ul",{className:(0,n.default)(r,a),style:i},l)},y=({prefixCls:e,className:r,width:a,style:i})=>t.createElement("h3",{className:(0,n.default)(e,r),style:Object.assign({width:a},i)});function v(e){return e&&"object"==typeof e?e:{}}let C=e=>{let{prefixCls:a,loading:o,className:l,rootClassName:s,style:u,children:c,avatar:d=!1,title:p=!0,paragraph:g=!0,active:f,round:m}=e,{getPrefixCls:h,direction:C,className:S,style:E}=(0,r.useComponentConfig)("skeleton"),$=h("skeleton",a),[O,R,j]=x($);if(o||!("loading"in e)){let e,r,a=!!d,o=!!p,c=!!g;if(a){let n=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),v(d));e=t.createElement("div",{className:`${$}-header`},t.createElement(i,Object.assign({},n)))}if(o||c){let e,n;if(o){let n=Object.assign(Object.assign({prefixCls:`${$}-title`},!a&&c?{width:"38%"}:a&&c?{width:"50%"}:{}),v(p));e=t.createElement(y,Object.assign({},n))}if(c){let e,r=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},a&&o||(e.width="61%"),!a&&o?e.rows=3:e.rows=2,e)),v(g));n=t.createElement(b,Object.assign({},r))}r=t.createElement("div",{className:`${$}-content`},e,n)}let h=(0,n.default)($,{[`${$}-with-avatar`]:a,[`${$}-active`]:f,[`${$}-rtl`]:"rtl"===C,[`${$}-round`]:m},S,l,s,R,j);return O(t.createElement("div",{className:h,style:Object.assign(Object.assign({},E),u)},e,r))}return null!=c?c:null};C.Button=e=>{let{prefixCls:o,className:l,rootClassName:s,active:u,block:c=!1,size:d="default"}=e,{getPrefixCls:p}=t.useContext(r.ConfigContext),g=p("skeleton",o),[f,m,h]=x(g),b=(0,a.default)(e,["prefixCls"]),y=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:c},l,s,m,h);return f(t.createElement("div",{className:y},t.createElement(i,Object.assign({prefixCls:`${g}-button`,size:d},b))))},C.Avatar=e=>{let{prefixCls:o,className:l,rootClassName:s,active:u,shape:c="circle",size:d="default"}=e,{getPrefixCls:p}=t.useContext(r.ConfigContext),g=p("skeleton",o),[f,m,h]=x(g),b=(0,a.default)(e,["prefixCls","className"]),y=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:u},l,s,m,h);return f(t.createElement("div",{className:y},t.createElement(i,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:d},b))))},C.Input=e=>{let{prefixCls:o,className:l,rootClassName:s,active:u,block:c,size:d="default"}=e,{getPrefixCls:p}=t.useContext(r.ConfigContext),g=p("skeleton",o),[f,m,h]=x(g),b=(0,a.default)(e,["prefixCls"]),y=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:c},l,s,m,h);return f(t.createElement("div",{className:y},t.createElement(i,Object.assign({prefixCls:`${g}-input`,size:d},b))))},C.Image=e=>{let{prefixCls:a,className:i,rootClassName:o,style:l,active:s}=e,{getPrefixCls:u}=t.useContext(r.ConfigContext),c=u("skeleton",a),[d,p,g]=x(c),f=(0,n.default)(c,`${c}-element`,{[`${c}-active`]:s},i,o,p,g);return d(t.createElement("div",{className:f},t.createElement("div",{className:(0,n.default)(`${c}-image`,i),style:l},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},C.Node=e=>{let{prefixCls:a,className:i,rootClassName:o,style:l,active:s,children:u}=e,{getPrefixCls:c}=t.useContext(r.ConfigContext),d=c("skeleton",a),[p,g,f]=x(d),m=(0,n.default)(d,`${d}-element`,{[`${d}-active`]:s},g,i,o,f);return p(t.createElement("div",{className:m},t.createElement("div",{className:(0,n.default)(`${d}-image`,i),style:l},u)))},e.s(["default",0,C],185793)},922611,e=>{"use strict";var t=e.i(271645),n=e.i(175066);function r(){}let a=t.createContext({add:r,remove:r});e.s(["usePanelRef",0,function(e){let r=t.useContext(a),i=t.useRef(null);return(0,n.default)(t=>{if(t){let n=e?t.querySelector(e):t;n&&(r.add(n),i.current=n)}else r.remove(i.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let n=(e,t=0,n=!1,r=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!r)return"-";let a={minimumFractionDigits:t,maximumFractionDigits:t};if(!n)return e.toLocaleString("en-US",a);let i=e<0?"-":"",o=Math.abs(e),l=o,s="";return o>=1e6?(l=o/1e6,s="M"):o>=1e3&&(l=o/1e3,s="K"),`${i}${l.toLocaleString("en-US",a)}${s}`},r=async(e,n="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return a(e,n);try{return await navigator.clipboard.writeText(e),t.default.success(n),!0}catch(t){return console.error("Clipboard API failed: ",t),a(e,n)}},a=(e,n)=>{try{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let a=document.execCommand("copy");if(document.body.removeChild(r),a)return t.default.success(n),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,r,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",0,function(e,t){let n=structuredClone(e);for(let[e,r]of Object.entries(t))e in n&&(n[e]=r);return n}])},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},625901,e=>{"use strict";var t=e.i(266027),n=e.i(621482),r=e.i(243652),a=e.i(602869),i=e.i(135214);let o=(0,r.createQueryKeys)("models"),l=(0,r.createQueryKeys)("modelHub"),s=(0,r.createQueryKeys)("autoRouterModelGroups"),u=(0,r.createQueryKeys)("allProxyModels");(0,r.createQueryKeys)("selectedTeamModels");let c=(0,r.createQueryKeys)("infiniteModels"),d=(0,r.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),f=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),m=async(e,t,n)=>{let r=await (0,a.modelInfoCall)(e,t,n,1,1e3),i=r?.total_pages??1;return[r,...await Promise.all(Array.from({length:Math.max(0,i-1)},(r,i)=>(0,a.modelInfoCall)(e,t,n,i+2,1e3)))].flatMap(e=>e?.data??[])};e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,i.default)();return(0,t.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,a.modelAvailableCall)(e,n,r,!0,null,!0,!1,"expand"),enabled:!!(e&&n&&r)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,i.default)(),{data:a}=(0,t.useQuery)({queryKey:s.list({filters:{...n&&{userId:n},...r&&{userRole:r}}}),queryFn:async()=>await m(e,n,r),enabled:!!(e&&n&&r),select:f});return a??p},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:r,userId:o,userRole:l}=(0,i.default)();return(0,n.useInfiniteQuery)({queryKey:c.list({filters:{...o&&{userId:o},...l&&{userRole:l},size:e,...t&&{search:t}}}),queryFn:async({pageParam:n})=>await (0,a.modelInfoCall)(r,o,l,n,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,i.default)();return(0,t.useQuery)({queryKey:l.list({}),queryFn:async()=>await (0,a.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,n=50,r,l,s,u,c)=>{let{accessToken:d,userId:p,userRole:g}=(0,i.default)();return(0,t.useQuery)({queryKey:o.list({filters:{...p&&{userId:p},...g&&{userRole:g},page:e,size:n,...r&&{search:r},...l&&{modelId:l},...s&&{teamId:s},...u&&{sortBy:u},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,a.modelInfoCall)(d,p,g,e,n,r,l,s,u,c),enabled:!!(d&&p&&g)})},"useUserModels",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,i.default)();return(0,t.useQuery)({queryKey:d.list({}),queryFn:async()=>(await (0,a.modelAvailableCall)(e,n,r)).data.map(e=>e.id),enabled:!!(e&&n&&r)})}])},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(199931),a=e.i(625901),i=e.i(487486),o=e.i(115504);let l=new Set,s=(0,n.createContext)(l);function u(e){let t=(0,n.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:n}){return(0,t.jsx)(r.Waypoints,{size:e,className:n,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let n=(0,a.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:n,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:n}){return u(e)?(0,t.jsxs)(i.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",n),children:[(0,t.jsx)(r.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,u],548151);var c=e.i(581070);let d=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${d[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${d[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:n="datetime",fallback:r="-"}){let a,i,o,l=e?new Date(e):null;return!l||Number.isNaN(l.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:r}):(0,t.jsx)(c.CellTooltip,{content:(a=Intl.DateTimeFormat().resolvedOptions().timeZone,i=`${d[l.getMonth()]} ${l.getDate()}, ${l.getFullYear()}`,o=`${p(l.getHours())}:${p(l.getMinutes())}:${p(l.getSeconds())}`,`${i}, ${o} (${a})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(l,n)})})},"formatCellDate",0,g],200208);var f=e.i(174886),m=e.i(500330);let h={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:n="pill",onClick:r,copyable:a=!1,truncate:i=!0,fallback:l="-",tooltip:s,disabled:u=!1,dataTestId:d,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:l});let g=!!r&&!u,x=(0,o.cn)(h[n].base,g&&h[n].clickable,i&&"block max-w-[15ch] truncate",u&&"opacity-50",p),b=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":d,onClick:()=>r(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":d,children:e}),y=(0,t.jsx)(c.CellTooltip,{content:s??e,trigger:b});return a?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[y,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,m.copyToClipboard)(e)},children:(0,t.jsx)(f.Copy,{className:"size-3"})})]}):y}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:n,badge:r,onClick:a,className:i,titleClassName:l}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",l),children:e}),(null!=n&&""!==n||null!=r)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=n&&""!==n&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:n}),r]})]});return null!=a?(0,t.jsxs)("button",{type:"button",onClick:a,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",i),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",i),children:s})}],997422);let b={hasModelAccess:!1,label:"Management"},y={hasModelAccess:!1,label:"Read-only"},v={hasModelAccess:!1,label:"SCIM"},C={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),E=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?b:"read_only"===t?y:Array.isArray(e)&&0!==e.length?e.every(S)?v:E(e,"management_routes")?b:E(e,"info_routes")?y:C:C],146512)},355619,e=>{"use strict";var t=e.i(602869);let n=async(e,n,r)=>{try{if(null===e||null===n)return;if(null!==r){let a=(await (0,t.modelAvailableCall)(r,e,n,!0,null,!0)).data.map(e=>e.id),i=[],o=[];return a.forEach(e=>{e.endsWith("/*")?i.push(e):o.push(e)}),[...i,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,n,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let n=[],r=[];return e.forEach(e=>{if(e.endsWith("/*")){let a=e.replace("/*",""),i=t.filter(e=>e.startsWith(a+"/"));r.push(...i),n.push(e)}else r.push(e)}),[...n,...r].filter((e,t,n)=>n.indexOf(e)===t)}])},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var n=e.i(843476),r=e.i(146512),a=e.i(355619),i=e.i(487486);let o="all-proxy-models",l=e=>{if(e===o)return"All Proxy Models";let t=(0,a.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:a=3,allowedRoutes:s,keyType:u}){if(!Array.isArray(e)||0===e.length){let e=(0,r.deriveKeyModelScope)(s,u);return e.hasModelAccess?(0,n.jsx)(i.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,n.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,n.jsx)(i.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let c=e.slice(0,a),d=e.slice(a);return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[c.map((e,t)=>(0,n.jsx)(i.Badge,{variant:e===o?"secondary":"outline",children:l(e)},t)),d.length>0&&(0,n.jsx)(t.CellTooltip,{content:(0,n.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:d.map((e,t)=>(0,n.jsx)("span",{children:l(e)},t))}),trigger:(0,n.jsxs)(i.Badge,{variant:"outline",className:"cursor-default",children:["+",d.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:r="-",showZero:a=!1}){return null==e||Number.isNaN(e)?(0,n.jsx)("span",{className:"text-muted-foreground",children:r}):0===e?a?(0,n.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,n.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var u=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:r}){let a="number"!=typeof e||Number.isNaN(e)?0:e,i=t??r??null,o=null==t&&null!=r,l="number"==typeof i&&i>0,c=l?a/i*100:0,d=a>0?(0,s.getSpendString)(a,4):"$0.00",p=null===i?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(i)}${o?" (Team)":""}`;return(0,n.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,n.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,n.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:d})," ",(0,n.jsx)("span",{className:"text-muted-foreground",children:p})]}),l&&(0,n.jsx)(u.Meter,{value:a,max:i,"aria-valuetext":`${d} of $${(0,s.formatNumberWithCommas)(i)}`,children:(0,n.jsx)(u.MeterTrack,{children:(0,n.jsx)(u.MeterIndicator,{tone:c>100?"over":c>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)}]);
\ No newline at end of file
+ `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,u.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${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"]]}),y=e=>{let{prefixCls:r,className:a,style:i,rows:o=0}=e,l=Array.from({length:o}).map((n,r)=>t.createElement("li",{key:r,style:{width:((e,t)=>{let{width:n,rows:r=2}=t;return Array.isArray(n)?n[e]:r-1===e?n:void 0})(r,e)}}));return t.createElement("ul",{className:(0,n.default)(r,a),style:i},l)},b=({prefixCls:e,className:r,width:a,style:i})=>t.createElement("h3",{className:(0,n.default)(e,r),style:Object.assign({width:a},i)});function v(e){return e&&"object"==typeof e?e:{}}let C=e=>{let{prefixCls:a,loading:o,className:l,rootClassName:s,style:u,children:c,avatar:d=!1,title:p=!0,paragraph:g=!0,active:f,round:m}=e,{getPrefixCls:h,direction:C,className:S,style:E}=(0,r.useComponentConfig)("skeleton"),$=h("skeleton",a),[O,R,j]=x($);if(o||!("loading"in e)){let e,r,a=!!d,o=!!p,c=!!g;if(a){let n=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),v(d));e=t.createElement("div",{className:`${$}-header`},t.createElement(i,Object.assign({},n)))}if(o||c){let e,n;if(o){let n=Object.assign(Object.assign({prefixCls:`${$}-title`},!a&&c?{width:"38%"}:a&&c?{width:"50%"}:{}),v(p));e=t.createElement(b,Object.assign({},n))}if(c){let e,r=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},a&&o||(e.width="61%"),!a&&o?e.rows=3:e.rows=2,e)),v(g));n=t.createElement(y,Object.assign({},r))}r=t.createElement("div",{className:`${$}-content`},e,n)}let h=(0,n.default)($,{[`${$}-with-avatar`]:a,[`${$}-active`]:f,[`${$}-rtl`]:"rtl"===C,[`${$}-round`]:m},S,l,s,R,j);return O(t.createElement("div",{className:h,style:Object.assign(Object.assign({},E),u)},e,r))}return null!=c?c:null};C.Button=e=>{let{prefixCls:o,className:l,rootClassName:s,active:u,block:c=!1,size:d="default"}=e,{getPrefixCls:p}=t.useContext(r.ConfigContext),g=p("skeleton",o),[f,m,h]=x(g),y=(0,a.default)(e,["prefixCls"]),b=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:c},l,s,m,h);return f(t.createElement("div",{className:b},t.createElement(i,Object.assign({prefixCls:`${g}-button`,size:d},y))))},C.Avatar=e=>{let{prefixCls:o,className:l,rootClassName:s,active:u,shape:c="circle",size:d="default"}=e,{getPrefixCls:p}=t.useContext(r.ConfigContext),g=p("skeleton",o),[f,m,h]=x(g),y=(0,a.default)(e,["prefixCls","className"]),b=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:u},l,s,m,h);return f(t.createElement("div",{className:b},t.createElement(i,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:d},y))))},C.Input=e=>{let{prefixCls:o,className:l,rootClassName:s,active:u,block:c,size:d="default"}=e,{getPrefixCls:p}=t.useContext(r.ConfigContext),g=p("skeleton",o),[f,m,h]=x(g),y=(0,a.default)(e,["prefixCls"]),b=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:c},l,s,m,h);return f(t.createElement("div",{className:b},t.createElement(i,Object.assign({prefixCls:`${g}-input`,size:d},y))))},C.Image=e=>{let{prefixCls:a,className:i,rootClassName:o,style:l,active:s}=e,{getPrefixCls:u}=t.useContext(r.ConfigContext),c=u("skeleton",a),[d,p,g]=x(c),f=(0,n.default)(c,`${c}-element`,{[`${c}-active`]:s},i,o,p,g);return d(t.createElement("div",{className:f},t.createElement("div",{className:(0,n.default)(`${c}-image`,i),style:l},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},C.Node=e=>{let{prefixCls:a,className:i,rootClassName:o,style:l,active:s,children:u}=e,{getPrefixCls:c}=t.useContext(r.ConfigContext),d=c("skeleton",a),[p,g,f]=x(d),m=(0,n.default)(d,`${d}-element`,{[`${d}-active`]:s},g,i,o,f);return p(t.createElement("div",{className:m},t.createElement("div",{className:(0,n.default)(`${d}-image`,i),style:l},u)))},e.s(["default",0,C],185793)},922611,e=>{"use strict";var t=e.i(271645),n=e.i(175066);function r(){}let a=t.createContext({add:r,remove:r});e.s(["usePanelRef",0,function(e){let r=t.useContext(a),i=t.useRef(null);return(0,n.default)(t=>{if(t){let n=e?t.querySelector(e):t;n&&(r.add(n),i.current=n)}else r.remove(i.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let n=(e,t=0,n=!1,r=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!r)return"-";let a={minimumFractionDigits:t,maximumFractionDigits:t};if(!n)return e.toLocaleString("en-US",a);let i=e<0?"-":"",o=Math.abs(e),l=o,s="";return o>=1e6?(l=o/1e6,s="M"):o>=1e3&&(l=o/1e3,s="K"),`${i}${l.toLocaleString("en-US",a)}${s}`},r=async(e,n="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return a(e,n);try{return await navigator.clipboard.writeText(e),t.default.success(n),!0}catch(t){return console.error("Clipboard API failed: ",t),a(e,n)}},a=(e,n)=>{try{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let a=document.execCommand("copy");if(document.body.removeChild(r),a)return t.default.success(n),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,r,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",0,function(e,t){let n=structuredClone(e);for(let[e,r]of Object.entries(t))e in n&&(n[e]=r);return n}])},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},625901,e=>{"use strict";var t=e.i(266027),n=e.i(621482),r=e.i(912598),a=e.i(243652),i=e.i(602869),o=e.i(135214);let l=(0,a.createQueryKeys)("models"),s=(0,a.createQueryKeys)("modelHub"),u=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels"),d=(0,a.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),f=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),m=e=>e.filter(g),h=async(e,t,n)=>{let r=await (0,i.modelInfoCall)(e,t,n,1,1e3),a=r?.total_pages??1;return[r,...await Promise.all(Array.from({length:Math.max(0,a-1)},(r,a)=>(0,i.modelInfoCall)(e,t,n,a+2,1e3)))].flatMap(e=>e?.data??[])},x=(e,t)=>l.list({filters:{scope:"autoRouters",...e&&{userId:e},...t&&{userRole:t}}});e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,o.default)();return(0,t.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,i.modelAvailableCall)(e,n,r,!0,null,!0,!1,"expand"),enabled:!!(e&&n&&r)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,o.default)(),{data:a}=(0,t.useQuery)({queryKey:x(n,r),queryFn:async()=>await h(e,n,r),enabled:!!(e&&n&&r),select:f});return a??p},"useAutoRouters",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,o.default)();return(0,t.useQuery)({queryKey:x(n,r),queryFn:async()=>await h(e,n,r),enabled:!!(e&&n&&r),select:m})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:r,userId:a,userRole:l}=(0,o.default)();return(0,n.useInfiniteQuery)({queryKey:c.list({filters:{...a&&{userId:a},...l&&{userRole:l},size:e,...t&&{search:t}}}),queryFn:async({pageParam:n})=>await (0,i.modelInfoCall)(r,a,l,n,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let e=(0,r.useQueryClient)();return async()=>{await e.invalidateQueries({queryKey:l.lists()})}},"useModelHub",0,()=>{let{accessToken:e}=(0,o.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,i.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,n=50,r,a,s,u,c,d=!1)=>{let{accessToken:p,userId:g,userRole:f}=(0,o.default)();return(0,t.useQuery)({queryKey:l.list({filters:{...g&&{userId:g},...f&&{userRole:f},page:e,size:n,...r&&{search:r},...a&&{modelId:a},...s&&{teamId:s},...u&&{sortBy:u},...c&&{sortOrder:c},...d&&{excludeAutoRouters:"true"}}}),queryFn:async()=>await (0,i.modelInfoCall)(p,g,f,e,n,r,a,s,u,c,d),enabled:!!(p&&g&&f)})},"useUserModels",0,()=>{let{accessToken:e,userId:n,userRole:r}=(0,o.default)();return(0,t.useQuery)({queryKey:d.list({}),queryFn:async()=>(await (0,i.modelAvailableCall)(e,n,r)).data.map(e=>e.id),enabled:!!(e&&n&&r)})}])},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(199931),a=e.i(625901),i=e.i(487486),o=e.i(115504);let l=new Set,s=(0,n.createContext)(l);function u(e){let t=(0,n.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:n}){return(0,t.jsx)(r.Waypoints,{size:e,className:n,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let n=(0,a.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:n,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:n}){return u(e)?(0,t.jsxs)(i.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",n),children:[(0,t.jsx)(r.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,u],548151);var c=e.i(581070);let d=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${d[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${d[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:n="datetime",fallback:r="-"}){let a,i,o,l=e?new Date(e):null;return!l||Number.isNaN(l.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:r}):(0,t.jsx)(c.CellTooltip,{content:(a=Intl.DateTimeFormat().resolvedOptions().timeZone,i=`${d[l.getMonth()]} ${l.getDate()}, ${l.getFullYear()}`,o=`${p(l.getHours())}:${p(l.getMinutes())}:${p(l.getSeconds())}`,`${i}, ${o} (${a})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(l,n)})})},"formatCellDate",0,g],200208);var f=e.i(174886),m=e.i(500330);let h={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:n="pill",onClick:r,copyable:a=!1,truncate:i=!0,fallback:l="-",tooltip:s,disabled:u=!1,dataTestId:d,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:l});let g=!!r&&!u,x=(0,o.cn)(h[n].base,g&&h[n].clickable,i&&"block max-w-[15ch] truncate",u&&"opacity-50",p),y=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":d,onClick:()=>r(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":d,children:e}),b=(0,t.jsx)(c.CellTooltip,{content:s??e,trigger:y});return a?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[b,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,m.copyToClipboard)(e)},children:(0,t.jsx)(f.Copy,{className:"size-3"})})]}):b}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:n,badge:r,onClick:a,className:i,titleClassName:l}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",l),children:e}),(null!=n&&""!==n||null!=r)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=n&&""!==n&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:n}),r]})]});return null!=a?(0,t.jsxs)("button",{type:"button",onClick:a,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",i),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",i),children:s})}],997422);let y={hasModelAccess:!1,label:"Management"},b={hasModelAccess:!1,label:"Read-only"},v={hasModelAccess:!1,label:"SCIM"},C={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),E=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?y:"read_only"===t?b:Array.isArray(e)&&0!==e.length?e.every(S)?v:E(e,"management_routes")?y:E(e,"info_routes")?b:C:C],146512)},355619,e=>{"use strict";var t=e.i(602869);let n=async(e,n,r)=>{try{if(null===e||null===n)return;if(null!==r){let a=(await (0,t.modelAvailableCall)(r,e,n,!0,null,!0)).data.map(e=>e.id),i=[],o=[];return a.forEach(e=>{e.endsWith("/*")?i.push(e):o.push(e)}),[...i,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,n,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let n=[],r=[];return e.forEach(e=>{if(e.endsWith("/*")){let a=e.replace("/*",""),i=t.filter(e=>e.startsWith(a+"/"));r.push(...i),n.push(e)}else r.push(e)}),[...n,...r].filter((e,t,n)=>n.indexOf(e)===t)}])},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var n=e.i(843476),r=e.i(146512),a=e.i(355619),i=e.i(487486);let o="all-proxy-models",l=e=>{if(e===o)return"All Proxy Models";let t=(0,a.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:a=3,allowedRoutes:s,keyType:u}){if(!Array.isArray(e)||0===e.length){let e=(0,r.deriveKeyModelScope)(s,u);return e.hasModelAccess?(0,n.jsx)(i.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,n.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,n.jsx)(i.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let c=e.slice(0,a),d=e.slice(a);return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[c.map((e,t)=>(0,n.jsx)(i.Badge,{variant:e===o?"secondary":"outline",children:l(e)},t)),d.length>0&&(0,n.jsx)(t.CellTooltip,{content:(0,n.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:d.map((e,t)=>(0,n.jsx)("span",{children:l(e)},t))}),trigger:(0,n.jsxs)(i.Badge,{variant:"outline",className:"cursor-default",children:["+",d.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:r="-",showZero:a=!1}){return null==e||Number.isNaN(e)?(0,n.jsx)("span",{className:"text-muted-foreground",children:r}):0===e?a?(0,n.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,n.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var u=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:r}){let a="number"!=typeof e||Number.isNaN(e)?0:e,i=t??r??null,o=null==t&&null!=r,l="number"==typeof i&&i>0,c=l?a/i*100:0,d=a>0?(0,s.getSpendString)(a,4):"$0.00",p=null===i?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(i)}${o?" (Team)":""}`;return(0,n.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,n.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,n.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:d})," ",(0,n.jsx)("span",{className:"text-muted-foreground",children:p})]}),l&&(0,n.jsx)(u.Meter,{value:a,max:i,"aria-valuetext":`${d} of $${(0,s.formatNumberWithCommas)(i)}`,children:(0,n.jsx)(u.MeterTrack,{children:(0,n.jsx)(u.MeterIndicator,{tone:c>100?"over":c>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/02-alpsjfp5b7.js b/litellm/proxy/_experimental/out/_next/static/chunks/02-alpsjfp5b7.js
new file mode 100644
index 00000000000..d4ee3ff9e92
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/02-alpsjfp5b7.js
@@ -0,0 +1,10 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,175712,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(529681),l=e.i(242064),r=e.i(517455),n=e.i(185793),s=e.i(721369),o=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let d=e=>{var{prefixCls:a,className:r,hoverable:n=!0}=e,s=o(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),A=d("card",a),c=(0,i.default)(`${A}-grid`,r,{[`${A}-grid-hoverable`]:n});return t.createElement("div",Object.assign({},s,{className:c}))};e.i(296059);var A=e.i(915654),c=e.i(183293),u=e.i(246422),g=e.i(838378);let h=(0,u.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:i,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:r,bodyPadding:n,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:i,headerHeight:a,headerPadding:l,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,A.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,A.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,A.unit)(e.borderRadiusLG)} ${(0,A.unit)(e.borderRadiusLG)} 0 0`},(0,c.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},c.textEllipsis),{[`
+ > ${i}-typography,
+ > ${i}-typography-edit-content
+ `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,A.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:n,borderRadius:`0 0 ${(0,A.unit)(e.borderRadiusLG)} ${(0,A.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:i,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
+ ${(0,A.unit)(l)} 0 0 0 ${i},
+ 0 ${(0,A.unit)(l)} 0 0 ${i},
+ ${(0,A.unit)(l)} ${(0,A.unit)(l)} 0 0 ${i},
+ ${(0,A.unit)(l)} 0 0 0 ${i} inset,
+ 0 ${(0,A.unit)(l)} 0 0 ${i} inset;
+ `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,A.unit)(e.borderRadiusLG)} ${(0,A.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:i,actionsLiMargin:a,cardActionsIconSize:l,colorBorderSecondary:r,actionsBg:n}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:n,borderTop:`${(0,A.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,A.unit)(e.borderRadiusLG)} ${(0,A.unit)(e.borderRadiusLG)}`},(0,c.clearFix)()),{"& > li":{margin:a,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${i}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,A.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${i}`]:{fontSize:l,lineHeight:(0,A.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,A.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,A.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,c.clearFix)()),{"&-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},c.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,A.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:i}},[`${t}-contain-grid`]:{borderRadius:`${(0,A.unit)(e.borderRadiusLG)} ${(0,A.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:a}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:i,headerPadding:a,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,A.unit)(a)}`,background:i,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,A.unit)(e.padding)} ${(0,A.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:i,headerPaddingSM:a,headerHeightSM:l,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,A.unit)(a)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:i}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,i;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(i=e.headerPadding)?i:e.paddingLG}});var m=e.i(792812),b=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let f=e=>{let{actionClasses:i,actions:a=[],actionStyle:l}=e;return t.createElement("ul",{className:i,style:l},a.map((e,i)=>{let l=`action-${i}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:l},t.createElement("span",null,e))}))},p=t.forwardRef((e,o)=>{let A,{prefixCls:c,className:u,rootClassName:g,style:p,extra:O,headStyle:x={},bodyStyle:E={},title:I,loading:v,bordered:y,variant:C,size:w,type:S,cover:R,actions:L,tabList:_,children:B,activeTabKey:T,defaultActiveTabKey:k,tabBarExtraContent:$,hoverable:H,tabProps:M={},classNames:j,styles:N}=e,D=b(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:U,direction:z,card:P}=t.useContext(l.ConfigContext),[W]=(0,m.default)("card",C,y),G=e=>{var t;return(0,i.default)(null==(t=null==P?void 0:P.classNames)?void 0:t[e],null==j?void 0:j[e])},q=e=>{var t;return Object.assign(Object.assign({},null==(t=null==P?void 0:P.styles)?void 0:t[e]),null==N?void 0:N[e])},Q=t.useMemo(()=>{let e=!1;return t.Children.forEach(B,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[B]),F=U("card",c),[V,K,Y]=h(F),J=t.createElement(n.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},B),X=void 0!==T,Z=Object.assign(Object.assign({},M),{[X?"activeKey":"defaultActiveKey"]:X?T:k,tabBarExtraContent:$}),ee=(0,r.default)(w),et=ee&&"default"!==ee?ee:"large",ei=_?t.createElement(s.default,Object.assign({size:et},Z,{className:`${F}-head-tabs`,onChange:t=>{var i;null==(i=e.onTabChange)||i.call(e,t)},items:_.map(e=>{var{tab:t}=e;return Object.assign({label:t},b(e,["tab"]))})})):null;if(I||O||ei){let e=(0,i.default)(`${F}-head`,G("header")),a=(0,i.default)(`${F}-head-title`,G("title")),l=(0,i.default)(`${F}-extra`,G("extra")),r=Object.assign(Object.assign({},x),q("header"));A=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${F}-head-wrapper`},I&&t.createElement("div",{className:a,style:q("title")},I),O&&t.createElement("div",{className:l,style:q("extra")},O)),ei)}let ea=(0,i.default)(`${F}-cover`,G("cover")),el=R?t.createElement("div",{className:ea,style:q("cover")},R):null,er=(0,i.default)(`${F}-body`,G("body")),en=Object.assign(Object.assign({},E),q("body")),es=t.createElement("div",{className:er,style:en},v?J:B),eo=(0,i.default)(`${F}-actions`,G("actions")),ed=(null==L?void 0:L.length)?t.createElement(f,{actionClasses:eo,actionStyle:q("actions"),actions:L}):null,eA=(0,a.default)(D,["onTabChange"]),ec=(0,i.default)(F,null==P?void 0:P.className,{[`${F}-loading`]:v,[`${F}-bordered`]:"borderless"!==W,[`${F}-hoverable`]:H,[`${F}-contain-grid`]:Q,[`${F}-contain-tabs`]:null==_?void 0:_.length,[`${F}-${ee}`]:ee,[`${F}-type-${S}`]:!!S,[`${F}-rtl`]:"rtl"===z},u,g,K,Y),eu=Object.assign(Object.assign({},null==P?void 0:P.style),p);return V(t.createElement("div",Object.assign({ref:o},eA,{className:ec,style:eu}),A,el,es,ed))});var O=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};p.Grid=d,p.Meta=e=>{let{prefixCls:a,className:r,avatar:n,title:s,description:o}=e,d=O(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:A}=t.useContext(l.ConfigContext),c=A("card",a),u=(0,i.default)(`${c}-meta`,r),g=n?t.createElement("div",{className:`${c}-meta-avatar`},n):null,h=s?t.createElement("div",{className:`${c}-meta-title`},s):null,m=o?t.createElement("div",{className:`${c}-meta-description`},o):null,b=h||m?t.createElement("div",{className:`${c}-meta-detail`},h,m):null;return t.createElement("div",Object.assign({},d,{className:u}),g,b)},e.s(["Card",0,p],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(908206),l=e.i(242064),r=e.i(517455),n=e.i(150073);let s={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},o=t.default.createContext({});var d=e.i(876556),A=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i},c=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let u=e=>{let{itemPrefixCls:a,component:l,span:r,className:n,style:s,labelStyle:d,contentStyle:A,bordered:c,label:u,content:g,colon:h,type:m,styles:b}=e,{classNames:f}=t.useContext(o),p=Object.assign(Object.assign({},d),null==b?void 0:b.label),O=Object.assign(Object.assign({},A),null==b?void 0:b.content);if(c)return t.createElement(l,{colSpan:r,style:s,className:(0,i.default)(n,{[`${a}-item-${m}`]:"label"===m||"content"===m,[null==f?void 0:f.label]:(null==f?void 0:f.label)&&"label"===m,[null==f?void 0:f.content]:(null==f?void 0:f.content)&&"content"===m})},null!=u&&t.createElement("span",{style:p},u),null!=g&&t.createElement("span",{style:O},g));return t.createElement(l,{colSpan:r,style:s,className:(0,i.default)(`${a}-item`,n)},t.createElement("div",{className:`${a}-item-container`},null!=u&&t.createElement("span",{style:p,className:(0,i.default)(`${a}-item-label`,null==f?void 0:f.label,{[`${a}-item-no-colon`]:!h})},u),null!=g&&t.createElement("span",{style:O,className:(0,i.default)(`${a}-item-content`,null==f?void 0:f.content)},g)))};function g(e,{colon:i,prefixCls:a,bordered:l},{component:r,type:n,showLabel:s,showContent:o,labelStyle:d,contentStyle:A,styles:c}){return e.map(({label:e,children:g,prefixCls:h=a,className:m,style:b,labelStyle:f,contentStyle:p,span:O=1,key:x,styles:E},I)=>"string"==typeof r?t.createElement(u,{key:`${n}-${x||I}`,className:m,style:b,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==c?void 0:c.label),f),null==E?void 0:E.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},A),null==c?void 0:c.content),p),null==E?void 0:E.content)},span:O,colon:i,component:r,itemPrefixCls:h,bordered:l,label:s?e:null,content:o?g:null,type:n}):[t.createElement(u,{key:`label-${x||I}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==c?void 0:c.label),b),f),null==E?void 0:E.label),span:1,colon:i,component:r[0],itemPrefixCls:h,bordered:l,label:e,type:"label"}),t.createElement(u,{key:`content-${x||I}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A),null==c?void 0:c.content),b),p),null==E?void 0:E.content),span:2*O-1,component:r[1],itemPrefixCls:h,bordered:l,content:g,type:"content"})])}let h=e=>{let i=t.useContext(o),{prefixCls:a,vertical:l,row:r,index:n,bordered:s}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${n}`,className:`${a}-row`},g(r,e,Object.assign({component:"th",type:"label",showLabel:!0},i))),t.createElement("tr",{key:`content-${n}`,className:`${a}-row`},g(r,e,Object.assign({component:"td",type:"content",showContent:!0},i)))):t.createElement("tr",{key:n,className:`${a}-row`},g(r,e,Object.assign({component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},i)))};e.i(296059);var m=e.i(915654),b=e.i(183293),f=e.i(246422),p=e.i(838378);let O=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:i,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:r,colonMarginLeft:n,titleMarginBottom:s}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,b.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:i}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.padding)} ${(0,m.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:i,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingSM)} ${(0,m.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingXS)} ${(0,m.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:s},[`${t}-title`]:Object.assign(Object.assign({},b.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:i,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:a,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,m.unit)(n)} ${(0,m.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,p.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var x=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let E=e=>{let u,{prefixCls:g,title:m,extra:b,column:f,colon:p=!0,bordered:E,layout:I,children:v,className:y,rootClassName:C,style:w,size:S,labelStyle:R,contentStyle:L,styles:_,items:B,classNames:T}=e,k=x(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:$,direction:H,className:M,style:j,classNames:N,styles:D}=(0,l.useComponentConfig)("descriptions"),U=$("descriptions",g),z=(0,n.default)(),P=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,a.matchScreen)(z,Object.assign(Object.assign({},s),f)))?e:3},[z,f]),W=(u=t.useMemo(()=>B||(0,d.default)(v).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[B,v]),t.useMemo(()=>u.map(e=>{var{span:t}=e,i=A(e,["span"]);return"filled"===t?Object.assign(Object.assign({},i),{filled:!0}):Object.assign(Object.assign({},i),{span:"number"==typeof t?t:(0,a.matchScreen)(z,t)})}),[u,z])),G=(0,r.default)(S),q=((e,i)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,r;return t=[],a=[],l=!1,r=0,i.filter(e=>e).forEach(i=>{let{filled:n}=i,s=c(i,["filled"]);if(n){a.push(s),t.push(a),a=[],r=0;return}let o=e-r;(r+=i.span||1)>=e?(r>e?(l=!0,a.push(Object.assign(Object.assign({},s),{span:o}))):a.push(s),t.push(a),a=[],r=0):a.push(s)}),a.length>0&&t.push(a),[t=t.map(t=>{let i=t.reduce((e,t)=>e+(t.span||1),0);if(i({labelStyle:R,contentStyle:L,styles:{content:Object.assign(Object.assign({},D.content),null==_?void 0:_.content),label:Object.assign(Object.assign({},D.label),null==_?void 0:_.label)},classNames:{label:(0,i.default)(N.label,null==T?void 0:T.label),content:(0,i.default)(N.content,null==T?void 0:T.content)}}),[R,L,_,T,N,D]);return Q(t.createElement(o.Provider,{value:K},t.createElement("div",Object.assign({className:(0,i.default)(U,M,N.root,null==T?void 0:T.root,{[`${U}-${G}`]:G&&"default"!==G,[`${U}-bordered`]:!!E,[`${U}-rtl`]:"rtl"===H},y,C,F,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},j),D.root),null==_?void 0:_.root),w)},k),(m||b)&&t.createElement("div",{className:(0,i.default)(`${U}-header`,N.header,null==T?void 0:T.header),style:Object.assign(Object.assign({},D.header),null==_?void 0:_.header)},m&&t.createElement("div",{className:(0,i.default)(`${U}-title`,N.title,null==T?void 0:T.title),style:Object.assign(Object.assign({},D.title),null==_?void 0:_.title)},m),b&&t.createElement("div",{className:(0,i.default)(`${U}-extra`,N.extra,null==T?void 0:T.extra),style:Object.assign(Object.assign({},D.extra),null==_?void 0:_.extra)},b)),t.createElement("div",{className:`${U}-view`},t.createElement("table",null,t.createElement("tbody",null,q.map((e,i)=>t.createElement(h,{key:i,index:i,colon:p,prefixCls:U,vertical:"vertical"===I,bordered:E,row:e}))))))))};E.Item=({children:e})=>e,e.s(["Descriptions",0,E],869216)},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let n=(0,i.normalizeRootPath)(l);return n&&(e===n||e.startsWith(`${n}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let n={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,n],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let o={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,o],434339);let d={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let n={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let o={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,o],837957);let d={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,d],227247);let A={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,A],708889);let c={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,c],859320);let u={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,u],586455);let g={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],921117);let h={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],21296);let m={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,m],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let n={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let o={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let n={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let o={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,o],768493);let d={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,d],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),n=e.i(901539),s=e.i(434339),o=e.i(857152),d=e.i(922158),A=e.i(896614),c=e.i(9774),u=e.i(503119),g=e.i(272896),h=e.i(144923),m=e.i(562171),b=e.i(533881),f=e.i(837957),p=e.i(227247),O=e.i(708889),x=e.i(859320),E=e.i(586455),I=e.i(921117),v=e.i(21296),y=e.i(579967),C=e.i(336712),w=e.i(770752),S=e.i(383963),R=e.i(862493),L=e.i(902860),_=e.i(901372),B=e.i(206258),T=e.i(176228),k=e.i(728685),$=e.i(39182),H=e.i(272967),M=e.i(551726),j=e.i(399495),N=e.i(740876),D=e.i(709103),U=e.i(277207),z=e.i(836473),P=e.i(768493),W=e.i(297720),G=e.i(980385);let q={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},Q={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},F={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},V={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},K={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},Y={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},X={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},Z={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},en={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},eo={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},ed={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},eA={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},ec={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eu=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eg={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eh=new Set(["bedrock_mantle"]),em={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":G.default.src,Anthropic:n.default.src,"Anthropic Text":n.default.src,AssemblyAI:s.default.src,Azure:$.default.src,"Azure AI Foundry (Studio)":$.default.src,"Azure Text":$.default.src,Baseten:o.default.src,"Amazon Bedrock":d.default.src,"Amazon Bedrock Mantle":d.default.src,"AWS SageMaker":d.default.src,Cerebras:A.default.src,Cloudflare:c.default.src,Codestral:M.default.src,Cohere:u.default.src,"Cohere Chat":u.default.src,Cometapi:g.default.src,Cursor:h.default.src,"Databricks (Qwen API)":m.default.src,Dashscope:V.src,Deepseek:p.default.src,Deepgram:b.default.src,DeepInfra:f.default.src,ElevenLabs:O.default.src,"Fal AI":x.default.src,"Featherless Ai":E.default.src,"Fireworks AI":I.default.src,Friendliai:v.default.src,"Github Copilot":y.default.src,"Google AI Studio":C.default.src,Groq:w.default.src,vllm:en.src,Huggingface:S.default.src,Hyperbolic:R.default.src,Infinity:L.default.src,"Jina AI":_.default.src,"Lambda Ai":B.default.src,"Lm Studio":T.default.src,"Meta Llama":k.default.src,MiniMax:H.default.src,"Mistral AI":M.default.src,Moonshot:j.default.src,Morph:N.default.src,Nebius:D.default.src,Novita:U.default.src,"Nvidia Nim":z.default.src,Ollama:W.default.src,"Ollama Chat":W.default.src,Oobabooga:G.default.src,OpenAI:G.default.src,"Openai Like":G.default.src,"OpenAI Text Completion":G.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":G.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":G.default.src,Openrouter:q.src,"Oracle Cloud Infrastructure (OCI)":Q.src,Perplexity:F.src,Recraft:K.src,Replicate:Y.src,RunwayML:J.src,Sagemaker:d.default.src,Sambanova:X.src,"SAP Generative AI Hub":Z.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":M.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:P.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":C.default.src,"Vertex Ai Beta":C.default.src,Vllm:en.src,VolcEngine:es.src,"Voyage AI":eo.src,Watsonx:ed.src,"Watsonx Text":ed.src,xAI:eA.src,Xinference:ec.src};e.s(["Providers",()=>eu,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(em[e])??"",displayName:e}}let t=Object.keys(eg).find(t=>eg[t].toLowerCase()===e.toLowerCase())??Object.keys(eg).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=eu[t];return{logo:(0,i.resolveLogoSrc)(em[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=eg[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eh.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,em,"provider_map",0,eg],916925)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/025ocjcb8e481.js b/litellm/proxy/_experimental/out/_next/static/chunks/025ocjcb8e481.js
deleted file mode 100644
index d45da443d18..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/025ocjcb8e481.js
+++ /dev/null
@@ -1,7 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,244451,e=>{"use strict";let t;e.i(247167);var r=e.i(271645),a=e.i(343794),i=e.i(242064),o=e.i(763731),l=e.i(174428);let n=80*Math.PI,s=e=>{let{dotClassName:t,style:i,hasCircleCls:o}=e;return r.createElement("circle",{className:(0,a.default)(`${t}-circle`,{[`${t}-circle-bg`]:o}),r:40,cx:50,cy:50,strokeWidth:20,style:i})},c=({percent:e,prefixCls:t})=>{let i=`${t}-dot`,o=`${i}-holder`,c=`${o}-hidden`,[d,u]=r.useState(!1);(0,l.default)(()=>{0!==e&&u(!0)},[0!==e]);let f=Math.max(Math.min(e,100),0);if(!d)return null;let m={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*f/100} ${n*(100-f)/100}`};return r.createElement("span",{className:(0,a.default)(o,`${i}-progress`,f<=0&&c)},r.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f},r.createElement(s,{dotClassName:i,hasCircleCls:!0}),r.createElement(s,{dotClassName:i,style:m})))};function d(e){let{prefixCls:t,percent:i=0}=e,o=`${t}-dot`,l=`${o}-holder`,n=`${l}-hidden`;return r.createElement(r.Fragment,null,r.createElement("span",{className:(0,a.default)(l,i>0&&n)},r.createElement("span",{className:(0,a.default)(o,`${t}-dot-spin`)},[1,2,3,4].map(e=>r.createElement("i",{className:`${t}-dot-item`,key:e})))),r.createElement(c,{prefixCls:t,percent:i}))}function u(e){var t;let{prefixCls:i,indicator:l,percent:n}=e,s=`${i}-dot`;return l&&r.isValidElement(l)?(0,o.cloneElement)(l,{className:(0,a.default)(null==(t=l.props)?void 0:t.className,s),percent:n}):r.createElement(d,{prefixCls:i,percent:n})}e.i(296059);var f=e.i(694758),m=e.i(183293),p=e.i(246422),v=e.i(838378);let h=new f.Keyframes("antSpinMove",{to:{opacity:1}}),g=new f.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),b=(0,p.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(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 ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${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 ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:h,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:g,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,v.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:r}}),y=[[30,.05],[70,.03],[96,.01]];var $=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let S=e=>{var o;let{prefixCls:l,spinning:n=!0,delay:s=0,className:c,rootClassName:d,size:f="default",tip:m,wrapperClassName:p,style:v,children:h,fullscreen:g=!1,indicator:S,percent:C}=e,x=$(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:w,direction:k,className:E,style:z,indicator:O}=(0,i.useComponentConfig)("spin"),N=w("spin",l),[M,D,j]=b(N),[P,I]=r.useState(()=>n&&(!n||!s||!!Number.isNaN(Number(s)))),T=function(e,t){let[a,i]=r.useState(0),o=r.useRef(null),l="auto"===t;return r.useEffect(()=>(l&&e&&(i(0),o.current=setInterval(()=>{i(e=>{let t=100-e;for(let r=0;r{o.current&&(clearInterval(o.current),o.current=null)}),[l,e]),l?a:t}(P,C);r.useEffect(()=>{if(n){let e=function(e,t,r){var a,i=r||{},o=i.noTrailing,l=void 0!==o&&o,n=i.noLeading,s=void 0!==n&&n,c=i.debounceMode,d=void 0===c?void 0:c,u=!1,f=0;function m(){a&&clearTimeout(a)}function p(){for(var r=arguments.length,i=Array(r),o=0;oe?s?(f=Date.now(),l||(a=setTimeout(d?v:p,e))):p():!0!==l&&(a=setTimeout(d?v:p,void 0===d?e-c:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly;m(),u=!(void 0!==t&&t)},p}(s,()=>{I(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}I(!1)},[s,n]);let _=r.useMemo(()=>void 0!==h&&!g,[h,g]),H=(0,a.default)(N,E,{[`${N}-sm`]:"small"===f,[`${N}-lg`]:"large"===f,[`${N}-spinning`]:P,[`${N}-show-text`]:!!m,[`${N}-rtl`]:"rtl"===k},c,!g&&d,D,j),R=(0,a.default)(`${N}-container`,{[`${N}-blur`]:P}),B=null!=(o=null!=S?S:O)?o:t,L=Object.assign(Object.assign({},z),v),q=r.createElement("div",Object.assign({},x,{style:L,className:H,"aria-live":"polite","aria-busy":P}),r.createElement(u,{prefixCls:N,indicator:B,percent:T}),m&&(_||g)?r.createElement("div",{className:`${N}-text`},m):null);return M(_?r.createElement("div",Object.assign({},x,{className:(0,a.default)(`${N}-nested-loading`,p,D,j)}),P&&r.createElement("div",{key:"loading"},q),r.createElement("div",{className:R,key:"container"},h)):g?r.createElement("div",{className:(0,a.default)(`${N}-fullscreen`,{[`${N}-fullscreen-show`]:P},d,D,j)},q):q)};S.setDefaultIndicator=e=>{t=e},e.s(["default",0,S],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(i.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["default",0,o],184163)},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},695411,e=>{"use strict";var t=e.i(602869);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,a){let i=(0,t.useDebouncer)(e,a).maybeExecute;return(0,r.useCallback)((...e)=>i(...e),[i])}])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(i.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["RobotOutlined",0,o],983561)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),i=e.i(602869);e.s(["default",0,({onChange:e,value:o,className:l,accessToken:n,placeholder:s="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,i.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:s,onChange:e,value:o,loading:f,className:l,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(i.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["CheckCircleOutlined",0,o],245704)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(i.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["ClockCircleOutlined",0,o],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(i.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["default",0,o],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var i=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(i.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["ArrowLeftOutlined",0,o],447566)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),i=e.i(673706),o=e.i(271645);let l=o.default.forwardRef((e,l)=>{let{color:n,children:s,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return o.default.createElement("p",Object.assign({ref:l,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",n?(0,i.getColorClassNames)(n,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),s)});l.displayName="Title",e.s(["Title",0,l],629569)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),i=e.i(95779),o=e.i(444755),l=e.i(673706);let n=(0,l.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:c="",decorationColor:d,children:u,className:f}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,o.tremorTwMerge)(n("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,l.getColorClassNames)(d,i.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),f)},m),u)});s.displayName="Card",e.s(["Card",0,s],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),i=e.i(392221),o=e.i(703923),l=e.i(343794),n=e.i(914949),s=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,s.forwardRef)(function(e,d){var u=e.prefixCls,f=void 0===u?"rc-checkbox":u,m=e.className,p=e.style,v=e.checked,h=e.disabled,g=e.defaultChecked,b=e.type,y=void 0===b?"checkbox":b,$=e.title,S=e.onChange,C=(0,o.default)(e,c),x=(0,s.useRef)(null),w=(0,s.useRef)(null),k=(0,n.default)(void 0!==g&&g,{value:v}),E=(0,i.default)(k,2),z=E[0],O=E[1];(0,s.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=x.current)||t.focus(e)},blur:function(){var e;null==(e=x.current)||e.blur()},input:x.current,nativeElement:w.current}});var N=(0,l.default)(f,m,(0,a.default)((0,a.default)({},"".concat(f,"-checked"),z),"".concat(f,"-disabled"),h));return s.createElement("span",{className:N,title:$,style:p,ref:w},s.createElement("input",(0,t.default)({},C,{className:"".concat(f,"-input"),ref:x,onChange:function(t){h||("checked"in e||O(t.target.checked),null==S||S({target:(0,r.default)((0,r.default)({},e),{},{type:y,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:h,checked:!!z,type:y})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,d],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=s.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),i=e.i(611935),o=e.i(121872),l=e.i(26905),n=e.i(242064),s=e.i(937328),c=e.i(321883),d=e.i(62139);let u=t.default.createContext(null);e.i(296059);var f=e.i(915654),m=e.i(183293),p=e.i(246422),v=e.i(838378);function h(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,m.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,f.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
- ${r}:not(${r}-disabled),
- ${t}:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
- ${r}-checked:not(${r}-disabled),
- ${t}-checked:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,v.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let g=(0,p.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[h(t,e)]);e.s(["default",0,g,"getStyle",0,h],236836);var b=e.i(681216),y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let $=t.forwardRef((e,f)=>{var m;let{prefixCls:p,className:v,rootClassName:h,children:$,indeterminate:S=!1,style:C,onMouseEnter:x,onMouseLeave:w,skipGroup:k=!1,disabled:E}=e,z=y(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:O,direction:N,checkbox:M}=t.useContext(n.ConfigContext),D=t.useContext(u),{isFormItemInput:j}=t.useContext(d.FormItemInputContext),P=t.useContext(s.default),I=null!=(m=(null==D?void 0:D.disabled)||E)?m:P,T=t.useRef(z.value),_=t.useRef(null),H=(0,i.composeRef)(f,_);t.useEffect(()=>{null==D||D.registerValue(z.value)},[]),t.useEffect(()=>{if(!k)return z.value!==T.current&&(null==D||D.cancelValue(T.current),null==D||D.registerValue(z.value),T.current=z.value),()=>null==D?void 0:D.cancelValue(z.value)},[z.value]),t.useEffect(()=>{var e;(null==(e=_.current)?void 0:e.input)&&(_.current.input.indeterminate=S)},[S]);let R=O("checkbox",p),B=(0,c.default)(R),[L,q,X]=g(R,B),G=Object.assign({},z);D&&!k&&(G.onChange=(...e)=>{z.onChange&&z.onChange.apply(z,e),D.toggleOption&&D.toggleOption({label:$,value:z.value})},G.name=D.name,G.checked=D.value.includes(z.value));let V=(0,r.default)(`${R}-wrapper`,{[`${R}-rtl`]:"rtl"===N,[`${R}-wrapper-checked`]:G.checked,[`${R}-wrapper-disabled`]:I,[`${R}-wrapper-in-form-item`]:j},null==M?void 0:M.className,v,h,X,B,q),F=(0,r.default)({[`${R}-indeterminate`]:S},l.TARGET_CLS,q),[A,W]=(0,b.default)(G.onClick);return L(t.createElement(o.default,{component:"Checkbox",disabled:I},t.createElement("label",{className:V,style:Object.assign(Object.assign({},null==M?void 0:M.style),C),onMouseEnter:x,onMouseLeave:w,onClick:A},t.createElement(a.default,Object.assign({},G,{onClick:W,prefixCls:R,className:F,disabled:I,ref:H})),null!=$&&t.createElement("span",{className:`${R}-label`},$))))});var S=e.i(8211),C=e.i(529681),x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let w=t.forwardRef((e,a)=>{let{defaultValue:i,children:o,options:l=[],prefixCls:s,className:d,rootClassName:f,style:m,onChange:p}=e,v=x(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:h,direction:b}=t.useContext(n.ConfigContext),[y,w]=t.useState(v.value||i||[]),[k,E]=t.useState([]);t.useEffect(()=>{"value"in v&&w(v.value||[])},[v.value]);let z=t.useMemo(()=>l.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[l]),O=e=>{E(t=>t.filter(t=>t!==e))},N=e=>{E(t=>[].concat((0,S.default)(t),[e]))},M=e=>{let t=y.indexOf(e.value),r=(0,S.default)(y);-1===t?r.push(e.value):r.splice(t,1),"value"in v||w(r),null==p||p(r.filter(e=>k.includes(e)).sort((e,t)=>z.findIndex(t=>t.value===e)-z.findIndex(e=>e.value===t)))},D=h("checkbox",s),j=`${D}-group`,P=(0,c.default)(D),[I,T,_]=g(D,P),H=(0,C.default)(v,["value","disabled"]),R=l.length?z.map(e=>t.createElement($,{prefixCls:D,key:e.value.toString(),disabled:"disabled"in e?e.disabled:v.disabled,value:e.value,checked:y.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${j}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):o,B=t.useMemo(()=>({toggleOption:M,value:y,disabled:v.disabled,name:v.name,registerValue:N,cancelValue:O}),[M,y,v.disabled,v.name,N,O]),L=(0,r.default)(j,{[`${j}-rtl`]:"rtl"===b},d,f,_,P,T);return I(t.createElement("div",Object.assign({className:L,style:m},H,{ref:a}),t.createElement(u.Provider,{value:B},R)))});$.Group=w,$.__ANT_CHECKBOX=!0,e.s(["default",0,$],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),i=e.i(602869);function o(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:l,className:n,accessToken:s,disabled:c,onPoliciesLoaded:d})=>{let[u,f]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){p(!0);try{let e=await (0,i.getPoliciesList)(s);e.policies&&(f(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{p(!1)}}})()},[s,d]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:l,loading:m,className:n,allowClear:!0,options:o(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",0,o])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),i=e.i(602869);e.s(["default",0,({onChange:e,value:o,className:l,accessToken:n,disabled:s})=>{let[c,d]=(0,r.useState)([]),[u,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){f(!0);try{let e=await (0,i.getGuardrailsList)(n);e.guardrails&&d(e.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{f(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:s,placeholder:s?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{e(t)},value:o,loading:u,className:l,allowClear:!0,options:c.map(e=>({label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/03c3h-nx-fb3y.js b/litellm/proxy/_experimental/out/_next/static/chunks/03c3h-nx-fb3y.js
new file mode 100644
index 00000000000..a44a9973265
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/03c3h-nx-fb3y.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95779,e=>{"use strict";var t=e.i(480731);t.BaseColors.Blue,t.BaseColors.Cyan,t.BaseColors.Sky,t.BaseColors.Indigo,t.BaseColors.Violet,t.BaseColors.Purple,t.BaseColors.Fuchsia,t.BaseColors.Slate,t.BaseColors.Gray,t.BaseColors.Zinc,t.BaseColors.Neutral,t.BaseColors.Stone,t.BaseColors.Red,t.BaseColors.Orange,t.BaseColors.Amber,t.BaseColors.Yellow,t.BaseColors.Lime,t.BaseColors.Green,t.BaseColors.Emerald,t.BaseColors.Teal,t.BaseColors.Pink,t.BaseColors.Rose,e.s(["colorPalette",0,{canvasBackground:50,lightBackground:100,background:500,darkBackground:600,darkestBackground:800,lightBorder:200,border:500,darkBorder:700,lightRing:200,ring:300,iconRing:500,lightText:400,text:500,iconText:600,darkText:700,darkestText:900,icon:500}])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),o=e.i(673706),a=e.i(271645);let n=a.default.forwardRef((e,n)=>{let{color:s,className:l,children:i}=e;return a.default.createElement("p",{ref:n,className:(0,r.tremorTwMerge)("text-tremor-default",s?(0,o.getColorClassNames)(s,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},i)});n.displayName="Text",e.s(["default",0,n],936325),e.s(["Text",0,n],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),o=e.i(271645);let a=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:a[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,l=(e,t,r,o,a)=>{clearTimeout(o.current);let s=n(e);t(s),r.current=s,a&&a({current:s})};var i=e.i(480731),c=e.i(444755),d=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return o.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),o.default.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var m=e.i(95779);let f={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},p=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,d.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,c.tremorTwMerge)((0,d.getColorClassNames)(t,m.colorPalette.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},g=(0,d.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:a,needMargin:n,transitionStatus:s})=>{let l=n?r===i.HorizontalPositions.Left?(0,c.tremorTwMerge)("-ml-1","mr-1.5"):(0,c.tremorTwMerge)("-mr-1","ml-1.5"):"",d=(0,c.tremorTwMerge)("w-0 h-0"),m={default:d,entering:d,entered:t,exiting:t,exited:d};return e?o.default.createElement(u,{className:(0,c.tremorTwMerge)(g("icon"),"animate-spin shrink-0",l,m.default,m[s]),style:{transition:"width 150ms"}}):o.default.createElement(a,{className:(0,c.tremorTwMerge)(g("icon"),"shrink-0",t,l)})},h=o.default.forwardRef((e,a)=>{let{icon:u,iconPosition:m=i.HorizontalPositions.Left,size:h=i.Sizes.SM,color:x,variant:v="primary",disabled:C,loading:y=!1,loadingText:k,children:w,tooltip:E,className:T}=e,N=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),S=y||C,$=void 0!==u||y,P=y&&k,I=!(!w&&!P),M=(0,c.tremorTwMerge)(f[h].height,f[h].width),F="light"!==v?(0,c.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",R=p(v,x),O=("light"!==v?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}})[h],{tooltipProps:A,getReferenceProps:B}=(0,r.useTooltip)(300),[j,D]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:a,timeout:i,initialEntered:c,mountOnEnter:d,unmountOnExit:u,onStateChange:m}={})=>{let[f,p]=(0,o.useState)(()=>n(c?2:s(d))),g=(0,o.useRef)(f),b=(0,o.useRef)(0),[h,x]="object"==typeof i?[i.enter,i.exit]:[i,i],v=(0,o.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(t)}})(g.current._s,u);e&&l(e,p,g,b,m)},[m,u]);return[f,(0,o.useCallback)(o=>{let n=e=>{switch(l(e,p,g,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(v,h));break;case 4:x>=0&&(b.current=((...e)=>setTimeout(...e))(v,x));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},i=g.current.isEnter;"boolean"!=typeof o&&(o=!i),o?i||n(e?+!r:2):i&&n(t?a?3:4:s(u))},[v,m,e,t,r,a,h,x,u]),v]})({timeout:50});return(0,o.useEffect)(()=>{D(y)},[y]),o.default.createElement("button",Object.assign({ref:(0,d.mergeRefs)([a,A.refs.setReference]),className:(0,c.tremorTwMerge)(g("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",F,O.paddingX,O.paddingY,O.fontSize,R.textColor,R.bgColor,R.borderColor,R.hoverBorderColor,S?"opacity-50 cursor-not-allowed":(0,c.tremorTwMerge)(p(v,x).hoverTextColor,p(v,x).hoverBgColor,p(v,x).hoverBorderColor),T),disabled:S},B,N),o.default.createElement(r.default,Object.assign({text:E},A)),$&&m!==i.HorizontalPositions.Right?o.default.createElement(b,{loading:y,iconSize:M,iconPosition:m,Icon:u,transitionStatus:j.status,needMargin:I}):null,P||w?o.default.createElement("span",{className:(0,c.tremorTwMerge)(g("text"),"text-tremor-default whitespace-nowrap")},P?k:w):null,$&&m===i.HorizontalPositions.Right?o.default.createElement(b,{loading:y,iconSize:M,iconPosition:m,Icon:u,transitionStatus:j.status,needMargin:I}):null)});h.displayName="Button",e.s(["Button",0,h],994388)},2788,e=>{"use strict";let t;var r=e.i(700020),o=((t=o||{})[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t);let a=(0,r.forwardRefWithAs)(function(e,t){var o;let{features:a=1,...n}=e,s={ref:t,"aria-hidden":(2&a)==2||(null!=(o=n["aria-hidden"])?o:void 0),hidden:(4&a)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&a)==4&&(2&a)!=2&&{display:"none"}}};return(0,r.useRender)()({ourProps:s,theirProps:n,slot:{},defaultTag:"span",name:"Hidden"})});e.s(["Hidden",0,a,"HiddenFeatures",0,o])},553521,e=>{"use strict";var t=e.i(271645),r=e.i(835696);e.s(["useIsMounted",0,function(){let e=(0,t.useRef)(!1);return(0,r.useIsoMorphicEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}])},652265,e=>{"use strict";let t,r,o,a,n;e.i(544508);var s=e.i(397701),l=e.i(402155);let i=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),c=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var d=((t=d||{})[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t),u=((r=u||{})[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r),m=((o=m||{})[o.Previous=-1]="Previous",o[o.Next=1]="Next",o);function f(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(i)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var p=((a=p||{})[a.Strict=0]="Strict",a[a.Loose=1]="Loose",a),g=((n=g||{})[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n);function b(e,t=e=>e){return e.slice().sort((e,r)=>{let o=t(e),a=t(r);if(null===o||null===a)return 0;let n=o.compareDocumentPosition(a);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function h(e,t,{sorted:r=!0,relativeTo:o=null,skipElements:a=[]}={}){var n,s,l;let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,d=Array.isArray(e)?r?b(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(c)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):f(e);a.length>0&&d.length>1&&(d=d.filter(e=>!a.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),o=null!=o?o:i.activeElement;let u=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,d.indexOf(o))-1;if(4&t)return Math.max(0,d.indexOf(o))+1;if(8&t)return d.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=32&t?{preventScroll:!0}:{},g=0,x=d.length,v;do{if(g>=x||g+x<=0)return 0;let e=m+g;if(16&t)e=(e+x)%x;else{if(e<0)return 3;if(e>=x)return 1}null==(v=d[e])||v.focus(p),g+=u}while(v!==i.activeElement)return 6&t&&null!=(l=null==(s=null==(n=v)?void 0:n.matches)?void 0:s.call(n,"textarea,input"))&&l&&v.select(),2}"u">typeof window&&"u">typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["Focus",0,d,"FocusResult",0,u,"FocusableMode",0,p,"focusFrom",0,function(e,t){return h(f(),t,{relativeTo:e})},"focusIn",0,h,"getFocusableElements",0,f,"isFocusableElement",0,function(e,t=0){var r;return e!==(null==(r=(0,l.getOwnerDocument)(e))?void 0:r.body)&&(0,s.match)(t,{0:()=>e.matches(i),1(){let t=e;for(;null!==t;){if(t.matches(i))return!0;t=t.parentElement}return!1}})},"sortByDomNode",0,b])},970554,e=>{"use strict";let t,r,o;var a=e.i(783222),n=e.i(433336),s=e.i(271645),l=e.i(394487),i=e.i(914189),c=e.i(835696),d=e.i(941444),u=e.i(144279),m=e.i(294316),f=e.i(553521),p=e.i(2788);function g({onFocus:e}){let[t,r]=(0,s.useState)(!0),o=(0,f.useIsMounted)();return t?s.default.createElement(p.Hidden,{as:"button",type:"button",features:p.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let a,n=50;a=requestAnimationFrame(function t(){if(n--<=0){a&&cancelAnimationFrame(a);return}if(e()){if(cancelAnimationFrame(a),!o.current)return;r(!1);return}a=requestAnimationFrame(t)})}}):null}var b=e.i(652265),h=e.i(397701),x=e.i(368578),v=e.i(402155),C=e.i(700020);let y=s.createContext(null);function k({children:e}){let t=s.useRef({groups:new Map,get(e,t){var r;let o=this.groups.get(e);o||(o=new Map,this.groups.set(e,o));let a=null!=(r=o.get(t))?r:0;return o.set(t,a+1),[Array.from(o.keys()).indexOf(t),function(){let e=o.get(t);e>1?o.set(t,e-1):o.delete(t)}]}});return s.createElement(y.Provider,{value:t},e)}function w(e){let t=s.useContext(y);if(!t)throw Error("You must wrap your component in a ");let r=s.useId(),[o,a]=t.current.get(e,r);return s.useEffect(()=>a,[]),o}var E=e.i(998348),T=((t=T||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),N=((r=N||{})[r.Less=-1]="Less",r[r.Equal=0]="Equal",r[r.Greater=1]="Greater",r),S=((o=S||{})[o.SetSelectedIndex=0]="SetSelectedIndex",o[o.RegisterTab=1]="RegisterTab",o[o.UnregisterTab=2]="UnregisterTab",o[o.RegisterPanel=3]="RegisterPanel",o[o.UnregisterPanel=4]="UnregisterPanel",o);let $={0(e,t){var r;let o=(0,b.sortByDomNode)(e.tabs,e=>e.current),a=(0,b.sortByDomNode)(e.panels,e=>e.current),n=o.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),s={...e,tabs:o,panels:a};if(t.index<0||t.index>o.length-1){let r=(0,h.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,h.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===n.length)return s;let a=(0,h.match)(r,{0:()=>o.indexOf(n[0]),1:()=>o.indexOf(n[n.length-1])});return{...s,selectedIndex:-1===a?e.selectedIndex:a}}let l=o.slice(0,t.index),i=[...o.slice(t.index),...l].find(e=>n.includes(e));if(!i)return s;let c=null!=(r=o.indexOf(i))?r:e.selectedIndex;return -1===c&&(c=e.selectedIndex),{...s,selectedIndex:c}},1(e,t){if(e.tabs.includes(t.tab))return e;let r=e.tabs[e.selectedIndex],o=(0,b.sortByDomNode)([...e.tabs,t.tab],e=>e.current),a=e.selectedIndex;return e.info.current.isControlled||-1===(a=o.indexOf(r))&&(a=e.selectedIndex),{...e,tabs:o,selectedIndex:a}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,b.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},P=(0,s.createContext)(null);function I(e){let t=(0,s.useContext)(P);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,I),t}return t}P.displayName="TabsDataContext";let M=(0,s.createContext)(null);function F(e){let t=(0,s.useContext)(M);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,F),t}return t}function R(e,t){return(0,h.match)(t.type,$,e,t)}M.displayName="TabsActionsContext";let O=C.RenderFeatures.RenderStrategy|C.RenderFeatures.Static,A=Object.assign((0,C.forwardRefWithAs)(function(e,t){var r,o;let d=(0,s.useId)(),{id:f=`headlessui-tabs-tab-${d}`,disabled:p=!1,autoFocus:g=!1,...y}=e,{orientation:k,activation:T,selectedIndex:N,tabs:S,panels:$}=I("Tab"),P=F("Tab"),M=I("Tab"),[R,O]=(0,s.useState)(null),A=(0,s.useRef)(null),B=(0,m.useSyncRefs)(A,t,O);(0,c.useIsoMorphicEffect)(()=>P.registerTab(A),[P,A]);let j=w("tabs"),D=S.indexOf(A);-1===D&&(D=j);let z=D===N,L=(0,i.useEvent)(e=>{var t;let r=e();if(r===b.FocusResult.Success&&"auto"===T){let e=null==(t=(0,v.getOwnerDocument)(A))?void 0:t.activeElement,r=M.tabs.findIndex(t=>t.current===e);-1!==r&&P.change(r)}return r}),W=(0,i.useEvent)(e=>{let t=S.map(e=>e.current).filter(Boolean);if(e.key===E.Keys.Space||e.key===E.Keys.Enter){e.preventDefault(),e.stopPropagation(),P.change(D);return}switch(e.key){case E.Keys.Home:case E.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),L(()=>(0,b.focusIn)(t,b.Focus.First));case E.Keys.End:case E.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),L(()=>(0,b.focusIn)(t,b.Focus.Last))}if(L(()=>(0,h.match)(k,{vertical:()=>e.key===E.Keys.ArrowUp?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===E.Keys.ArrowDown?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error,horizontal:()=>e.key===E.Keys.ArrowLeft?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===E.Keys.ArrowRight?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error}))===b.FocusResult.Success)return e.preventDefault()}),_=(0,s.useRef)(!1),X=(0,i.useEvent)(()=>{var e;_.current||(_.current=!0,null==(e=A.current)||e.focus({preventScroll:!0}),P.change(D),(0,x.microTask)(()=>{_.current=!1}))}),H=(0,i.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:K,focusProps:G}=(0,a.useFocusRing)({autoFocus:g}),{isHovered:V,hoverProps:Y}=(0,n.useHover)({isDisabled:p}),{pressed:U,pressProps:q}=(0,l.useActivePress)({disabled:p}),Q=(0,s.useMemo)(()=>({selected:z,hover:V,active:U,focus:K,autofocus:g,disabled:p}),[z,V,K,U,g,p]),Z=(0,C.mergeProps)({ref:B,onKeyDown:W,onMouseDown:H,onClick:X,id:f,role:"tab",type:(0,u.useResolveButtonType)(e,R),"aria-controls":null==(o=null==(r=$[D])?void 0:r.current)?void 0:o.id,"aria-selected":z,tabIndex:z?0:-1,disabled:p||void 0,autoFocus:g},G,Y,q);return(0,C.useRender)()({ourProps:Z,theirProps:y,slot:Q,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,C.forwardRefWithAs)(function(e,t){let{defaultIndex:r=0,vertical:o=!1,manual:a=!1,onChange:n,selectedIndex:l=null,...u}=e,f=o?"vertical":"horizontal",p=a?"manual":"auto",h=null!==l,x=(0,d.useLatestValue)({isControlled:h}),v=(0,m.useSyncRefs)(t),[y,w]=(0,s.useReducer)(R,{info:x,selectedIndex:null!=l?l:r,tabs:[],panels:[]}),E=(0,s.useMemo)(()=>({selectedIndex:y.selectedIndex}),[y.selectedIndex]),T=(0,d.useLatestValue)(n||(()=>{})),N=(0,d.useLatestValue)(y.tabs),S=(0,s.useMemo)(()=>({orientation:f,activation:p,...y}),[f,p,y]),$=(0,i.useEvent)(e=>(w({type:1,tab:e}),()=>w({type:2,tab:e}))),I=(0,i.useEvent)(e=>(w({type:3,panel:e}),()=>w({type:4,panel:e}))),F=(0,i.useEvent)(e=>{O.current!==e&&T.current(e),h||w({type:0,index:e})}),O=(0,d.useLatestValue)(h?e.selectedIndex:y.selectedIndex),A=(0,s.useMemo)(()=>({registerTab:$,registerPanel:I,change:F}),[]);(0,c.useIsoMorphicEffect)(()=>{w({type:0,index:null!=l?l:r})},[l]),(0,c.useIsoMorphicEffect)(()=>{if(void 0===O.current||y.tabs.length<=0)return;let e=(0,b.sortByDomNode)(y.tabs,e=>e.current);e.some((e,t)=>y.tabs[t]!==e)&&F(e.indexOf(y.tabs[O.current]))});let B=(0,C.useRender)();return s.default.createElement(k,null,s.default.createElement(M.Provider,{value:A},s.default.createElement(P.Provider,{value:S},S.tabs.length<=0&&s.default.createElement(g,{onFocus:()=>{var e,t;for(let r of N.current)if((null==(e=r.current)?void 0:e.tabIndex)===0)return null==(t=r.current)||t.focus(),!0;return!1}}),B({ourProps:{ref:v},theirProps:u,slot:E,defaultTag:"div",name:"Tabs"}))))}),List:(0,C.forwardRefWithAs)(function(e,t){let{orientation:r,selectedIndex:o}=I("Tab.List"),a=(0,m.useSyncRefs)(t),n=(0,s.useMemo)(()=>({selectedIndex:o}),[o]);return(0,C.useRender)()({ourProps:{ref:a,role:"tablist","aria-orientation":r},theirProps:e,slot:n,defaultTag:"div",name:"Tabs.List"})}),Panels:(0,C.forwardRefWithAs)(function(e,t){let{selectedIndex:r}=I("Tab.Panels"),o=(0,m.useSyncRefs)(t),a=(0,s.useMemo)(()=>({selectedIndex:r}),[r]);return(0,C.useRender)()({ourProps:{ref:o},theirProps:e,slot:a,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,C.forwardRefWithAs)(function(e,t){var r,o,n,l;let i=(0,s.useId)(),{id:d=`headlessui-tabs-panel-${i}`,tabIndex:u=0,...f}=e,{selectedIndex:g,tabs:b,panels:h}=I("Tab.Panel"),x=F("Tab.Panel"),v=(0,s.useRef)(null),y=(0,m.useSyncRefs)(v,t);(0,c.useIsoMorphicEffect)(()=>x.registerPanel(v),[x,v]);let k=w("panels"),E=h.indexOf(v);-1===E&&(E=k);let T=E===g,{isFocusVisible:N,focusProps:S}=(0,a.useFocusRing)(),$=(0,s.useMemo)(()=>({selected:T,focus:N}),[T,N]),P=(0,C.mergeProps)({ref:y,id:d,role:"tabpanel","aria-labelledby":null==(o=null==(r=b[E])?void 0:r.current)?void 0:o.id,tabIndex:T?u:-1},S),M=(0,C.useRender)();return T||null!=(n=f.unmount)&&!n||null!=(l=f.static)&&l?M({ourProps:P,theirProps:f,slot:$,defaultTag:"div",features:O,visible:T,name:"Tabs.Panel"}):s.default.createElement(p.Hidden,{"aria-hidden":"true",...P})})});e.s(["Tab",0,A],970554)},405371,910342,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731);let a=(0,r.createContext)(o.BaseColors.Blue);e.s(["default",0,a],910342);var n=e.i(970554),s=e.i(444755);let l=(0,e.i(673706).makeClassName)("TabList"),i=(0,r.createContext)("line"),c={line:(0,s.tremorTwMerge)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,s.tremorTwMerge)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},d=r.default.forwardRef((e,o)=>{let{color:d,variant:u="line",children:m,className:f}=e,p=(0,t.__rest)(e,["color","variant","children","className"]);return r.default.createElement(n.Tab.List,Object.assign({ref:o,className:(0,s.tremorTwMerge)(l("root"),"justify-start overflow-x-clip",c[u],f)},p),r.default.createElement(i.Provider,{value:u},r.default.createElement(a.Provider,{value:d},m)))});d.displayName="TabList",e.s(["TabVariantContext",0,i,"default",0,d],405371)},197647,e=>{"use strict";var t=e.i(290571),r=e.i(970554),o=e.i(95779),a=e.i(444755),n=e.i(673706),s=e.i(271645),l=e.i(405371),i=e.i(910342);let c=(0,n.makeClassName)("Tab"),d=s.default.forwardRef((e,d)=>{let{icon:u,className:m,children:f}=e,p=(0,t.__rest)(e,["icon","className","children"]),g=(0,s.useContext)(l.TabVariantContext),b=(0,s.useContext)(i.default);return s.default.createElement(r.Tab,Object.assign({ref:d,className:(0,a.tremorTwMerge)(c("root"),"flex whitespace-nowrap truncate max-w-xs outline-none data-focus-visible:ring text-tremor-default transition duration-100",function(e,t){switch(e){case"line":return(0,a.tremorTwMerge)("data-[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","[&:not([data-selected])]:dark:hover:border-dark-tremor-content-emphasis [&:not([data-selected])]:dark:hover:text-dark-tremor-content-emphasis [&:not([data-selected])]:dark:text-dark-tremor-content",t?(0,n.getColorClassNames)(t,o.colorPalette.border).selectBorderColor:["data-[selected]:border-tremor-brand data-[selected]:text-tremor-brand","data-[selected]:dark:border-dark-tremor-brand data-[selected]:dark:text-dark-tremor-brand"]);case"solid":return(0,a.tremorTwMerge)("border-transparent border rounded-tremor-small px-2.5 py-1","data-[selected]:border-tremor-border data-[selected]:bg-tremor-background data-[selected]:shadow-tremor-input [&:not([data-selected])]:hover:text-tremor-content-emphasis data-[selected]:text-tremor-brand [&:not([data-selected])]:text-tremor-content","dark:data-[selected]:border-dark-tremor-border dark:data-[selected]:bg-dark-tremor-background dark:data-[selected]:shadow-dark-tremor-input dark:[&:not([data-selected])]:hover:text-dark-tremor-content-emphasis dark:data-[selected]:text-dark-tremor-brand dark:[&:not([data-selected])]:text-dark-tremor-content",t?(0,n.getColorClassNames)(t,o.colorPalette.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(g,b),m,b&&(0,n.getColorClassNames)(b,o.colorPalette.text).selectTextColor)},p),u?s.default.createElement(u,{className:(0,a.tremorTwMerge)(c("icon"),"flex-none h-5 w-5",f?"mr-2":"")}):null,f?s.default.createElement("span",null,f):null)});d.displayName="Tab",e.s(["Tab",0,d],197647)},653824,e=>{"use strict";var t=e.i(290571),r=e.i(970554),o=e.i(444755),a=e.i(673706),n=e.i(271645);let s=(0,a.makeClassName)("TabGroup"),l=n.default.forwardRef((e,a)=>{let{defaultIndex:l,index:i,onIndexChange:c,children:d,className:u}=e,m=(0,t.__rest)(e,["defaultIndex","index","onIndexChange","children","className"]);return n.default.createElement(r.Tab.Group,Object.assign({as:"div",ref:a,defaultIndex:l,selectedIndex:i,onChange:c,className:(0,o.tremorTwMerge)(s("root"),"w-full",u)},m),d)});l.displayName="TabGroup",e.s(["TabGroup",0,l],653824)},881073,e=>{"use strict";var t=e.i(405371);e.s(["TabList",()=>t.default])},751734,144582,e=>{"use strict";var t=e.i(271645);let r=(0,t.createContext)(0);e.s(["default",0,r],751734);let o=(0,t.createContext)({selectedValue:void 0,handleValueChange:void 0});e.s(["default",0,o],144582)},404206,e=>{"use strict";var t=e.i(290571),r=e.i(751734),o=e.i(144582),a=e.i(444755),n=e.i(673706),s=e.i(271645);let l=(0,n.makeClassName)("TabPanel"),i=s.default.forwardRef((e,n)=>{let{children:i,className:c}=e,d=(0,t.__rest)(e,["children","className"]),{selectedValue:u}=(0,s.useContext)(o.default),m=u===(0,s.useContext)(r.default);return s.default.createElement("div",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"w-full mt-2",m?"":"hidden",c),"aria-selected":m?"true":"false"},d),i)});i.displayName="TabPanel",e.s(["TabPanel",0,i],404206)},723731,e=>{"use strict";var t=e.i(290571),r=e.i(970554),o=e.i(751734),a=e.i(144582),n=e.i(444755),s=e.i(673706),l=e.i(271645);let i=(0,s.makeClassName)("TabPanels"),c=l.default.forwardRef((e,s)=>{let{children:c,className:d}=e,u=(0,t.__rest)(e,["children","className"]);return l.default.createElement(r.Tab.Panels,Object.assign({as:"div",ref:s,className:(0,n.tremorTwMerge)(i("root"),"w-full",d)},u),({selectedIndex:e})=>l.default.createElement(a.default.Provider,{value:{selectedValue:e}},l.default.Children.map(c,(e,t)=>l.default.createElement(o.default.Provider,{value:t},e))))});c.displayName="TabPanels",e.s(["TabPanels",0,c],723731)},309821,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(135551),o=e.i(201072),a=e.i(121229),n=e.i(726289),s=e.i(864517),l=e.i(343794),i=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),m=e.i(703923),f={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var a=e.style;a.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(a.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),e.current},g=e.i(410160),b=e.i(392221),h=e.i(654310),x=0,v=(0,h.default)();let C=function(e){var r=t.useState(),o=(0,b.default)(r,2),a=o[0],n=o[1];return t.useEffect(function(){var e;n("rc_progress_".concat((v?(e=x,x+=1):e="TEST_OR_SSR",e)))},[]),e||a};var y=function(e){var r=e.bg,o=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},o)};function k(e,t){return Object.keys(e).map(function(r){var o=parseFloat(r),a="".concat(Math.floor(o*t),"%");return"".concat(e[r]," ").concat(a)})}var w=t.forwardRef(function(e,r){var o=e.prefixCls,a=e.color,n=e.gradientId,s=e.radius,l=e.style,i=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,m=e.gapDegree,f=a&&"object"===(0,g.default)(a),p=u/2,b=t.createElement("circle",{className:"".concat(o,"-circle-path"),r:s,cx:p,cy:p,stroke:f?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==i),style:l,ref:r});if(!f)return b;var h="".concat(n,"-conic"),x=k(a,(360-m)/360),v=k(a,1),C="conic-gradient(from ".concat(m?"".concat(180+m/2,"deg"):"0deg",", ").concat(x.join(", "),")"),w="linear-gradient(to ".concat(m?"bottom":"top",", ").concat(v.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:h},b),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(h,")")},t.createElement(y,{bg:w},t.createElement(y,{bg:C}))))}),E=function(e,t,r,o,a,n,s,l,i,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-o)/100*t;return"round"===i&&100!==o&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(a+r/100*360*((360-n)/360)+(0===n?0:({bottom:0,top:180,left:90,right:-90})[s]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},T=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function N(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let S=function(e){var r,o,a,n,s=(0,u.default)((0,u.default)({},f),e),i=s.id,c=s.prefixCls,b=s.steps,h=s.strokeWidth,x=s.trailWidth,v=s.gapDegree,y=void 0===v?0:v,k=s.gapPosition,S=s.trailColor,$=s.strokeLinecap,P=s.style,I=s.className,M=s.strokeColor,F=s.percent,R=(0,m.default)(s,T),O=C(i),A="".concat(O,"-gradient"),B=50-h/2,j=2*Math.PI*B,D=y>0?90+y/2:-90,z=(360-y)/360*j,L="object"===(0,g.default)(b)?b:{count:b,gap:2},W=L.count,_=L.gap,X=N(F),H=N(M),K=H.find(function(e){return e&&"object"===(0,g.default)(e)}),G=K&&"object"===(0,g.default)(K)?"butt":$,V=E(j,z,0,100,D,y,k,S,G,h),Y=p();return t.createElement("svg",(0,d.default)({className:(0,l.default)("".concat(c,"-circle"),I),viewBox:"0 0 ".concat(100," ").concat(100),style:P,id:i,role:"presentation"},R),!W&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:B,cx:50,cy:50,stroke:S,strokeLinecap:G,strokeWidth:x||h,style:V}),W?(r=Math.round(W*(X[0]/100)),o=100/W,a=0,Array(W).fill(null).map(function(e,n){var s=n<=r-1?H[0]:S,l=s&&"object"===(0,g.default)(s)?"url(#".concat(A,")"):void 0,i=E(j,z,a,o,D,y,k,s,"butt",h,_);return a+=(z-i.strokeDashoffset+_)*100/z,t.createElement("circle",{key:n,className:"".concat(c,"-circle-path"),r:B,cx:50,cy:50,stroke:l,strokeWidth:h,opacity:1,style:i,ref:function(e){Y[n]=e}})})):(n=0,X.map(function(e,r){var o=H[r]||H[H.length-1],a=E(j,z,n,e,D,y,k,o,G,h);return n+=e,t.createElement(w,{key:r,color:o,ptg:e,radius:B,prefixCls:c,gradientId:A,style:a,strokeLinecap:G,strokeWidth:h,gapDegree:y,ref:function(e){Y[r]=e},size:100})}).reverse()))};var $=e.i(491816);e.i(765846);var P=e.i(896091);function I(e){return!e||e<0?0:e>100?100:e}function M({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let F=(e,t,r)=>{var o,a,n,s;let l=-1,i=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(l="small"===e?2:14,i=null!=o?o:8):"number"==typeof e?[l,i]=[e,e]:[l=14,i=8]=Array.isArray(e)?e:[e.width,e.height],l*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?i=t||("small"===e?6:8):"number"==typeof e?[l,i]=[e,e]:[l=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[l,i]="small"===e?[60,60]:[120,120]:"number"==typeof e?[l,i]=[e,e]:Array.isArray(e)&&(l=null!=(a=null!=(o=e[0])?o:e[1])?a:120,i=null!=(s=null!=(n=e[0])?n:e[1])?s:120));return[l,i]},R=e=>{let{prefixCls:r,trailColor:o=null,strokeLinecap:a="round",gapPosition:n,gapDegree:s,width:i=120,type:c,children:d,success:u,size:m=i,steps:f}=e,[p,g]=F(m,"circle"),{strokeWidth:b}=e;void 0===b&&(b=Math.max(3/p*100,6));let h=t.useMemo(()=>s||0===s?s:"dashboard"===c?75:void 0,[s,c]),x=(({percent:e,success:t,successPercent:r})=>{let o=I(M({success:t,successPercent:r}));return[o,I(I(e)-o)]})(e),v="[object Object]"===Object.prototype.toString.call(e.strokeColor),C=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||P.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),y=(0,l.default)(`${r}-inner`,{[`${r}-circle-gradient`]:v}),k=t.createElement(S,{steps:f,percent:f?x[1]:x,strokeWidth:b,trailWidth:b,strokeColor:f?C[1]:C,strokeLinecap:a,trailColor:o,prefixCls:r,gapDegree:h,gapPosition:n||"dashboard"===c&&"bottom"||void 0}),w=p<=20,E=t.createElement("div",{className:y,style:{width:p,height:g,fontSize:.15*p+6}},k,!w&&d);return w?t.createElement($.default,{title:d},E):E};e.i(296059);var O=e.i(694758),A=e.i(915654),B=e.i(183293),j=e.i(246422),D=e.i(838378);let z="--progress-line-stroke-color",L="--progress-percent",W=e=>{let t=e?"100%":"-100%";return new O.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},_=(0,j.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,D.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,B.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${z})`]},height:"100%",width:`calc(1 / var(${L}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,A.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:W(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:W(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var X=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let H=e=>{let{prefixCls:r,direction:o,percent:a,size:n,strokeWidth:s,strokeColor:i,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:m,success:f}=e,{align:p,type:g}=m,b=i&&"string"!=typeof i?((e,t)=>{let{from:r=P.presetPrimaryColors.blue,to:o=P.presetPrimaryColors.blue,direction:a="rtl"===t?"to left":"to right"}=e,n=X(e,["from","to","direction"]);if(0!==Object.keys(n).length){let e,t=(e=[],Object.keys(n).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:n[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${a}, ${t})`;return{background:r,[z]:r}}let s=`linear-gradient(${a}, ${r}, ${o})`;return{background:s,[z]:s}})(i,o):{[z]:i,background:i},h="square"===c||"butt"===c?0:void 0,[x,v]=F(null!=n?n:[-1,s||("small"===n?6:8)],"line",{strokeWidth:s}),C=Object.assign(Object.assign({width:`${I(a)}%`,height:v,borderRadius:h},b),{[L]:I(a)/100}),y=M(e),k={width:`${I(y)}%`,height:v,borderRadius:h,backgroundColor:null==f?void 0:f.strokeColor},w=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:h}},t.createElement("div",{className:(0,l.default)(`${r}-bg`,`${r}-bg-${g}`),style:C},"inner"===g&&d),void 0!==y&&t.createElement("div",{className:`${r}-success-bg`,style:k})),E="outer"===g&&"start"===p,T="outer"===g&&"end"===p;return"outer"===g&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},w,d):t.createElement("div",{className:`${r}-outer`,style:{width:x<0?"100%":x}},E&&d,w,T&&d)},K=e=>{let{size:r,steps:o,rounding:a=Math.round,percent:n=0,strokeWidth:s=8,strokeColor:i,trailColor:c=null,prefixCls:d,children:u}=e,m=a(n/100*o),[f,p]=F(null!=r?r:["small"===r?2:14,s],"step",{steps:o,strokeWidth:s}),g=f/o,b=Array.from({length:o});for(let e=0;et.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let V=["normal","exception","active","success"],Y=t.forwardRef((e,d)=>{let u,{prefixCls:m,className:f,rootClassName:p,steps:g,strokeColor:b,percent:h=0,size:x="default",showInfo:v=!0,type:C="line",status:y,format:k,style:w,percentPosition:E={}}=e,T=G(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:N="end",type:S="outer"}=E,$=Array.isArray(b)?b[0]:b,P="string"==typeof b||Array.isArray(b)?b:void 0,O=t.useMemo(()=>{if($){let e="string"==typeof $?$:Object.values($)[0];return new r.FastColor(e).isLight()}return!1},[b]),A=t.useMemo(()=>{var t,r;let o=M(e);return Number.parseInt(void 0!==o?null==(t=null!=o?o:0)?void 0:t.toString():null==(r=null!=h?h:0)?void 0:r.toString(),10)},[h,e.success,e.successPercent]),B=t.useMemo(()=>!V.includes(y)&&A>=100?"success":y||"normal",[y,A]),{getPrefixCls:j,direction:D,progress:z}=t.useContext(c.ConfigContext),L=j("progress",m),[W,X,Y]=_(L),U="line"===C,q=U&&!g,Q=t.useMemo(()=>{let r;if(!v)return null;let i=M(e),c=k||(e=>`${e}%`),d=U&&O&&"inner"===S;return"inner"===S||k||"exception"!==B&&"success"!==B?r=c(I(h),I(i)):"exception"===B?r=U?t.createElement(n.default,null):t.createElement(s.default,null):"success"===B&&(r=U?t.createElement(o.default,null):t.createElement(a.default,null)),t.createElement("span",{className:(0,l.default)(`${L}-text`,{[`${L}-text-bright`]:d,[`${L}-text-${N}`]:q,[`${L}-text-${S}`]:q}),title:"string"==typeof r?r:void 0},r)},[v,h,A,B,C,L,k]);"line"===C?u=g?t.createElement(K,Object.assign({},e,{strokeColor:P,prefixCls:L,steps:"object"==typeof g?g.count:g}),Q):t.createElement(H,Object.assign({},e,{strokeColor:$,prefixCls:L,direction:D,percentPosition:{align:N,type:S}}),Q):("circle"===C||"dashboard"===C)&&(u=t.createElement(R,Object.assign({},e,{strokeColor:$,prefixCls:L,progressStatus:B}),Q));let Z=(0,l.default)(L,`${L}-status-${B}`,{[`${L}-${"dashboard"===C&&"circle"||C}`]:"line"!==C,[`${L}-inline-circle`]:"circle"===C&&F(x,"circle")[0]<=20,[`${L}-line`]:q,[`${L}-line-align-${N}`]:q,[`${L}-line-position-${S}`]:q,[`${L}-steps`]:g,[`${L}-show-info`]:v,[`${L}-${x}`]:"string"==typeof x,[`${L}-rtl`]:"rtl"===D},null==z?void 0:z.className,f,p,X,Y);return W(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==z?void 0:z.style),w),className:Z,role:"progressbar","aria-valuenow":A,"aria-valuemin":0,"aria-valuemax":100},(0,i.default)(T,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Y],309821)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/03kaz3d0v3z45.js b/litellm/proxy/_experimental/out/_next/static/chunks/03kaz3d0v3z45.js
new file mode 100644
index 00000000000..ea09603b861
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/03kaz3d0v3z45.js
@@ -0,0 +1,10 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,270377,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ExclamationCircleOutlined",0,r],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(529681),l=e.i(242064),r=e.i(517455),s=e.i(185793),n=e.i(721369),o=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let d=e=>{var{prefixCls:a,className:r,hoverable:s=!0}=e,n=o(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),u=(0,i.default)(`${c}-grid`,r,{[`${c}-grid-hoverable`]:s});return t.createElement("div",Object.assign({},n,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),A=e.i(246422),g=e.i(838378);let h=(0,A.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:i,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:r,bodyPadding:s,extraColor:n}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:i,headerHeight:a,headerPadding:l,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,c.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
+ > ${i}-typography,
+ > ${i}-typography-edit-content
+ `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:i,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
+ ${(0,c.unit)(l)} 0 0 0 ${i},
+ 0 ${(0,c.unit)(l)} 0 0 ${i},
+ ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${i},
+ ${(0,c.unit)(l)} 0 0 0 ${i} inset,
+ 0 ${(0,c.unit)(l)} 0 0 ${i} inset;
+ `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:i,actionsLiMargin:a,cardActionsIconSize:l,colorBorderSecondary:r,actionsBg:s}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:s,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:a,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${i}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${i}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:i}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:a}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:i,headerPadding:a,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(a)}`,background:i,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:i,headerPaddingSM:a,headerHeightSM:l,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(a)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:i}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,i;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(i=e.headerPadding)?i:e.paddingLG}});var m=e.i(792812),f=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let p=e=>{let{actionClasses:i,actions:a=[],actionStyle:l}=e;return t.createElement("ul",{className:i,style:l},a.map((e,i)=>{let l=`action-${i}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:l},t.createElement("span",null,e))}))},b=t.forwardRef((e,o)=>{let c,{prefixCls:u,className:A,rootClassName:g,style:b,extra:x,headStyle:O={},bodyStyle:y={},title:v,loading:E,bordered:C,variant:I,size:w,type:S,cover:R,actions:L,tabList:B,children:k,activeTabKey:_,defaultActiveTabKey:T,tabBarExtraContent:j,hoverable:M,tabProps:$={},classNames:H,styles:N}=e,P=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:z,direction:D,card:U}=t.useContext(l.ConfigContext),[W]=(0,m.default)("card",I,C),q=e=>{var t;return(0,i.default)(null==(t=null==U?void 0:U.classNames)?void 0:t[e],null==H?void 0:H[e])},G=e=>{var t;return Object.assign(Object.assign({},null==(t=null==U?void 0:U.styles)?void 0:t[e]),null==N?void 0:N[e])},F=t.useMemo(()=>{let e=!1;return t.Children.forEach(k,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[k]),Q=z("card",u),[V,K,Y]=h(Q),J=t.createElement(s.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},k),X=void 0!==_,Z=Object.assign(Object.assign({},$),{[X?"activeKey":"defaultActiveKey"]:X?_:T,tabBarExtraContent:j}),ee=(0,r.default)(w),et=ee&&"default"!==ee?ee:"large",ei=B?t.createElement(n.default,Object.assign({size:et},Z,{className:`${Q}-head-tabs`,onChange:t=>{var i;null==(i=e.onTabChange)||i.call(e,t)},items:B.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(v||x||ei){let e=(0,i.default)(`${Q}-head`,q("header")),a=(0,i.default)(`${Q}-head-title`,q("title")),l=(0,i.default)(`${Q}-extra`,q("extra")),r=Object.assign(Object.assign({},O),G("header"));c=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${Q}-head-wrapper`},v&&t.createElement("div",{className:a,style:G("title")},v),x&&t.createElement("div",{className:l,style:G("extra")},x)),ei)}let ea=(0,i.default)(`${Q}-cover`,q("cover")),el=R?t.createElement("div",{className:ea,style:G("cover")},R):null,er=(0,i.default)(`${Q}-body`,q("body")),es=Object.assign(Object.assign({},y),G("body")),en=t.createElement("div",{className:er,style:es},E?J:k),eo=(0,i.default)(`${Q}-actions`,q("actions")),ed=(null==L?void 0:L.length)?t.createElement(p,{actionClasses:eo,actionStyle:G("actions"),actions:L}):null,ec=(0,a.default)(P,["onTabChange"]),eu=(0,i.default)(Q,null==U?void 0:U.className,{[`${Q}-loading`]:E,[`${Q}-bordered`]:"borderless"!==W,[`${Q}-hoverable`]:M,[`${Q}-contain-grid`]:F,[`${Q}-contain-tabs`]:null==B?void 0:B.length,[`${Q}-${ee}`]:ee,[`${Q}-type-${S}`]:!!S,[`${Q}-rtl`]:"rtl"===D},A,g,K,Y),eA=Object.assign(Object.assign({},null==U?void 0:U.style),b);return V(t.createElement("div",Object.assign({ref:o},ec,{className:eu,style:eA}),c,el,en,ed))});var x=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};b.Grid=d,b.Meta=e=>{let{prefixCls:a,className:r,avatar:s,title:n,description:o}=e,d=x(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("card",a),A=(0,i.default)(`${u}-meta`,r),g=s?t.createElement("div",{className:`${u}-meta-avatar`},s):null,h=n?t.createElement("div",{className:`${u}-meta-title`},n):null,m=o?t.createElement("div",{className:`${u}-meta-description`},o):null,f=h||m?t.createElement("div",{className:`${u}-meta-detail`},h,m):null;return t.createElement("div",Object.assign({},d,{className:A}),g,f)},e.s(["Card",0,b],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(908206),l=e.i(242064),r=e.i(517455),s=e.i(150073);let n={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},o=t.default.createContext({});var d=e.i(876556),c=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i},u=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let A=e=>{let{itemPrefixCls:a,component:l,span:r,className:s,style:n,labelStyle:d,contentStyle:c,bordered:u,label:A,content:g,colon:h,type:m,styles:f}=e,{classNames:p}=t.useContext(o),b=Object.assign(Object.assign({},d),null==f?void 0:f.label),x=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(u)return t.createElement(l,{colSpan:r,style:n,className:(0,i.default)(s,{[`${a}-item-${m}`]:"label"===m||"content"===m,[null==p?void 0:p.label]:(null==p?void 0:p.label)&&"label"===m,[null==p?void 0:p.content]:(null==p?void 0:p.content)&&"content"===m})},null!=A&&t.createElement("span",{style:b},A),null!=g&&t.createElement("span",{style:x},g));return t.createElement(l,{colSpan:r,style:n,className:(0,i.default)(`${a}-item`,s)},t.createElement("div",{className:`${a}-item-container`},null!=A&&t.createElement("span",{style:b,className:(0,i.default)(`${a}-item-label`,null==p?void 0:p.label,{[`${a}-item-no-colon`]:!h})},A),null!=g&&t.createElement("span",{style:x,className:(0,i.default)(`${a}-item-content`,null==p?void 0:p.content)},g)))};function g(e,{colon:i,prefixCls:a,bordered:l},{component:r,type:s,showLabel:n,showContent:o,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:g,prefixCls:h=a,className:m,style:f,labelStyle:p,contentStyle:b,span:x=1,key:O,styles:y},v)=>"string"==typeof r?t.createElement(A,{key:`${s}-${O||v}`,className:m,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),p),null==y?void 0:y.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),b),null==y?void 0:y.content)},span:x,colon:i,component:r,itemPrefixCls:h,bordered:l,label:n?e:null,content:o?g:null,type:s}):[t.createElement(A,{key:`label-${O||v}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),p),null==y?void 0:y.label),span:1,colon:i,component:r[0],itemPrefixCls:h,bordered:l,label:e,type:"label"}),t.createElement(A,{key:`content-${O||v}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),f),b),null==y?void 0:y.content),span:2*x-1,component:r[1],itemPrefixCls:h,bordered:l,content:g,type:"content"})])}let h=e=>{let i=t.useContext(o),{prefixCls:a,vertical:l,row:r,index:s,bordered:n}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${s}`,className:`${a}-row`},g(r,e,Object.assign({component:"th",type:"label",showLabel:!0},i))),t.createElement("tr",{key:`content-${s}`,className:`${a}-row`},g(r,e,Object.assign({component:"td",type:"content",showContent:!0},i)))):t.createElement("tr",{key:s,className:`${a}-row`},g(r,e,Object.assign({component:n?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},i)))};e.i(296059);var m=e.i(915654),f=e.i(183293),p=e.i(246422),b=e.i(838378);let x=(0,p.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:i,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:r,colonMarginLeft:s,titleMarginBottom:n}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:i}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.padding)} ${(0,m.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:i,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingSM)} ${(0,m.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingXS)} ${(0,m.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:n},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:i,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:a,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,m.unit)(s)} ${(0,m.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,b.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var O=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let y=e=>{let A,{prefixCls:g,title:m,extra:f,column:p,colon:b=!0,bordered:y,layout:v,children:E,className:C,rootClassName:I,style:w,size:S,labelStyle:R,contentStyle:L,styles:B,items:k,classNames:_}=e,T=O(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:j,direction:M,className:$,style:H,classNames:N,styles:P}=(0,l.useComponentConfig)("descriptions"),z=j("descriptions",g),D=(0,s.default)(),U=t.useMemo(()=>{var e;return"number"==typeof p?p:null!=(e=(0,a.matchScreen)(D,Object.assign(Object.assign({},n),p)))?e:3},[D,p]),W=(A=t.useMemo(()=>k||(0,d.default)(E).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[k,E]),t.useMemo(()=>A.map(e=>{var{span:t}=e,i=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},i),{filled:!0}):Object.assign(Object.assign({},i),{span:"number"==typeof t?t:(0,a.matchScreen)(D,t)})}),[A,D])),q=(0,r.default)(S),G=((e,i)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,r;return t=[],a=[],l=!1,r=0,i.filter(e=>e).forEach(i=>{let{filled:s}=i,n=u(i,["filled"]);if(s){a.push(n),t.push(a),a=[],r=0;return}let o=e-r;(r+=i.span||1)>=e?(r>e?(l=!0,a.push(Object.assign(Object.assign({},n),{span:o}))):a.push(n),t.push(a),a=[],r=0):a.push(n)}),a.length>0&&t.push(a),[t=t.map(t=>{let i=t.reduce((e,t)=>e+(t.span||1),0);if(i({labelStyle:R,contentStyle:L,styles:{content:Object.assign(Object.assign({},P.content),null==B?void 0:B.content),label:Object.assign(Object.assign({},P.label),null==B?void 0:B.label)},classNames:{label:(0,i.default)(N.label,null==_?void 0:_.label),content:(0,i.default)(N.content,null==_?void 0:_.content)}}),[R,L,B,_,N,P]);return F(t.createElement(o.Provider,{value:K},t.createElement("div",Object.assign({className:(0,i.default)(z,$,N.root,null==_?void 0:_.root,{[`${z}-${q}`]:q&&"default"!==q,[`${z}-bordered`]:!!y,[`${z}-rtl`]:"rtl"===M},C,I,Q,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},H),P.root),null==B?void 0:B.root),w)},T),(m||f)&&t.createElement("div",{className:(0,i.default)(`${z}-header`,N.header,null==_?void 0:_.header),style:Object.assign(Object.assign({},P.header),null==B?void 0:B.header)},m&&t.createElement("div",{className:(0,i.default)(`${z}-title`,N.title,null==_?void 0:_.title),style:Object.assign(Object.assign({},P.title),null==B?void 0:B.title)},m),f&&t.createElement("div",{className:(0,i.default)(`${z}-extra`,N.extra,null==_?void 0:_.extra),style:Object.assign(Object.assign({},P.extra),null==B?void 0:B.extra)},f)),t.createElement("div",{className:`${z}-view`},t.createElement("table",null,t.createElement("tbody",null,G.map((e,i)=>t.createElement(h,{key:i,index:i,colon:b,prefixCls:z,vertical:"vertical"===v,bordered:y,row:e}))))))))};y.Item=({children:e})=>e,e.s(["Descriptions",0,y],869216)},368869,e=>{"use strict";e.i(296059);var t=e.i(868297),i=e.i(732961),a=e.i(289882),l=e.i(170517),r=e.i(628882),s=e.i(320890),n=e.i(104458),o=e.i(722319),d=e.i(8398),c=e.i(279728);e.i(765846);var u=e.i(602716),A=e.i(328052),g=e.i(135551);let h=(e,t)=>new g.FastColor(e).setA(t).toRgbString(),m=(e,t)=>new g.FastColor(e).lighten(t).toHexString(),f=e=>{let t=(0,u.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},p=(e,t)=>{let i=e||"#000",a=t||"#fff";return{colorBgBase:i,colorTextBase:a,colorText:h(a,.85),colorTextSecondary:h(a,.65),colorTextTertiary:h(a,.45),colorTextQuaternary:h(a,.25),colorFill:h(a,.18),colorFillSecondary:h(a,.12),colorFillTertiary:h(a,.08),colorFillQuaternary:h(a,.04),colorBgSolid:h(a,.95),colorBgSolidHover:h(a,1),colorBgSolidActive:h(a,.9),colorBgElevated:m(i,12),colorBgContainer:m(i,8),colorBgLayout:m(i,0),colorBgSpotlight:m(i,26),colorBgBlur:h(a,.04),colorBorder:m(i,26),colorBorderSecondary:m(i,19)}},b={defaultSeed:s.defaultConfig.token,useToken:function(){let[e,t,i]=(0,n.useToken)();return{theme:e,token:t,hashId:i}},defaultAlgorithm:o.default,darkAlgorithm:(e,t)=>{let i=Object.keys(l.defaultPresetColors).map(t=>{let i=(0,u.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,a,l)=>(e[`${t}-${l+1}`]=i[l],e[`${t}${l+1}`]=i[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),a=null!=t?t:(0,o.default)(e),r=(0,A.default)(e,{generateColorPalettes:f,generateNeutralColorPalettes:p});return Object.assign(Object.assign(Object.assign(Object.assign({},a),i),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let i=null!=t?t:(0,o.default)(e),a=i.fontSizeSM,l=i.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i),function(e){let{sizeUnit:t,sizeStep:i}=e,a=i-2;return{sizeXXL:t*(a+10),sizeXL:t*(a+6),sizeLG:t*(a+2),sizeMD:t*(a+2),sizeMS:t*(a+1),size:t*a,sizeSM:t*a,sizeXS:t*(a-1),sizeXXS:t*(a-1)}}(null!=t?t:e)),(0,c.default)(a)),{controlHeight:l}),(0,d.default)(Object.assign(Object.assign({},i),{controlHeight:l})))},getDesignToken:e=>{let s=(null==e?void 0:e.algorithm)?(0,t.createTheme)(e.algorithm):a.default,n=Object.assign(Object.assign({},l.default),null==e?void 0:e.token);return(0,i.getComputedToken)(n,{override:null==e?void 0:e.token},s,r.default)},defaultConfig:s.defaultConfig,_internalContext:s.DesignTokenContext};e.s(["theme",0,b],368869)},127952,e=>{"use strict";var t=e.i(843476),i=e.i(560445),a=e.i(175712),l=e.i(869216),r=e.i(311451),s=e.i(212931),n=e.i(898586),o=e.i(368869),d=e.i(270377),c=e.i(271645);e.s(["default",0,function({isOpen:e,title:u,alertMessage:A,message:g,resourceInformationTitle:h,resourceInformation:m,onCancel:f,onOk:p,confirmLoading:b,requiredConfirmation:x}){let{Title:O,Text:y}=n.Typography,{token:v}=o.theme.useToken(),[E,C]=(0,c.useState)("");return(0,c.useEffect)(()=>{e&&C("")},[e]),(0,t.jsx)(s.Modal,{title:u,open:e,onOk:p,onCancel:f,confirmLoading:b,okText:b?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!x&&E!==x||b},cancelButtonProps:{disabled:b},children:(0,t.jsxs)("div",{className:"space-y-4",children:[A&&(0,t.jsx)(i.Alert,{message:A,type:"warning"}),(0,t.jsx)(a.Card,{title:h,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder}},style:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:m&&m.map(({label:e,value:i,...a})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(y,{...a,children:i??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:g})}),x&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(y,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(y,{children:"Type "}),(0,t.jsx)(y,{strong:!0,type:"danger",children:x}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(r.Input,{value:E,onChange:e=>C(e.target.value),placeholder:x,className:"rounded-md",prefix:(0,t.jsx)(d.ExclamationCircleOutlined,{style:{color:v.colorError}}),autoFocus:!0})]})]})})}])},954616,e=>{"use strict";var t=e.i(271645),i=e.i(114272),a=e.i(540143),l=e.i(915823),r=e.i(619273),s=class extends l.Subscribable{#e;#t=void 0;#i;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#l(),this.#r()}mutate(e,t){return this.#a=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#l(){let e=this.#i?.state??(0,i.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,i=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,i,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,i,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,i,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,i,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);e.s(["useMutation",0,function(e,i){let l=(0,n.useQueryClient)(i),[o]=t.useState(()=>new s(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(d.error&&(0,r.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}],954616)},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let s=(0,i.normalizeRootPath)(l);return s&&(e===s||e.startsWith(`${s}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let s={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,s],470524);let n={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,n],901539);let o={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,o],434339);let d={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],857152)},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let s={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],562171);let n={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,n],533881);let o={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,o],837957);let d={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,d],227247);let c={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,c],708889);let u={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,u],859320);let A={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],586455);let g={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],921117);let h={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],21296);let m={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,m],579967)},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let s={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],206258);let n={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],176228);let o={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],728685)},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let s={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],277207);let n={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],836473);let o={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,o],768493);let d={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,d],297720)},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),s=e.i(901539),n=e.i(434339),o=e.i(857152),d=e.i(922158),c=e.i(896614),u=e.i(9774),A=e.i(503119),g=e.i(272896),h=e.i(144923),m=e.i(562171),f=e.i(533881),p=e.i(837957),b=e.i(227247),x=e.i(708889),O=e.i(859320),y=e.i(586455),v=e.i(921117),E=e.i(21296),C=e.i(579967),I=e.i(336712),w=e.i(770752),S=e.i(383963),R=e.i(862493),L=e.i(902860),B=e.i(901372),k=e.i(206258),_=e.i(176228),T=e.i(728685),j=e.i(39182),M=e.i(272967),$=e.i(551726),H=e.i(399495),N=e.i(740876),P=e.i(709103),z=e.i(277207),D=e.i(836473),U=e.i(768493),W=e.i(297720),q=e.i(980385);let G={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},F={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},Q={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},V={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},K={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},Y={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},X={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},Z={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},es={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},en={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},eo={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},ed={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},ec={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},eu={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eA=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eg={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eh=new Set(["bedrock_mantle"]),em={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":q.default.src,Anthropic:s.default.src,"Anthropic Text":s.default.src,AssemblyAI:n.default.src,Azure:j.default.src,"Azure AI Foundry (Studio)":j.default.src,"Azure Text":j.default.src,Baseten:o.default.src,"Amazon Bedrock":d.default.src,"Amazon Bedrock Mantle":d.default.src,"AWS SageMaker":d.default.src,Cerebras:c.default.src,Cloudflare:u.default.src,Codestral:$.default.src,Cohere:A.default.src,"Cohere Chat":A.default.src,Cometapi:g.default.src,Cursor:h.default.src,"Databricks (Qwen API)":m.default.src,Dashscope:V.src,Deepseek:b.default.src,Deepgram:f.default.src,DeepInfra:p.default.src,ElevenLabs:x.default.src,"Fal AI":O.default.src,"Featherless Ai":y.default.src,"Fireworks AI":v.default.src,Friendliai:E.default.src,"Github Copilot":C.default.src,"Google AI Studio":I.default.src,Groq:w.default.src,vllm:es.src,Huggingface:S.default.src,Hyperbolic:R.default.src,Infinity:L.default.src,"Jina AI":B.default.src,"Lambda Ai":k.default.src,"Lm Studio":_.default.src,"Meta Llama":T.default.src,MiniMax:M.default.src,"Mistral AI":$.default.src,Moonshot:H.default.src,Morph:N.default.src,Nebius:P.default.src,Novita:z.default.src,"Nvidia Nim":D.default.src,Ollama:W.default.src,"Ollama Chat":W.default.src,Oobabooga:q.default.src,OpenAI:q.default.src,"Openai Like":q.default.src,"OpenAI Text Completion":q.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":q.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":q.default.src,Openrouter:G.src,"Oracle Cloud Infrastructure (OCI)":F.src,Perplexity:Q.src,Recraft:K.src,Replicate:Y.src,RunwayML:J.src,Sagemaker:d.default.src,Sambanova:X.src,"SAP Generative AI Hub":Z.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":$.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:U.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":I.default.src,"Vertex Ai Beta":I.default.src,Vllm:es.src,VolcEngine:en.src,"Voyage AI":eo.src,Watsonx:ed.src,"Watsonx Text":ed.src,xAI:ec.src,Xinference:eu.src};e.s(["Providers",()=>eA,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(em[e])??"",displayName:e}}let t=Object.keys(eg).find(t=>eg[t].toLowerCase()===e.toLowerCase())??Object.keys(eg).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=eA[t];return{logo:(0,i.resolveLogoSrc)(em[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=eg[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eh.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,em,"provider_map",0,eg],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),l=e.i(555987);e.s(["Logo",0,({provider:e,src:r,label:s,className:n="w-4 h-4"})=>{let[o,d]=(0,i.useState)(null),c=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,l.resolveLogoSrc)(r)??"",u=s??e??"";return o!==c&&c?(0,t.jsx)("img",{src:c,alt:`${u||"-"} logo`,className:n,onError:()=>{console.warn(`Logo failed to load: ${c}`),d(c)}}):(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:u.charAt(0)||"-"})}])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/046q5lwe95zp6.js b/litellm/proxy/_experimental/out/_next/static/chunks/046q5lwe95zp6.js
deleted file mode 100644
index 947a1f5f744..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/046q5lwe95zp6.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:n=0,side:s="bottom",sideOffset:i=4,className:l,...o}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:s,sideOffset:i,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...o})})})},"DropdownMenuItem",0,function({className:e,inset:n,variant:s="default",...i}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":s,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,a,n){let[s,i,l]=(0,t.useDebouncedState)(e,a,n);return(0,r.useEffect)(()=>{i(e)},[e,i]),[s,l]}])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("textarea",{ref:n,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));n.displayName="Textarea",e.s(["Textarea",0,n])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),n=e.i(519455),s=e.i(793479),i=e.i(624687);let l=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:s="ghost",size:i="xs",...l},d)=>(0,t.jsx)(n.Button,{ref:d,type:r,"data-size":i,variant:s,className:(0,a.cn)(o({size:i}),e),...l}));d.displayName="InputGroupButton";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(s.Input,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));u.displayName="InputGroupInput",r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(i.Textarea,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(l({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let a=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:n,onValueChange:s,placeholder:i="Select…",emptyText:l="No results",disabled:o=!1,className:d}){let u=e.find(e=>e.value===n)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:u,onValueChange:e=>s(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:a,disabled:o,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:i,showClear:null!=n&&""!==n,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:l}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},263005,e=>{"use strict";var t=e.i(843476);e.s(["PageHeader",0,function({title:e,subtitle:r,icon:a,actions:n}){return(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[null!=a&&(0,t.jsx)("span",{className:"flex flex-none items-center text-foreground",children:a}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),null!=r&&(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:r})]})]}),null!=n&&(0,t.jsx)("div",{className:"flex items-center gap-2",children:n})]})}])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var n=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(n.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var n=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(n.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["SaveOutlined",0,s],987432)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var n=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(n.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MinusCircleOutlined",0,s],564897)},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",a="hour",n="week",s="month",i="quarter",l="year",o="date",d="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m=function(e,t,r){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(r)+e},f="en",h={};h[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var p="$isDayjsObject",g=function(e){return e instanceof w||!(!e||!e[p])},x=function e(t,r,a){var n;if(!t)return f;if("string"==typeof t){var s=t.toLowerCase();h[s]&&(n=s),r&&(h[s]=r,n=s);var i=t.split("-");if(!n&&i.length>1)return e(i[0])}else{var l=t.name;h[l]=t,n=l}return!a&&n&&(f=n),n||!a&&f},b=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new w(r)},v={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(r/60),2,"0")+":"+m(r%60,2,"0")},m:function e(t,r){if(t.date(){"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var n=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(n.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["GlobalOutlined",0,s],160818)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),n=e.i(480731),s=e.i(444755),i=e.i(673706),l=e.i(95779);let o={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"}},u={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:""}},c=(0,i.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:f,variant:h="simple",tooltip:p,size:g=n.Sizes.SM,color:x,className:b}=e,v=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),w=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.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,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.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,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,x),{tooltipProps:y,getReferenceProps:C}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([m,y.refs.setReference]),className:(0,s.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,u[h].rounded,u[h].border,u[h].shadow,u[h].ring,o[g].paddingX,o[g].paddingY,b)},C,v),r.default.createElement(a.default,Object.assign({text:p},y)),r.default.createElement(f,{className:(0,s.tremorTwMerge)(c("icon"),"shrink-0",d[g].height,d[g].width)}))});m.displayName="Icon",e.s(["default",0,m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},434626,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,r],434626)},902555,e=>{"use strict";var t=e.i(843476),r=e.i(591935),a=e.i(122577),n=e.i(278587),s=e.i(68155),i=e.i(360820),l=e.i(871943),o=e.i(434626),d=e.i(271645);let u=d.forwardRef(function(e,t){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});var c=e.i(592968),m=e.i(115504),f=e.i(752978);function h({icon:e,onClick:r,className:a,disabled:n,dataTestId:s}){return n?(0,t.jsx)(f.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":s}):(0,t.jsx)(f.Icon,{icon:e,size:"sm",onClick:r,className:(0,m.cx)("cursor-pointer",a),"data-testid":s})}let p={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:s.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:n.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:l.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:u,className:"hover:text-blue-600"}};e.s(["default",0,function({onClick:e,tooltipText:r,disabled:a=!1,disabledTooltipText:n,dataTestId:s,variant:i}){let{icon:l,className:o}=p[i];return(0,t.jsx)(c.Tooltip,{title:a?n:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(h,{icon:l,onClick:e,className:o,disabled:a,dataTestId:s})})})}],902555)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),a=e.i(266027);let n=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:s}=(0,t.default)();return(0,a.useQuery)({queryKey:n.detail(s),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&s)})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),n=e.i(785242),s=e.i(738014),i=e.i(199133),l=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},u={label:"No Default Models",value:"no-default-models"},c=[d,u],m={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["MODEL_SENTINEL_OPTIONS",0,c,"ModelSelect",0,e=>{let{teamID:f,organizationID:h,options:p,context:g,dataTestId:x,value:b=[],onChange:v,style:w}=e,{includeUserModels:y,showAllTeamModelsOption:C,showAllProxyModelsOverride:j,includeSpecialOptions:k}=p||{},{data:M,isLoading:N}=(0,r.useAllProxyModels)(),{data:S,isLoading:$}=(0,n.useTeam)(f),{data:O,isLoading:_}=(0,a.useOrganization)(h),{data:I,isLoading:z}=(0,s.useCurrentUser)(),T=e=>c.some(t=>t.value===e),D=b.some(T),E=O?.models.includes(d.value)||O?.models.length===0;if(N||$||_||z)return(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0});let{wildcard:L,regular:A}=(e=>{let t=[],r=[];for(let a of e)a.endsWith("/*")?t.push(a):r.push(a);return{wildcard:t,regular:r}})(((e,t,r)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let n=m[t.context];return n?n({allProxyModels:a,...r,options:t.options}):[]})(M?.data??[],e,{selectedTeam:S,selectedOrganization:O,userModels:I?.models}));return(0,t.jsx)(i.Select,{"data-testid":x,value:b,onChange:e=>{let t=e.filter(T);v(t.length>0?[t[t.length-1]]:e)},style:w,options:[...k?[{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...j||E&&k||"global"===g?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:b.length>0&&b.some(e=>T(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:u.value,disabled:b.length>0&&b.some(e=>T(e)&&e!==u.value),key:u.value}]}]:[],...L.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:L.map(e=>{let r=e.replace("/*",""),a=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:D}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:A.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:D}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},907308,276173,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(212931),n=e.i(808613),s=e.i(464571),i=e.i(199133),l=e.i(592968),o=e.i(213205),d=e.i(343488),u=e.i(602869),c=e.i(741466);e.s(["default",0,({isVisible:e,onCancel:m,onSubmit:f,accessToken:h,title:p="Add Team Member",roles:g=[{label:"admin",value:"admin",description:"Admin role. Can create team keys, add members, and manage settings."},{label:"user",value:"user",description:"User role. Can view team info, but not manage it."}],defaultRole:x="user",teamId:b})=>{let[v]=n.Form.useForm(),[w,y]=(0,r.useState)([]),[C,j]=(0,r.useState)(!1),[k,M]=(0,r.useState)("user_email"),[N,S]=(0,r.useState)(!1),$=async(e,t)=>{if(!e)return void y([]);j(!0);try{let r=new URLSearchParams;if(r.append(t,e),b&&r.append("team_id",b),null==h)return;let a=(await (0,u.userFilterUICall)(h,r)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));y(a)}catch(e){console.error("Error fetching users:",e)}finally{j(!1)}},O=(0,d.useDebouncedCallback)((e,t)=>$(e,t),{wait:c.DEBOUNCE_WAIT_MS}),_=(e,t)=>{M(t),O(e,t)},I=(e,t)=>{let r=t.user;v.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:v.getFieldValue("role")})},z=async e=>{S(!0);try{await f(e)}finally{S(!1)}};return(0,t.jsx)(a.Modal,{title:p,open:e,onCancel:()=>{v.resetFields(),y([]),m()},footer:null,width:800,maskClosable:!N,children:(0,t.jsxs)(n.Form,{form:v,onFinish:z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(n.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>_(e,"user_email"),onSelect:(e,t)=>I(e,t),options:"user_email"===k?w:[],loading:C,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>_(e,"user_id"),onSelect:(e,t)=>I(e,t),options:"user_id"===k?w:[],loading:C,allowClear:!0})}),(0,t.jsx)(n.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(i.Select,{defaultValue:x,children:g.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:(0,t.jsxs)(l.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(s.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(o.UserAddOutlined,{}),loading:N,children:N?"Adding...":"Add Member"})})]})})}],907308);var m=e.i(599724),f=e.i(779241),h=e.i(435451),p=e.i(860585);e.s(["default",0,({visible:e,onCancel:l,onSubmit:o,initialData:d,mode:u,config:c})=>{let g,[x]=n.Form.useForm(),[b,v]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e)if("edit"===u&&d){let e={...d,role:d.role||c.defaultRole,max_budget_in_team:d.max_budget_in_team||null,tpm_limit:d.tpm_limit||null,rpm_limit:d.rpm_limit||null,budget_duration:d.budget_duration||null,allowed_models:d.allowed_models||[]};x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:c.defaultRole||c.roleOptions[0]?.value})},[e,d,u,x,c.defaultRole,c.roleOptions]);let w=async e=>{try{v(!0);let t=Object.entries(e).reduce((e,[t,r])=>{if("string"==typeof r){let a=r.trim();return""===a&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:a}}return{...e,[t]:r}},{});await Promise.resolve(o(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{v(!1)}};return(0,t.jsx)(a.Modal,{title:c.title||("add"===u?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:l,children:(0,t.jsxs)(n.Form,{form:x,onFinish:w,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[c.showEmail&&(0,t.jsx)(n.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(f.TextInput,{placeholder:"user@example.com"})}),c.showEmail&&c.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(m.Text,{children:"OR"})}),c.showUserId&&(0,t.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(f.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(n.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===u&&d&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(g=d.role,c.roleOptions.find(e=>e.value===g)?.label||g),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(i.Select,{children:"edit"===u&&d?[...c.roleOptions.filter(e=>e.value===d.role),...c.roleOptions.filter(e=>e.value!==d.role)].map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value)):c.roleOptions.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))})}),c.additionalFields?.map(e=>(0,t.jsx)(n.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(f.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(h.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(i.Select,{children:e.options?.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,t.jsx)(i.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});case"budget-duration":return(0,t.jsx)(p.default,{});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(s.Button,{onClick:l,className:"mr-2",disabled:b,children:"Cancel"}),(0,t.jsx)(s.Button,{type:"default",htmlType:"submit",loading:b,children:"add"===u?b?"Adding...":"Add Member":b?"Saving...":"Save Changes"})]})]})})}],276173)},294612,e=>{"use strict";var t=e.i(843476),r=e.i(100486),a=e.i(827252),n=e.i(213205),s=e.i(771674),i=e.i(464571),l=e.i(770914),o=e.i(291542),d=e.i(262218),u=e.i(592968),c=e.i(898586),m=e.i(902555);let{Text:f}=c.Typography;e.s(["default",0,function({members:e,canEdit:c,onEdit:h,onDelete:p,onAddMember:g,roleColumnTitle:x="Role",roleTooltip:b,extraColumns:v=[],showDeleteForMember:w,emptyText:y}){let C=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(f,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(f,{children:e||"-"})},{title:b?(0,t.jsxs)(l.Space,{direction:"horizontal",children:[x,(0,t.jsx)(u.Tooltip,{title:b,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):x,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(l.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(r.CrownOutlined,{}):(0,t.jsx)(s.UserOutlined,{}),(0,t.jsx)(f,{style:{textTransform:"capitalize"},children:e||"-"})]})},...v,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,r)=>c?(0,t.jsxs)(l.Space,{children:[(0,t.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(r)}),(!w||w(r))&&(0,t.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(r)})]}):null}];return(0,t.jsxs)(l.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:C,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:y?{emptyText:y}:void 0}),g&&c&&(0,t.jsx)(i.Button,{icon:(0,t.jsx)(n.UserAddOutlined,{}),type:"primary",onClick:g,children:"Add Member"})]})}])},113625,e=>{"use strict";let t=(0,e.i(475254).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["default",0,t])},852008,e=>{"use strict";var t=e.i(113625);e.s(["Layers",()=>t.default])},372943,e=>{"use strict";e.i(247167);var t=e.i(8211),r=e.i(271645),a=e.i(343794),n=e.i(529681),s=e.i(242064),i=e.i(704914),l=e.i(876556),o=e.i(290224),d=e.i(251224),u=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};function c({suffixCls:e,tagName:t,displayName:a}){return a=>r.forwardRef((n,s)=>r.createElement(a,Object.assign({ref:s,suffixCls:e,tagName:t},n)))}let m=r.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:i,className:l,tagName:o}=e,c=u(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:m}=r.useContext(s.ConfigContext),f=m("layout",n),[h,p,g]=(0,d.default)(f),x=i?`${f}-${i}`:f;return h(r.createElement(o,Object.assign({className:(0,a.default)(n||x,l,p,g),ref:t},c)))}),f=r.forwardRef((e,c)=>{let{direction:m}=r.useContext(s.ConfigContext),[f,h]=r.useState([]),{prefixCls:p,className:g,rootClassName:x,children:b,hasSider:v,tagName:w,style:y}=e,C=u(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),j=(0,n.default)(C,["suffixCls"]),{getPrefixCls:k,className:M,style:N}=(0,s.useComponentConfig)("layout"),S=k("layout",p),$="boolean"==typeof v?v:!!f.length||(0,l.default)(b).some(e=>e.type===o.default),[O,_,I]=(0,d.default)(S),z=(0,a.default)(S,{[`${S}-has-sider`]:$,[`${S}-rtl`]:"rtl"===m},M,g,x,_,I),T=r.useMemo(()=>({siderHook:{addSider:e=>{h(r=>[].concat((0,t.default)(r),[e]))},removeSider:e=>{h(t=>t.filter(t=>t!==e))}}}),[]);return O(r.createElement(i.LayoutContext.Provider,{value:T},r.createElement(w,Object.assign({ref:c,className:z,style:Object.assign(Object.assign({},N),y)},j),b)))}),h=c({tagName:"div",displayName:"Layout"})(f),p=c({suffixCls:"header",tagName:"header",displayName:"Header"})(m),g=c({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(m),x=c({suffixCls:"content",tagName:"main",displayName:"Content"})(m);h.Header=p,h.Footer=g,h.Content=x,h.Sider=o.default,h._InternalSiderContext=o.SiderContext,e.s(["Layout",0,h],372943)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/048wkdcpsnwne.js b/litellm/proxy/_experimental/out/_next/static/chunks/048wkdcpsnwne.js
new file mode 100644
index 00000000000..eeae0c450a9
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/048wkdcpsnwne.js
@@ -0,0 +1,31 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,863679,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(269200),s=e.i(427612),n=e.i(496020),i=e.i(64848),o=e.i(977572),d=e.i(942232),c=e.i(629569),u=e.i(599724),g=e.i(994388),m=e.i(752978),p=e.i(793130),f=e.i(677572),h=e.i(602869),x=e.i(28651),y=e.i(199133),b=e.i(68155);e.i(622826);var _=e.i(112179),j=e.i(464571),v=e.i(727749),C=e.i(158392);let k=({accessToken:e,userRole:a,userID:r})=>{let[s,n]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[i,o]=(0,l.useState)([]),[d,c]=(0,l.useState)({}),[u,g]=(0,l.useState)({});(0,l.useEffect)(()=>{e&&a&&r&&((0,h.getCallbacksCall)(e,r,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;n(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,h.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),c(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&o(l.options),e.routing_strategy_descriptions&&g(e.routing_strategy_descriptions);let a=e.fields.find(e=>"enable_tag_filtering"===e.field_name);a?.field_value!==null&&a?.field_value!==void 0&&n(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,r]);let m=async()=>{if(!e)return;let t=s.routerSettings,l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias"]),r=new Set(["retry_policy","model_group_retry_policy","routing_groups"]),n=Object.fromEntries(Object.entries({...t,enable_tag_filtering:s.enableTagFiltering}).map(([e,t])=>{if(r.has(e))return null;if("routing_strategy_args"!==e&&"routing_strategy"!==e&&"enable_tag_filtering"!==e){let r=document.querySelector(`input[name="${e}"]`),s=((e,t,r)=>{if(void 0===t)return r;let s=t.trim();if("null"===s.toLowerCase())return null;if(l.has(e)){let e=Number(s);return Number.isNaN(e)?r:e}if(a.has(e)){if(""===s)return null;try{return JSON.parse(s)}catch{return r}}return"true"===s.toLowerCase()||"false"!==s.toLowerCase()&&s})(e,r?.value,t);return[e,s]}if("routing_strategy"===e)return[e,s.selectedStrategy];if("enable_tag_filtering"===e)return[e,s.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===s.selectedStrategy){let e={},t=document.querySelector('input[name="lowest_latency_buffer"]'),l=document.querySelector('input[name="ttl"]');return t?.value&&(e.lowest_latency_buffer=Number(t.value)),l?.value&&(e.ttl=Number(l.value)),["routing_strategy_args",e]}return null}).filter(e=>null!=e));try{await (0,h.setCallbacksCall)(e,{router_settings:n}),v.default.success("router settings updated successfully")}catch(e){v.default.fromBackend("Failed to update router settings: "+e)}};return e?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(C.default,{value:s,onChange:n,routerFieldsMetadata:d,availableRoutingStrategies:i,routingStrategyDescriptions:u}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(j.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,t.jsx)(j.Button,{type:"primary",onClick:m,children:"Save Changes"})]})]}):null};e.i(247167);var w=e.i(368670);let S=l.forwardRef(function(e,t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"}))});var N=e.i(591935),T=e.i(122577),M=e.i(592968),A=e.i(898586),I=e.i(356449),F=e.i(127952),L=e.i(418371),E=e.i(708347),O=e.i(888259),B=e.i(695411),D=e.i(212931),P=e.i(972520);function R({open:e,onCancel:l,children:a}){return(0,t.jsx)(D.Modal,{title:(0,t.jsx)("div",{className:"pb-4 border-b border-gray-100",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,t.jsx)("div",{className:"p-2 bg-indigo-50 rounded-lg",children:(0,t.jsx)(P.ArrowRight,{className:"w-5 h-5 text-indigo-600"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-bold m-0",children:"Configure Model Fallbacks"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 font-normal m-0",children:"Manage multiple fallback chains for different models (up to 5 groups at a time)"})]})]})}),open:e,width:900,footer:null,onCancel:l,maskClosable:!1,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:a})})}var $=e.i(419470);function H({accessToken:e,value:a=[],onChange:r}){let[s,n]=(0,l.useState)(!1),[i,o]=(0,l.useState)([]),[d,c]=(0,l.useState)(0),[u,m]=(0,l.useState)(!1),[p,f]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{s&&(f([{id:"1",primaryModel:null,fallbackModels:[]}]),c(e=>e+1))},[s]),(0,l.useEffect)(()=>{let t=async()=>{try{let t=await (0,B.fetchAvailableModels)(e);o(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};s&&t()},[e,s]);let h=Array.from(new Set(i.map(e=>e.model_group))).sort(),x=()=>{n(!1),f([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=p.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void O.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...a||[],...p.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(r){m(!0);try{await r(t),v.default.success(`${p.length} fallback configuration(s) added successfully!`),x()}catch(e){console.error("Error saving fallbacks:",e)}finally{m(!1)}}else v.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>n(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(R,{open:s,onCancel:x,children:[(0,t.jsx)($.FallbackSelectionForm,{groups:p,onGroupsChange:f,availableModels:h,maxFallbacks:10,maxGroups:5},d),p.length>0&&(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,t.jsx)(j.Button,{type:"default",onClick:x,disabled:u,children:"Cancel"}),(0,t.jsx)(j.Button,{type:"default",onClick:y,disabled:0===p.length||u,loading:u,children:u?"Saving Configuration...":"Save All Configurations"})]})]})]})}var q=e.i(266027),z=e.i(788699),G=e.i(334115);function K({accessToken:e,fallbackEntry:a,value:r,onChange:s,onClose:n,maxFallbacks:i=10}){let[o,d]=(0,l.useState)(()=>{let e;return{id:"edit",primaryModel:e=Object.keys(a)[0]??null,fallbackModels:e?[...a[e]??[]]:[]}}),[c,u]=(0,l.useState)(!1),{data:g=[]}=(0,q.useQuery)({queryKey:["availableModels","fallbacks"],queryFn:()=>(0,B.fetchAvailableModels)(e),enabled:!!e}),m=(0,l.useMemo)(()=>Array.from(new Set(g.map(e=>e.model_group))).sort(),[g]),p=async()=>{let e=o.primaryModel;if(!e)return;let t=(r||[]).map(t=>e in t?{...t,[e]:o.fallbackModels}:t);u(!0);try{await s(t),v.default.success(`Fallbacks for ${e} updated successfully!`),n()}catch(e){console.error("Error updating fallbacks:",e)}finally{u(!1)}};return(0,t.jsxs)(R,{open:!0,onCancel:n,children:[(0,t.jsx)(G.FallbackGroupConfig,{group:o,onChange:d,availableModels:m,maxFallbacks:i,disablePrimaryModel:!0}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,t.jsx)(j.Button,{type:"default",onClick:n,disabled:c,children:"Cancel"}),(0,t.jsx)(j.Button,{type:"primary",icon:(0,t.jsx)(z.Pencil,{className:"w-4 h-4"}),onClick:p,disabled:c||0===o.fallbackModels.length,loading:c,children:c?"Saving Changes...":"Save Changes"})]})]})}let U="inline-flex items-center gap-2 px-2.5 py-1 rounded-md border border-gray-200 bg-gray-50 text-sm font-medium text-gray-800 shrink-0";async function J(e,l){console.log=function(){};let a=window.location.origin,r=new I.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{v.default.info("Testing fallback model response...");let l=await r.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});v.default.success((0,t.jsxs)("span",{children:["Test model=",(0,t.jsx)("strong",{children:e}),", received model=",(0,t.jsx)("strong",{children:l.model}),". See"," ",(0,t.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){v.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let Q=({accessToken:e,userRole:a,userID:c})=>{let[u,g]=(0,l.useState)({}),[p,f]=(0,l.useState)(!1),[x,y]=(0,l.useState)(null),[_,j]=(0,l.useState)(!1),[C,k]=(0,l.useState)(null),{data:I}=(0,w.useModelCostMap)(),O=e=>null!=I&&"object"==typeof I&&e in I?I[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&c&&(0,h.getCallbacksCall)(e,c,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,c]);let B=e=>{y(e),j(!0)},D=e=>{k(e)},P=async()=>{if(!x||!e)return;let t=Object.keys(x)[0];if(!t)return;f(!0);let l=u.fallbacks.map(e=>{let l={...e};return t in l&&Array.isArray(l[t])&&delete l[t],l}).filter(e=>Object.keys(e).length>0),a={...u,fallbacks:l};try{await (0,h.setCallbacksCall)(e,{router_settings:a}),g(a),v.default.success("Router settings updated successfully")}catch(e){v.default.fromBackend("Failed to update router settings: "+e)}finally{f(!1),j(!1),y(null)}};if(!e)return null;let R=async t=>{if(!e)return;let l={...u,fallbacks:t};try{await (0,h.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw v.default.fromBackend("Failed to update router settings: "+t),e&&a&&c&&(0,h.getCallbacksCall)(e,c,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},$=Array.isArray(u.fallbacks)&&u.fallbacks.length>0,q=(0,E.isProxyAdminRole)(a??"");return(0,t.jsxs)(t.Fragment,{children:[q&&(0,t.jsx)(H,{accessToken:e||"",value:u.fallbacks||[],onChange:R}),$?(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(i.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(i.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(i.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:u.fallbacks.map((a,r)=>Object.entries(a).map(([s,i])=>{let d;return(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(o.TableCell,{className:"align-top",children:(d=O?.(s)??s,(0,t.jsxs)("span",{className:U,children:[(0,t.jsx)(L.ProviderLogo,{provider:d,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:s})]}))}),(0,t.jsx)(o.TableCell,{className:"align-top",children:function(e,a){let r=Array.isArray(e)?e:[];if(0===r.length)return null;let s=({modelName:e})=>{let l=a?.(e)??e;return(0,t.jsxs)("span",{className:U,children:[(0,t.jsx)(L.ProviderLogo,{provider:l,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:e})]})};return(0,t.jsxs)("span",{className:"grid grid-cols-[auto_1fr] items-start gap-x-2 w-full min-w-0",children:[(0,t.jsx)("span",{className:"inline-flex items-center justify-center w-8 h-8 shrink-0 self-start text-blue-600","aria-hidden":!0,children:(0,t.jsx)(S,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:r.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(m.Icon,{icon:S,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(s,{modelName:e})]},e))})]})}(Array.isArray(i)?i:[],O)}),(0,t.jsx)(o.TableCell,{className:"align-top",children:q&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Tooltip,{title:"Test fallback",children:(0,t.jsx)(m.Icon,{icon:T.PlayIcon,size:"sm",onClick:()=>J(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(M.Tooltip,{title:"Edit fallback",children:(0,t.jsx)("span",{"data-testid":"edit-fallback-button",role:"button",tabIndex:0,onClick:()=>D(a),onKeyDown:e=>"Enter"===e.key&&D(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(m.Icon,{icon:N.PencilAltIcon,size:"sm",className:"hover:text-blue-600"})})}),(0,t.jsx)(M.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>B(a),onKeyDown:e=>"Enter"===e.key&&B(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(m.Icon,{icon:b.TrashIcon,size:"sm",className:"hover:text-red-600"})})})]})})]},r.toString()+s)}))})]}):(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-6 text-center",children:(0,t.jsx)(A.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),q&&C&&(0,t.jsx)(K,{accessToken:e||"",fallbackEntry:C,value:u.fallbacks||[],onChange:R,onClose:()=>{k(null)}},Object.keys(C)[0]),(0,t.jsx)(F.default,{isOpen:_,title:"Delete Fallback?",message:"Are you sure you want to delete this fallback? This action cannot be undone.",resourceInformationTitle:"Fallback Information",resourceInformation:[{label:"Model Name",value:x?Object.keys(x)[0]:"",code:!0}],onCancel:()=>{j(!1),y(null)},onOk:P,confirmLoading:p})]})};var V=e.i(175712),W=e.i(525720),Y=e.i(311451),X=e.i(770914),Z=e.i(646563),ee=e.i(91979),et=e.i(928685),el=e.i(135214),ea=e.i(954616),er=e.i(912598),es=e.i(243652);let en=(0,es.createQueryKeys)("routingGroups"),ei=async e=>{let t=await (0,h.getRouterSettingsCall)(e),l=t?.current_values??{},a=(Array.isArray(t?.fields)?t.fields:[]).find(e=>e?.field_name==="routing_strategy");return{routingGroups:Array.isArray(l.routing_groups)?l.routing_groups:[],routingStrategy:l.routing_strategy??null,availableStrategies:Array.isArray(a?.options)?a.options:[]}},eo=(0,es.createQueryKeys)("routerFields"),ed=async e=>{try{let t=h.proxyBaseUrl?`${h.proxyBaseUrl}/router/fields`:"/router/fields",l=await fetch(t,{method:"GET",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=e?.error&&(e.error.message||e.error)||e?.message||e?.detail||e?.error||JSON.stringify(e);throw Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch router fields:",e),e}};var ec=e.i(625901),eu=e.i(592392),eg=e.i(332102);e.i(707701);var em=e.i(807235),ep=e.i(997625),ef=e.i(466828);let eh={"simple-shuffle":"Simple Shuffle","least-busy":"Least Busy","usage-based-routing":"Usage Based","latency-based-routing":"Latency Based"},ex=e=>eh[e]??e,ey=e=>e.models[0]??"",eb=[{value:"curl",label:"cURL",language:"bash",build:(e,t)=>`curl -X POST '${t}/v1/chat/completions' \\
+ -H 'Content-Type: application/json' \\
+ -H 'Authorization: Bearer $LITELLM_API_KEY' \\
+ -d '{
+ "model": "${ey(e)}",
+ "messages": [{"role": "user", "content": "Hello!"}]
+ }'`},{value:"python",label:"Python (OpenAI SDK)",language:"python",build:(e,t)=>`from openai import OpenAI
+
+client = OpenAI(
+ api_key="$LITELLM_API_KEY",
+ base_url="${t}",
+)
+
+response = client.chat.completions.create(
+ model="${ey(e)}",
+ messages=[{"role": "user", "content": "Hello!"}],
+)
+
+print(response)`},{value:"javascript",label:"JavaScript (OpenAI SDK)",language:"javascript",build:(e,t)=>`import OpenAI from "openai";
+
+const client = new OpenAI({
+ apiKey: process.env.LITELLM_API_KEY,
+ baseURL: "${t}",
+});
+
+const response = await client.chat.completions.create({
+ model: "${ey(e)}",
+ messages: [{ role: "user", content: "Hello!" }],
+});
+
+console.log(response);`}];function e_({group:e,baseUrl:l}){return(0,t.jsxs)("div",{className:"border-y bg-muted/40 px-4 py-4",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)(ep.Code2,{className:"size-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"How routing works for this group"})]}),(0,t.jsxs)("p",{className:"mb-3 text-sm text-muted-foreground",children:["Callers request any model in the group by name; LiteLLM picks a deployment behind the scenes using the"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:ex(e.routing_strategy)})," strategy."]}),(0,t.jsxs)(f.Tabs,{defaultValue:"curl",children:[(0,t.jsx)(f.TabsList,{variant:"line",className:"h-auto w-full justify-start rounded-none border-b p-0",children:eb.map(e=>(0,t.jsx)(f.TabsTrigger,{value:e.value,className:"flex-none rounded-none px-4 py-2",children:e.label},e.value))}),eb.map(a=>(0,t.jsx)(f.TabsContent,{value:a.value,className:"pt-3",children:(0,t.jsx)(ef.default,{language:a.language,code:a.build(e,l)})},a.value))]})]})}let ej=(0,e.i(475254).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);var ev=e.i(541071),eC=e.i(727612),ek=e.i(494862),ew=e.i(997422),eS=e.i(547227),eN=e.i(519455),eT=e.i(755146),eM=e.i(115504);function eA({group:e,onEdit:l,onDelete:a}){return(0,t.jsxs)(eT.DropdownMenu,{children:[(0,t.jsx)(eT.DropdownMenuTrigger,{"aria-label":`Open actions for ${e.group_name}`,"data-testid":`routing-group-actions-${e.group_name}`,className:(0,eM.cn)((0,eN.buttonVariants)({variant:"ghost",size:"icon-sm"}),"text-muted-foreground"),children:(0,t.jsx)(ev.MoreHorizontal,{className:"size-4"})}),(0,t.jsxs)(eT.DropdownMenuContent,{align:"end",className:"w-44",children:[(0,t.jsxs)(eT.DropdownMenuItem,{"data-testid":"routing-group-action-edit",onClick:()=>l(e),children:[(0,t.jsx)(z.Pencil,{}),"Edit"]}),(0,t.jsxs)(eT.DropdownMenuItem,{variant:"destructive","data-testid":"routing-group-action-delete",onClick:()=>a(e),children:[(0,t.jsx)(eC.Trash2,{}),"Delete"]})]})]})}function eI(){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,t.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,t.jsx)(eg.Inbox,{className:"size-5 text-muted-foreground"})}),(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:"No routing groups yet"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Create a group to load-balance a set of models behind one name."})]})}let eF=({groups:e,isLoading:a,onEdit:r,onDelete:s,proxyBaseUrl:n})=>{let[i,o]=(0,l.useState)([]),[d,c]=(0,l.useState)({}),u=n&&n.trim()?n:window.location?.origin?window.location.origin:"",g=(0,l.useCallback)(e=>{c(t=>{let l=!0===t?{}:t;return{...l,[e.group_name]:!0!==l[e.group_name]}})},[]),m=(0,l.useMemo)(()=>(({onEdit:e,onDelete:l,onToggleUsage:a})=>[{id:"group_name",accessorKey:"group_name",meta:{title:"Group Name",skeleton:"text"},header:({column:e})=>(0,t.jsx)(ek.DataTableSortHeader,{column:e,title:"Group Name"}),size:240,enableSorting:!0,cell:({row:e})=>(0,t.jsx)(ew.IdentityCell,{title:e.original.group_name,className:"max-w-60",onClick:()=>a(e.original)})},{id:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:320,enableSorting:!1,cell:({row:e})=>(0,t.jsx)(eS.ModelsCell,{models:e.original.models})},{id:"routing_strategy",accessorKey:"routing_strategy",meta:{title:"Strategy",skeleton:"text"},header:({column:e})=>(0,t.jsx)(ek.DataTableSortHeader,{column:e,title:"Strategy"}),size:180,enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-sm",children:[(0,t.jsx)(ej,{className:"size-4 shrink-0 text-muted-foreground"}),ex(e.original.routing_strategy)]})},{id:"actions",meta:{className:"text-right",headerClassName:"text-right"},header:()=>(0,t.jsx)("span",{className:"sr-only",children:"Actions"}),size:64,enableSorting:!1,enableHiding:!1,cell:({row:a})=>(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(eA,{group:a.original,onEdit:e,onDelete:l})})}])({onEdit:r,onDelete:s,onToggleUsage:g}),[r,s,g]);return(0,t.jsx)(em.DataTable,{data:e,columns:m,getRowId:e=>e.group_name,sortingMode:"client",sorting:i,onSortingChange:o,expanded:d,onExpandedChange:c,getRowCanExpand:()=>!0,renderSubComponent:({row:e})=>(0,t.jsx)(e_,{group:e.original,baseUrl:u}),isLoading:a,loadingMessage:"Loading routing groups…",noDataMessage:(0,t.jsx)(eI,{}),size:"compact"})};var eL=e.i(808613);let{Text:eE,Paragraph:eO}=A.Typography,eB=new Set(["latency-based-routing","usage-based-routing"]),eD=/^[A-Za-z0-9._-]+$/,eP=({open:e,mode:a,initialValue:r,availableStrategies:s,strategyDescriptions:n,modelOptions:i,existingGroupNames:o,onClose:d,onSubmit:c,saving:u})=>{let[g]=eL.Form.useForm(),m=eL.Form.useWatch("routing_strategy",g),p={group_name:r?.group_name??"",models:r?.models??[],routing_strategy:r?.routing_strategy??s[0]??"simple-shuffle",routing_strategy_args:r?.routing_strategy_args?JSON.stringify(r.routing_strategy_args,null,2):""},f=(0,l.useMemo)(()=>new Set(o.filter(e=>e!==r?.group_name).map(e=>e.toLowerCase())),[o,r]),h=async()=>{let e=await g.validateFields(),t=eB.has(String(e.routing_strategy)),l=null;if(t&&e.routing_strategy_args&&e.routing_strategy_args.trim())try{l=JSON.parse(e.routing_strategy_args)}catch{g.setFields([{name:"routing_strategy_args",errors:["Must be valid JSON"]}]);return}await c({group_name:e.group_name.trim(),models:e.models,routing_strategy:e.routing_strategy,routing_strategy_args:l})};return(0,t.jsx)(D.Modal,{title:"create"===a?"Create Routing Group":`Edit ${r?.group_name??""}`,open:e,onCancel:d,onOk:h,okText:"create"===a?"Create Group":"Save Changes",cancelText:"Cancel",confirmLoading:u,destroyOnClose:!0,width:560,children:(0,t.jsxs)(eL.Form,{form:g,layout:"vertical",preserve:!1,initialValues:p,children:[(0,t.jsx)(eL.Form.Item,{label:"Group Name",name:"group_name",rules:[{required:!0,message:"Group name is required"},{max:64,message:"Must be 64 characters or fewer"},{pattern:eD,message:"Only letters, numbers, dot, underscore, and dash are allowed"},{validator:(e,t)=>t&&f.has(t.trim().toLowerCase())?Promise.reject(Error("A group with this name already exists")):Promise.resolve()}],extra:"Use this name as the model in API calls — LiteLLM routes the request to one of the group's models.",children:(0,t.jsx)(Y.Input,{placeholder:"fast-chat",disabled:"edit"===a})}),(0,t.jsx)(eL.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Select at least one model"}],extra:"Models from your model list that this group routes between.",children:(0,t.jsx)(y.Select,{mode:"multiple",allowClear:!0,placeholder:"Select models",options:i.map(e=>({label:e,value:e})),optionFilterProp:"label"})}),(0,t.jsx)(eL.Form.Item,{label:"Routing Strategy",name:"routing_strategy",rules:[{required:!0,message:"Strategy is required"}],children:(0,t.jsx)(y.Select,{options:s.map(e=>({label:e,value:e})),placeholder:"Select strategy"})}),m&&n[m]&&(0,t.jsx)(eO,{className:"text-xs text-gray-500 -mt-2 mb-4",children:n[m]}),eB.has(String(m))&&(0,t.jsx)(eL.Form.Item,{label:"Strategy Arguments (JSON)",name:"routing_strategy_args",extra:"latency-based-routing"===m?'Example: { "ttl": 3600, "lowest_latency_buffer": 0 }':'Example: { "ttl": 60 }',children:(0,t.jsx)(Y.Input.TextArea,{rows:4,placeholder:'{ "ttl": 3600 }',className:"font-mono text-xs"})}),(0,t.jsx)(X.Space,{direction:"vertical",className:"w-full mt-2",children:(0,t.jsx)(eE,{type:"secondary",className:"text-xs",children:"Models not claimed by an explicit group fall through to the proxy's top-level routing strategy."})})]},"edit"===a?`edit-${r?.group_name??""}`:"create")})},{Text:eR}=A.Typography,e$=()=>{let{data:e,isLoading:a,refetch:r,isFetching:s}=(()=>{let{accessToken:e,userId:t,userRole:l}=(0,el.default)();return(0,q.useQuery)({queryKey:en.lists(),queryFn:()=>ei(e),enabled:!!(e&&t&&l)})})(),{data:n}=(()=>{let{accessToken:e,userId:t,userRole:l}=(0,el.default)();return(0,q.useQuery)({queryKey:eo.detail("fields"),queryFn:async()=>await ed(e),enabled:!!(e&&t&&l)})})(),{data:i}=(0,ec.useModelHub)(),{accessToken:o}=(0,el.default)(),d=(0,eu.default)(o),c=(()=>{let{accessToken:e}=(0,el.default)(),t=(0,er.useQueryClient)();return(0,ea.useMutation)({mutationFn:t=>(0,h.setCallbacksCall)(e,{router_settings:{routing_groups:t}}),onSuccess:()=>{t.invalidateQueries({queryKey:en.lists()})}})})(),[u,g]=(0,l.useState)(""),[m,p]=(0,l.useState)(!1),[f,x]=(0,l.useState)("create"),[y,b]=(0,l.useState)(null),[_,C]=(0,l.useState)(null),k=e?.routingGroups??[],w=(0,l.useMemo)(()=>{let e=u.trim().toLowerCase();return e?k.filter(t=>t.group_name.toLowerCase().includes(e)||t.routing_strategy.toLowerCase().includes(e)||t.models.some(t=>t.toLowerCase().includes(e))):k},[k,u]),S=(0,l.useMemo)(()=>e?.availableStrategies?.length?e.availableStrategies:n?.fields?.find(e=>"routing_strategy"===e.field_name)?.options??[],[e?.availableStrategies,n]),N=n?.routing_strategy_descriptions??{},T=(0,l.useMemo)(()=>Array.from(new Set((i?.data??[]).map(e=>e.model_group).filter(e=>!!e))),[i]),M=async e=>{let t="create"===f?[...k,e]:k.map(t=>t.group_name===y?.group_name?e:t);try{await c.mutateAsync(t),v.default.success("create"===f?`Created routing group "${e.group_name}"`:`Updated routing group "${e.group_name}"`),p(!1)}catch(e){v.default.error(e instanceof Error?e.message:"Failed to save routing group")}},A=async()=>{if(!_)return;let e=k.filter(e=>e.group_name!==_.group_name);try{await c.mutateAsync(e),v.default.success(`Deleted routing group "${_.group_name}"`),C(null)}catch(e){v.default.error(e instanceof Error?e.message:"Failed to delete routing group")}};return(0,t.jsxs)(X.Space,{direction:"vertical",size:16,className:"w-full",children:[(0,t.jsxs)(V.Card,{bodyStyle:{padding:16},children:[(0,t.jsxs)(W.Flex,{justify:"space-between",align:"center",gap:12,className:"mb-4",children:[(0,t.jsx)(Y.Input,{allowClear:!0,prefix:(0,t.jsx)(et.SearchOutlined,{className:"text-gray-400"}),placeholder:"Search groups...",value:u,onChange:e=>g(e.target.value),className:"max-w-sm"}),(0,t.jsxs)(W.Flex,{align:"center",gap:12,children:[(0,t.jsx)(j.Button,{icon:(0,t.jsx)(ee.ReloadOutlined,{}),onClick:()=>r(),loading:s&&!a,children:"Refresh"}),(0,t.jsx)(j.Button,{type:"primary",icon:(0,t.jsx)(Z.PlusOutlined,{}),onClick:()=>{x("create"),b(null),p(!0)},children:"Create Group"}),(0,t.jsxs)(eR,{type:"secondary",className:"text-sm whitespace-nowrap",children:["Showing ",w.length," ",1===w.length?"result":"results"]})]})]}),(0,t.jsx)(eF,{groups:w,isLoading:a,onEdit:e=>{x("edit"),b(e),p(!0)},onDelete:e=>C(e),proxyBaseUrl:d.LITELLM_UI_API_DOC_BASE_URL?.trim()||d.PROXY_BASE_URL||""})]}),(0,t.jsx)(eP,{open:m,mode:f,initialValue:y,availableStrategies:S,strategyDescriptions:N,modelOptions:T,existingGroupNames:k.map(e=>e.group_name),onClose:()=>p(!1),onSubmit:M,saving:c.isPending}),(0,t.jsx)(D.Modal,{open:!!_,title:"Delete routing group?",okText:"Delete",okButtonProps:{danger:!0,loading:c.isPending},cancelText:"Cancel",onOk:A,onCancel:()=>C(null),children:(0,t.jsxs)(eR,{children:["Models in ",(0,t.jsx)(eR,{strong:!0,children:_?.group_name}),"will fall back to the proxy's top-level routing strategy. This cannot be undone."]})})]})},eH="enable_anthropic_prompt_caching",eq="anthropic_prompt_caching_ttl",ez=({setting:e,onChange:l})=>"Integer"===e.field_type?(0,t.jsx)(x.InputNumber,{step:1,value:e.field_value,onChange:t=>l(e.field_name,t)}):"Boolean"===e.field_type?(0,t.jsx)(p.Switch,{checked:!0===e.field_value||"true"===e.field_value,onChange:t=>l(e.field_name,t)}):"Float"===e.field_type?(0,t.jsx)(x.InputNumber,{min:0,max:1,step:.05,value:e.field_value,onChange:t=>l(e.field_name,t)}):"Dollar"===e.field_type?(0,t.jsx)(x.InputNumber,{min:.01,step:.25,prefix:"$",value:e.field_value,onChange:t=>l(e.field_name,t)}):"Select"===e.field_type?(0,t.jsx)(y.Select,{allowClear:!0,style:{minWidth:"8rem"},placeholder:"Default",value:e.field_value||void 0,options:(e.field_options??[]).map(e=>({label:e,value:e})),onChange:t=>l(e.field_name,t??"")}):null,eG=({accessToken:e,settings:l,onChange:r})=>{let s=l.find(e=>e.field_name===eH),n=l.find(e=>e.field_name===eq);if(!s)return null;let i=!0===s.field_value||"true"===s.field_value,o=(t,l)=>{r(t,l),""===l||null==l?(0,h.deleteConfigFieldSetting)(e,t):(0,h.updateConfigFieldSetting)(e,t,l)};return(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(c.Title,{children:"Prompt Caching"}),(0,t.jsxs)("div",{className:"mt-6 flex items-start justify-between gap-8",children:[(0,t.jsxs)("div",{className:"max-w-2xl",children:[(0,t.jsx)(u.Text,{className:"font-medium",children:"Automatic Anthropic prompt caching"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:s.field_description})]}),(0,t.jsx)(p.Switch,{checked:i,onChange:e=>o(eH,e)})]}),n&&(0,t.jsxs)("div",{className:"mt-6 flex items-start justify-between gap-8",children:[(0,t.jsxs)("div",{className:"max-w-2xl",children:[(0,t.jsx)(u.Text,{className:`font-medium ${i?"":"text-gray-400"}`,children:"Cache lifetime (TTL)"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:n.field_description})]}),(0,t.jsx)(y.Select,{allowClear:!0,disabled:!i,style:{minWidth:"10rem"},placeholder:"5m (default)",value:n.field_value||void 0,options:(n.field_options??[]).map(e=>({label:e,value:e})),onChange:e=>o(eq,e??"")})]})]})};e.s(["PromptCachingPanel",0,eG,"default",0,({accessToken:e,userRole:c,userID:p})=>{let[x,y]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,h.getGeneralSettingsCall)(e).then(e=>{y(e)})},[e]);let j=(e,t)=>{y(x.map(l=>l.field_name===e?{...l,field_value:t}:l))};return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(f.Tabs,{defaultValue:"loadbalancing",className:"h-[75vh] w-full",children:[(0,t.jsxs)(f.TabsList,{variant:"line",className:"mx-8 mt-4",children:[(0,t.jsx)(f.TabsTrigger,{value:"loadbalancing",children:"Loadbalancing"}),(0,t.jsx)(f.TabsTrigger,{value:"routing-groups",children:"Routing Groups"}),(0,t.jsx)(f.TabsTrigger,{value:"fallbacks",children:"Fallbacks"}),(0,t.jsx)(f.TabsTrigger,{value:"prompt-caching",children:"Prompt Caching"}),(0,t.jsx)(f.TabsTrigger,{value:"general",children:"General"})]}),(0,t.jsx)(f.TabsContent,{value:"loadbalancing",className:"px-8 py-6",children:(0,t.jsx)(k,{accessToken:e,userRole:c,userID:p})}),(0,t.jsx)(f.TabsContent,{value:"routing-groups",className:"px-8 py-6",children:(0,t.jsx)(e$,{})}),(0,t.jsx)(f.TabsContent,{value:"fallbacks",className:"px-8 py-6",children:(0,t.jsx)(Q,{accessToken:e,userRole:c,userID:p})}),(0,t.jsx)(f.TabsContent,{value:"prompt-caching",className:"px-8 py-6",children:(0,t.jsx)(eG,{accessToken:e,settings:x,onChange:j})}),(0,t.jsx)(f.TabsContent,{value:"general",className:"px-8 py-6",children:(0,t.jsx)(a.Card,{children:(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(i.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(i.TableHeaderCell,{children:"Value"}),(0,t.jsx)(i.TableHeaderCell,{children:"Status"}),(0,t.jsx)(i.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:x.filter(e=>"TypedDictionary"!==e.field_type&&"prompt_caching"!==e.field_tab).map((l,a)=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsxs)(o.TableCell,{children:[(0,t.jsx)(u.Text,{children:l.field_name}),(0,t.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:l.field_description})]}),(0,t.jsx)(o.TableCell,{children:(0,t.jsx)(ez,{setting:l,onChange:j})}),(0,t.jsx)(o.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(_.StatusBadge,{tone:"success",label:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(_.StatusBadge,{tone:"neutral",label:"In Config"}):(0,t.jsx)(_.StatusBadge,{tone:"neutral",label:"Not Set"})}),(0,t.jsxs)(o.TableCell,{children:[(0,t.jsx)(g.Button,{onClick:()=>(t=>{if(!e)return;let l=x.find(e=>e.field_name===t)?.field_value;if(null!=l&&void 0!=l)try{(0,h.updateConfigFieldSetting)(e,t,l);let a=x.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);y(a)}catch(e){}})(l.field_name),children:"Update"}),(0,t.jsx)(m.Icon,{icon:b.TrashIcon,color:"red",onClick:()=>(t=>{if(e)try{(0,h.deleteConfigFieldSetting)(e,t);let l=x.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:e.field_default_value??null}:e);y(l)}catch(e){}})(l.field_name),children:"Reset"})]})]},a))})]})})})]})}):null}],863679)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/04y2hqzy08peg.js b/litellm/proxy/_experimental/out/_next/static/chunks/04y2hqzy08peg.js
deleted file mode 100644
index 73873aa04f2..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/04y2hqzy08peg.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56567,838932,788259,e=>{"use strict";var t=e.i(843476),l=e.i(135214),a=e.i(109799),s=e.i(912598),i=e.i(907308),r=e.i(602869),n=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("guardrails"),d=()=>{let{accessToken:e,userId:t,userRole:a}=(0,l.default)();return(0,n.useQuery)({queryKey:o.list({}),queryFn:async()=>(0,r.getGuardrailsList)(e),enabled:!!(e&&t&&a),select:e=>{let t=e?.guardrails??[],l=new Set,a=new Set;for(let e of t)e.litellm_params?.default_on?l.add(e.guardrail_name):a.add(e.guardrail_name);return{guardrails:t,globalGuardrailNames:l,optionalGuardrailNames:a}}})};e.s(["useGuardrails",0,d],838932);var m=e.i(500330),c=e.i(11751),u=e.i(708347),g=e.i(751904),h=e.i(160818),p=e.i(827252),_=e.i(564897),x=e.i(646563),b=e.i(987432),j=e.i(530212),y=e.i(677667),f=e.i(130643),v=e.i(898667),T=e.i(389083),S=e.i(304967),w=e.i(350967),N=e.i(599724),C=e.i(779241),k=e.i(629569),M=e.i(464571),I=e.i(808613),A=e.i(311451),F=e.i(28651),P=e.i(199133),O=e.i(770914),D=e.i(790848),z=e.i(653496),L=e.i(262218),B=e.i(592968),R=e.i(888259),U=e.i(678784),E=e.i(118366),V=e.i(271645),G=e.i(9314),K=e.i(533882),$=e.i(552130),W=e.i(127952);function q({className:e,value:l,onChange:a}){return(0,t.jsxs)(P.Select,{className:e,value:l,onChange:a,children:[(0,t.jsx)(P.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(P.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(P.Select.Option,{value:"30d",children:"Monthly"})]})}var H=e.i(844565),J=e.i(355619);let Y=function({globalGuardrailNames:e,teamGuardrails:l=[],optedOutGlobalGuardrails:a=[],killSwitchOn:s=!1,variant:i="card",className:r=""}){let n=new Set(a),o=Array.from(e).filter(e=>!n.has(e)),d=l.filter(t=>!e.has(t)),m=s||0!==o.length||0!==d.length?(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"block text-sm font-medium text-gray-700 mb-2",children:[(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),"Global"]}),s?(0,t.jsx)(L.Tag,{color:"gold",children:"Bypassed for this team"}):o.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,t.jsx)(L.Tag,{color:"blue",children:e},e))}):(0,t.jsx)("span",{className:"block text-sm text-gray-500",children:"None configured"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Team-specific"}),d.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:d.map(e=>(0,t.jsx)(L.Tag,{color:"blue",children:e},e))}):(0,t.jsx)("span",{className:"block text-sm text-gray-500",children:"None configured"})]})]}):(0,t.jsx)("span",{className:"block text-gray-500",children:"No guardrails configured"});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${r}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Guardrails Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Global and team-specific guardrails applied to this team"})]})}),m]}):(0,t.jsxs)("div",{className:`${r}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Guardrails Settings"}),m]})};var Q=e.i(643449),Z=e.i(75921),X=e.i(390605),ee=e.i(162386),et=e.i(727749),el=e.i(384767),ea=e.i(435451),es=e.i(916940);let ei=({onChange:e,value:l,className:a,accessToken:s,placeholder:i="Select search tools (optional)",disabled:n=!1})=>{let[o,d]=(0,V.useState)([]),[m,c]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{(async()=>{if(s){c(!0);try{let e=await (0,r.fetchSearchTools)(s),t=Array.isArray(e?.search_tools)?e.search_tools:Array.isArray(e?.data)?e.data:[];d(t.map(e=>e?.search_tool_name).filter(e=>"string"==typeof e&&e.length>0).map(e=>({label:e,value:e})))}catch(e){console.error("Failed to load search tools:",e)}finally{c(!1)}}})()},[s]),(0,t.jsx)(P.Select,{mode:"multiple",allowClear:!0,showSearch:!0,optionFilterProp:"label",placeholder:i,onChange:e,value:l,loading:m,className:a,options:o,style:{width:"100%"},disabled:n})};e.s(["default",0,ei],788259);var er=e.i(183588),en=e.i(460285),eo=e.i(276173),ed=e.i(91979),em=e.i(269200),ec=e.i(942232),eu=e.i(977572),eg=e.i(427612),eh=e.i(64848),ep=e.i(496020),e_=e.i(536916),ex=e.i(21548);let eb={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team","/key/access_group_assignment":"Member can assign access groups to virtual keys for this team","/team/daily/activity":"Member can view all team usage data (not just their own)","/spend/logs":"Member can view spend logs for the entire team (not just their own)"},ej=({teamId:e,accessToken:l,canEditTeam:a})=>{let[s,i]=(0,V.useState)([]),[n,o]=(0,V.useState)([]),[d,m]=(0,V.useState)(!0),[c,u]=(0,V.useState)(!1),[g,h]=(0,V.useState)(!1),p=async()=>{try{if(m(!0),!l)return;let t=await (0,r.getTeamPermissionsCall)(l,e),a=t.all_available_permissions||[];i(a);let s=t.team_member_permissions||[];o(s),h(!1)}catch(e){et.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,V.useEffect)(()=>{p()},[e,l]);let _=async()=>{try{if(!l)return;u(!0),await (0,r.teamPermissionsUpdateCall)(l,e,n),et.default.success("Permissions updated successfully"),h(!1)}catch(e){et.default.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{u(!1)}};if(d)return(0,t.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let x=s.length>0;return(0,t.jsxs)(S.Card,{className:"bg-white shadow-md rounded-md p-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,t.jsx)(k.Title,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),a&&g&&(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(M.Button,{icon:(0,t.jsx)(ed.ReloadOutlined,{}),onClick:()=>{p()},children:"Reset"}),(0,t.jsx)(M.Button,{onClick:_,loading:c,type:"primary",icon:(0,t.jsx)(b.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(N.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),x?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(em.Table,{className:" min-w-full",children:[(0,t.jsx)(eg.TableHead,{children:(0,t.jsxs)(ep.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Method"}),(0,t.jsx)(eh.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(eh.TableHeaderCell,{children:"Description"}),(0,t.jsx)(eh.TableHeaderCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,t.jsx)(ec.TableBody,{children:s.map(e=>{let l=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")||"/spend/logs"===e?"GET":"POST",l=eb[e];if(!l){for(let[t,a]of Object.entries(eb))if(e.includes(t)){l=a;break}}return l||(l=`Access ${e}`),{method:t,endpoint:e,description:l,route:e}})(e);return(0,t.jsxs)(ep.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(eu.TableCell,{children:(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===l.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:l.method})}),(0,t.jsx)(eu.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:l.endpoint})}),(0,t.jsx)(eu.TableCell,{className:"text-gray-700",children:l.description}),(0,t.jsx)(eu.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(e_.Checkbox,{checked:n.includes(e),onChange:t=>{o(t.target.checked?[...n,e]:n.filter(t=>t!==e)),h(!0)},disabled:!a})})]},e)})})]})}):(0,t.jsx)("div",{className:"py-12",children:(0,t.jsx)(ex.Empty,{description:"No permissions available"})})]})};var ey=e.i(822315),ef=e.i(175712),ev=e.i(178654),eT=e.i(621192),eS=e.i(898586),ew=e.i(431703);let eN=async(e,t)=>{let l=(0,r.getProxyBaseUrl)(),a=l?`${l}/team/${encodeURIComponent(t)}/members/me`:`/team/${encodeURIComponent(t)}/members/me`,s=await fetch(a,{method:"GET",headers:{[(0,r.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(404===s.status)return null;if(!s.ok){let e=await s.json().catch(()=>({}));throw Error((0,ew.deriveErrorMessage)(e))}return await s.json()},eC=(e,l)=>(0,t.jsxs)(O.Space,{size:4,children:[(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:e}),(0,t.jsx)(B.Tooltip,{title:l,children:(0,t.jsx)(p.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),ek=(e,t=4)=>null==e?"0":(0,m.formatNumberWithCommas)(e,t),eM=e=>null==e?"Unlimited":(0,m.formatNumberWithCommas)(e,0);function eI({teamId:e}){let{data:a,isLoading:s,error:i}=(e=>{let{accessToken:t}=(0,l.default)();return(0,n.useQuery)({queryKey:["team",e,"members","me"],queryFn:()=>eN(t,e),enabled:!!(t&&e)})})(e);if(s)return(0,t.jsx)(ef.Card,{children:(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:"Loading your membership info…"})});if(i)return(0,t.jsx)(ef.Card,{children:(0,t.jsx)(eS.Typography.Text,{type:"danger",children:i instanceof Error?i.message:"Failed to load your membership info for this team."})});if(!a)return(0,t.jsx)(ef.Card,{children:(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:"No membership info available for the current user in this team."})});let r=a.litellm_budget_table??null,o=r?.max_budget??null,d=a.spend??0,m=a.total_spend??0,c=r?.tpm_limit??null,u=r?.rpm_limit??null,g=function(e){if(!e)return null;let t=(0,ey.default)(e);return t.isValid()?t.format("MMM D, YYYY"):null}(r?.budget_reset_at),h=r?.allowed_models??null;return(0,t.jsxs)(O.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(ef.Card,{children:(0,t.jsxs)(eT.Row,{gutter:[24,16],children:[(0,t.jsxs)(ev.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:"User"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(eS.Typography.Text,{strong:!0,children:a.user_email||a.user_id})}),(0,t.jsx)(eS.Typography.Text,{type:"secondary",style:{fontSize:12,fontFamily:"monospace"},children:a.user_id})]}),(0,t.jsxs)(ev.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:"Team Role"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(L.Tag,{color:"admin"===a.role?"blue":"default",children:a.role||"user"})})]})]})}),(0,t.jsxs)(eT.Row,{gutter:[16,16],children:[(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ef.Card,{children:[eC("Current Cycle Spend (USD)","Spend for the current budget cycle. Resets to $0 when the budget window rolls over."),(0,t.jsxs)("div",{style:{marginTop:8},children:[(0,t.jsxs)(eS.Typography.Title,{level:3,style:{margin:0},children:["$",ek(d,4)]}),(0,t.jsxs)(eS.Typography.Text,{type:"secondary",children:["of ",null===o?"Unlimited":`$${ek(o,4)}`]})]}),g&&(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsxs)(eS.Typography.Text,{type:"secondary",children:["Resets ",g]})})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ef.Card,{children:[eC("Rate Limits","Your per-member rate limits within this team."),(0,t.jsxs)("div",{style:{marginTop:8},children:[(0,t.jsxs)(eS.Typography.Text,{children:["TPM: ",eM(c)]}),(0,t.jsx)("br",{}),(0,t.jsxs)(eS.Typography.Text,{children:["RPM: ",eM(u)]})]})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ef.Card,{children:[eC("Total Spend (USD)","Cumulative spend across all budget cycles within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsxs)(eS.Typography.Title,{level:4,style:{margin:0},children:["$",ek(m,4)]})})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ef.Card,{children:[eC("Model Scope","Models you can access within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:h&&h.length>0?(0,t.jsx)(O.Space,{wrap:!0,children:h.map(e=>(0,t.jsx)(L.Tag,{children:e},e))}):(0,t.jsx)(eS.Typography.Text,{children:"All Team Models"})})]})})]})]})}let eA="overview",eF="my-user",eP="virtual-keys",eO="members",eD="member-permissions",ez="settings",eL={[eA]:"Overview",[eF]:"My User",[eP]:"Virtual Keys",[eO]:"Members",[eD]:"Member Permissions",[ez]:"Settings"};var eB=e.i(292639);e.i(622826);var eR=e.i(200208),eU=e.i(964471),eE=e.i(294612);function eV({teamData:e,canEditTeam:a,handleMemberDelete:s,setSelectedEditMember:i,setIsEditMemberModalVisible:r,setIsAddMemberModalVisible:n}){let o=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,m.formatNumberWithCommas)(t,8).replace(/\.?0+$/,"")}return"0"},{data:d}=(0,eB.useUISettings)(),{userId:c,userRole:g}=(0,l.default)(),h=!!d?.values?.disable_team_admin_delete_team_user,_=(0,u.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,c||""),x=(0,u.isProxyAdminRole)(g||""),b=[{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Model Scope",(0,t.jsx)(B.Tooltip,{title:"Models this member can access. Empty means they inherit all team models.",children:(0,t.jsx)(p.InfoCircleOutlined,{})})]}),key:"model_scope",render:(l,a)=>{let s=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t),a=l?.litellm_budget_table?.allowed_models;return a&&a.length>0?a:null})(a.user_id);if(!s)return(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:"(all team models)"});let i=s.slice(0,2),r=s.length-i.length;return(0,t.jsxs)(O.Space,{wrap:!0,children:[i.map(e=>(0,t.jsx)(eS.Typography.Text,{code:!0,style:{fontSize:"12px"},children:e},e)),r>0&&(0,t.jsx)(B.Tooltip,{title:s.slice(2).join(", "),children:(0,t.jsxs)(eS.Typography.Text,{type:"secondary",children:["+",r," more"]})})]})}},{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Current Cycle Spend (USD)",(0,t.jsx)(B.Tooltip,{title:"Spend for the current budget cycle. Resets to $0 when the member's budget window rolls over. This is the value checked against the member's budget.",children:(0,t.jsx)(p.InfoCircleOutlined,{})})]}),key:"spend",render:(l,a)=>(0,t.jsx)(eU.MoneyCell,{value:(t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.spend??0})(a.user_id),decimals:4})},{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Total Spend (USD)",(0,t.jsx)(B.Tooltip,{title:"Cumulative spend by this member within this team, across all budget cycles. Tracking began 2026-04-21; spend from before that date is not included.",children:(0,t.jsx)(p.InfoCircleOutlined,{})})]}),key:"total_spend",render:(l,a)=>(0,t.jsx)(eU.MoneyCell,{value:(t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.total_spend??0})(a.user_id),decimals:4})},{title:"Team Member Budget (USD)",key:"budget",render:(l,a)=>(0,t.jsx)(eU.MoneyCell,{value:(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t);return l?.litellm_budget_table?.max_budget??null})(a.user_id),decimals:4,emptyText:"Unlimited",showZero:!0})},{title:"Budget Reset",key:"budget_reset",render:(l,a)=>(0,t.jsx)(eR.DateCell,{value:(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t);return l?.litellm_budget_table?.budget_reset_at??null})(a.user_id),precision:"date"})},{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(B.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(p.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(l,a)=>(0,t.jsx)(eS.Typography.Text,{children:(t=>{if(!t)return"No Limits";let l=e.team_memberships.find(e=>e.user_id===t),a=l?.litellm_budget_table?.rpm_limit,s=l?.litellm_budget_table?.tpm_limit,i=[a?`${o(a)} RPM`:null,s?`${o(s)} TPM`:null].filter(Boolean);return i.length>0?i.join(" / "):"No Limits"})(a.user_id)})}];return(0,t.jsx)(eE.default,{members:e.team_info.members_with_roles,canEdit:a,onEdit:t=>{let l=e.team_memberships.find(e=>e.user_id===t.user_id);i({...t,max_budget_in_team:l?.litellm_budget_table?.max_budget||null,tpm_limit:l?.litellm_budget_table?.tpm_limit||null,rpm_limit:l?.litellm_budget_table?.rpm_limit||null,budget_duration:l?.litellm_budget_table?.budget_duration||null,allowed_models:l?.litellm_budget_table?.allowed_models||[]}),r(!0)},onDelete:s,onAddMember:()=>n(!0),roleColumnTitle:"Team Role",roleTooltip:"This role applies only to this team and is independent from the user's proxy-level role.",extraColumns:b,showDeleteForMember:()=>x||a&&!_||_&&!h})}var eG=e.i(207082),eK=e.i(399536);e.i(707701);var e$=e.i(807235),eW=e.i(981080),eq=e.i(494862),eH=e.i(531649),eJ=e.i(793479),eY=e.i(741466),eQ=e.i(871943),eZ=e.i(502547),eX=e.i(655063),e0=e.i(752978),e1=e.i(282786),e4=e.i(304911),e2=e.i(146512),e6=e.i(20147);let e3=[{id:"created_at",desc:!0}];function e5({teamId:e,teamAlias:l,organization:a}){let[s,i]=(0,V.useState)(null),[r,n]=(0,V.useState)(e3),[o,d]=(0,V.useState)({pageIndex:0,pageSize:50}),[m,c]=(0,V.useState)([]),[u,g]=(0,V.useState)(!1),[h,p]=(0,V.useState)(""),[_]=(0,eX.useDebouncedValue)(h,{wait:eY.DEBOUNCE_WAIT_MS}),x=(0,V.useCallback)(e=>{p(e),d(e=>({...e,pageIndex:0}))},[]),b=(0,V.useCallback)(e=>{let t=m.find(t=>t.id===e);return"string"==typeof t?.value&&t.value.trim()?t.value.trim():void 0},[m]),j=r.length>0?r[0].id:"created_at",y=r.length>0?r[0].desc?"desc":"asc":"desc",f=o.pageIndex,v=o.pageSize,{data:S,isPending:w,isFetching:C,refetch:k}=(0,eG.useKeys)(f+1,v,{teamID:e,selectedKeyAlias:_.trim()||void 0,userID:b("user_id"),sortBy:j||void 0,sortOrder:y||void 0,expand:"user"}),M=(0,V.useMemo)(()=>{let e=S?.keys||[],t=a?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[S?.keys,a?.organization_id]),I=S?.total_count??0,[A,F]=(0,V.useState)({}),P=(0,V.useMemo)(()=>({team_id:e,team_alias:l||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:a?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,l,a]),O=(0,V.useCallback)(()=>{k?.()},[k]);(0,V.useEffect)(()=>(window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)),[O]);let D=(0,V.useCallback)(e=>{c(e),d(e=>({...e,pageIndex:0}))},[]),z=(0,V.useMemo)(()=>[{id:"token",accessorKey:"token",meta:{title:"Key ID"},header:({column:e})=>(0,t.jsx)(eq.DataTableSortHeader,{column:e,title:"Key ID",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(eK.IdCell,{value:e.getValue(),onClick:()=>i(e.row.original)})},{id:"key_alias",accessorKey:"key_alias",meta:{title:"Key Alias"},header:({column:e})=>(0,t.jsx)(eq.DataTableSortHeader,{column:e,title:"Key Alias",variant:"header-cycle"}),size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(B.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"organization_id",accessorKey:"organization_id",header:"Organization ID",size:140,enableSorting:!1,cell:e=>e.getValue()?e.renderValue():"-"},{id:"user_email",accessorKey:"user",header:"User Email",size:160,enableSorting:!1,cell:e=>{let l=e.getValue(),a=l?.user_email,s=e.cell.column.getSize();return(0,t.jsx)(B.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:a??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:70,enableSorting:!1,cell:e=>{let l=e.getValue(),a="default_user_id"===l?"Default Proxy Admin":l,s=e.cell.column.getSize();return(0,t.jsx)(B.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:a??"-"})})}},{id:"created_at",accessorKey:"created_at",meta:{title:"Created At"},header:({column:e})=>(0,t.jsx)(eq.DataTableSortHeader,{column:e,title:"Created At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(eR.DateCell,{value:e.getValue(),precision:"date"})},{id:"created_by",accessorKey:"created_by",header:"Created By",size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let{created_by_user:a}=e.row.original,s=a?.user_alias??null,i=a?.user_email??null,r="default_user_id"===l,n=s||i||l,o=e.cell.column.getSize(),d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:s},{label:"User Email",value:i},{label:"User ID",value:l}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(eS.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!r||s||i?(0,t.jsx)(e1.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:o,overflow:"hidden"},children:n})}):(0,t.jsx)(e1.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(e4.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",meta:{title:"Updated At"},header:({column:e})=>(0,t.jsx)(eq.DataTableSortHeader,{column:e,title:"Updated At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(eR.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"last_active",accessorKey:"last_active",header:"Last Active",size:130,enableSorting:!1,cell:e=>(0,t.jsx)(eR.DateCell,{value:e.getValue(),precision:"date",fallback:"Unknown"})},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>(0,t.jsx)(eR.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend (USD)"},header:({column:e})=>(0,t.jsx)(eq.DataTableSortHeader,{column:e,title:"Spend (USD)",variant:"header-cycle"}),size:100,enableSorting:!0,cell:e=>(0,t.jsx)(eU.MoneyCell,{value:e.getValue(),decimals:4})},{id:"max_budget",accessorKey:"max_budget",meta:{title:"Budget (USD)"},header:({column:e})=>(0,t.jsx)(eq.DataTableSortHeader,{column:e,title:"Budget (USD)",variant:"header-cycle"}),size:110,enableSorting:!0,cell:e=>(0,t.jsx)(eU.MoneyCell,{value:e.getValue(),decimals:0,emptyText:"Unlimited",showZero:!0})},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>(0,t.jsx)(eR.DateCell,{value:e.getValue(),fallback:"Never"})},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue(),a=(0,e2.deriveKeyModelScope)(e.row.original.allowed_routes,e.row.original.key_type),s=a.hasModelAccess?(0,t.jsx)(T.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})}):(0,t.jsx)(B.Tooltip,{title:`Scoped to ${a.label} routes; this key cannot call any models`,children:(0,t.jsx)(T.Badge,{size:"xs",className:"mb-1",color:"gray",children:(0,t.jsx)(N.Text,{children:"No model access"})})});return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?s:(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(e0.Icon,{icon:A[e.row.id]?eQ.ChevronDownIcon:eZ.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>F(t=>({...t,[e.row.id]:!t[e.row.id]}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(T.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(T.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,J.getModelDisplayName)(e).slice(0,30)}...`:(0,J.getModelDisplayName)(e)})},l)),l.length>3&&!A[e.row.id]&&(0,t.jsx)(T.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(N.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),A[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(T.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(T.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,J.getModelDisplayName)(e).slice(0,30)}...`:(0,J.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[A]),L=(0,V.useCallback)(e=>{n(e),d(e=>({...e,pageIndex:0}))},[]);return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:s?(0,t.jsx)(e6.default,{keyId:s.token,onClose:()=>i(null),keyData:s,teams:[P],onDelete:k}):(0,t.jsx)("div",{className:"py-4 flex-1 overflow-hidden",children:(0,t.jsx)(e$.DataTable,{data:M,columns:z,sortingMode:"server",sorting:r,onSortingChange:L,paginationMode:"server",pagination:o,onPaginationChange:d,rowCount:I,filterMode:"server",columnFilters:m,onColumnFiltersChange:D,enableColumnResizing:!0,columnResizeMode:"onChange",isLoading:w||C,loadingMessage:"Loading keys...",maxBodyHeight:"75vh",size:"compact",toolbar:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eH.DataTableToolbar,{table:e,searchValue:h,onSearchChange:x,searchPlaceholder:"Search by key alias…",onRefresh:()=>k?.(),isRefreshing:C,onOpenFilters:()=>g(!0),filterLabels:{user_id:"User ID"}}),(0,t.jsx)(eW.DataTableFilterDrawer,{table:e,open:u,onOpenChange:g,title:"Filters",description:`Narrow down keys for ${l??"this team"}`,children:({get:e,set:l})=>(0,t.jsx)(eW.DataTableFilterField,{label:"User ID",children:(0,t.jsx)(eJ.Input,{value:e("user_id")??"",onChange:e=>l("user_id",e.target.value),placeholder:"Filter by user ID…"})})})]})})})})}e.s(["default",0,({teamId:e,onClose:n,accessToken:o,is_team_admin:ed,is_proxy_admin:em,is_org_admin:ec=!1,userModels:eu,editTeam:eg,premiumUser:eh=!1,onUpdate:ep})=>{let e_,ex,eb,ey,ef,ev,eT,[eS,ew]=(0,V.useState)(null),[eN,eC]=(0,V.useState)(!0),[ek,eM]=(0,V.useState)(!1),[eB]=I.Form.useForm(),[eR,eU]=(0,V.useState)(!1),[eE,eG]=(0,V.useState)(null),[eK,e$]=(0,V.useState)(!1),[eW,eq]=(0,V.useState)([]),[eH,eJ]=(0,V.useState)(!1),[eY,eQ]=(0,V.useState)({}),{data:eZ,isLoading:eX}=d(),e0=eZ?.globalGuardrailNames??new Set,[e1,e4]=(0,V.useState)([]),[e2,e6]=(0,V.useState)({}),[e3,e8]=(0,V.useState)(!1),[e7,e9]=(0,V.useState)(null),[te,tt]=(0,V.useState)(!1),[tl,ta]=(0,V.useState)(!1),[ts,ti]=(0,V.useState)(!1),[tr,tn]=(0,V.useState)({}),to=V.default.useRef(null),[td,tm]=(0,V.useState)(null),{userRole:tc,userId:tu}=(0,l.default)(),{data:tg=[]}=(0,a.useOrganizations)(),th=(0,s.useQueryClient)(),tp=(0,V.useMemo)(()=>{let e=eS?.team_info?.organization_id;if(!e||!tu)return!1;let t=tg.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===tu&&"org_admin"===e.user_role)??!1},[eS,tg,tu]),t_=I.Form.useWatch("models",eB),tx=I.Form.useWatch("disable_global_guardrails",eB),tb=(0,V.useMemo)(()=>{let e=t_??eS?.team_info?.models??[];return e.includes("all-proxy-models")||e.includes("all-team-models")?eu:(0,J.unfurlWildcardModelsInList)(e,eu)},[t_,eS,eu]),tj=ed||em||ec||tp,ty=(0,V.useMemo)(()=>{let e;return e=[eA,eF,eP],tj?[...e,eO,eD,ez]:e},[tj]),tf=(0,V.useMemo)(()=>eg&&tj?ez:eA,[eg,tj]),tv=async()=>{try{if(eC(!0),!o)return;let t=await (0,r.teamInfoCall)(o,e);ew(t)}catch(e){et.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{eC(!1)}};(0,V.useEffect)(()=>{tv()},[e,o]),(0,V.useEffect)(()=>{(async()=>{if(!o||!eS?.team_info?.organization_id)return tm(null);try{let e=await (0,r.organizationInfoCall)(o,eS.team_info.organization_id);tm(e)}catch(e){console.error("Error fetching organization info:",e),tm(null)}})()},[o,eS?.team_info?.organization_id]),(0,V.useMemo)(()=>{let e;return e=[],e=td?td.models.includes("all-proxy-models")?eu:td.models.length>0?td.models:eu:eu,(0,J.unfurlWildcardModelsInList)(e,eu)},[td,eu]),(0,V.useEffect)(()=>{(async()=>{try{if(!o)return;let e=(await (0,r.getPoliciesList)(o)).policies.map(e=>e.policy_name);e4(e)}catch(e){console.error("Failed to fetch policies:",e)}})()},[o]),(0,V.useEffect)(()=>{(async()=>{if(!o||!eS?.team_info?.policies||0===eS.team_info.policies.length)return;e8(!0);let e={};try{await Promise.all(eS.team_info.policies.map(async t=>{try{let l=await (0,r.getPolicyInfoWithGuardrails)(o,t);e[t]=l.resolved_guardrails||[]}catch(l){console.error(`Failed to fetch guardrails for policy ${t}:`,l),e[t]=[]}})),e6(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{e8(!1)}})()},[o,eS?.team_info?.policies]);let tT=async t=>{try{if(null==o)return;let l={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,r.teamMemberAddCall)(o,e,l),et.default.success("Team member added successfully"),eM(!1),eB.resetFields();let a=await (0,r.teamInfoCall)(o,e);ew(a),ep(a)}catch(t){let e="Failed to add team member";t?.raw?.detail?.error?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),et.default.fromBackend(e),console.error("Error adding team member:",t)}},tS=async t=>{try{if(null==o)return;let l={user_email:t.user_email,user_id:t.user_id,role:t.role,max_budget_in_team:t.max_budget_in_team,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,budget_duration:t.budget_duration,allowed_models:t.allowed_models};R.default.destroy(),await (0,r.teamMemberUpdateCall)(o,e,l),et.default.success("Team member updated successfully"),eU(!1);let a=await (0,r.teamInfoCall)(o,e);ew(a),ep(a)}catch(t){let e="Failed to update team member";t?.raw?.detail?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),eU(!1),R.default.destroy(),et.default.fromBackend(e),console.error("Error updating team member:",t)}},tw=async()=>{if(e7&&o){ta(!0);try{await (0,r.teamMemberDeleteCall)(o,e,e7),et.default.success("Team member removed successfully");let t=await (0,r.teamInfoCall)(o,e);ew(t),ep(t)}catch(e){et.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{ta(!1),tt(!1),e9(null)}}},tN=async t=>{try{let l;if(!o)return;ti(!0);let s={};try{let{soft_budget_alerting_emails:e,...l}=t.metadata?JSON.parse(t.metadata):{};s=l}catch(e){et.default.fromBackend("Invalid JSON in metadata field");return}if("string"==typeof t.secret_manager_settings&&t.secret_manager_settings.trim().length>0)try{l=JSON.parse(t.secret_manager_settings)}catch(e){et.default.fromBackend("Invalid JSON in secret manager settings");return}let i=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,n={},d={};for(let e of t.modelLimits??[])e?.model&&(null!=e.tpm&&(n[e.model]=e.tpm),null!=e.rpm&&(d[e.model]=e.rpm));let m=!0===t.disable_global_guardrails,u=m?Array.from(e0):Array.from(e0).filter(e=>!(t.guardrails||[]).includes(e)),g=em?{allowed_passthrough_routes:t.allowed_passthrough_routes||[]}:tC.metadata?.allowed_passthrough_routes?{allowed_passthrough_routes:tC.metadata.allowed_passthrough_routes}:{},h={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:i(t.tpm_limit),rpm_limit:i(t.rpm_limit),model_tpm_limit:n,model_rpm_limit:d,max_budget:t.max_budget,soft_budget:i(t.soft_budget),budget_duration:t.budget_duration,metadata:{...s,...g,guardrails:(t.guardrails||[]).filter(e=>!e0.has(e)),opted_out_global_guardrails:u,...t.logging_settings?.length>0?{logging:t.logging_settings}:{},disable_global_guardrails:m,soft_budget_alerting_emails:"string"==typeof t.soft_budget_alerting_emails?t.soft_budget_alerting_emails.split(",").map(e=>e.trim()).filter(e=>e.length>0):t.soft_budget_alerting_emails||[],...void 0!==l?{secret_manager_settings:l}:{}},...t.policies?.length>0?{policies:t.policies}:{},...t.organization_id!==tC.organization_id?{organization_id:t.organization_id??null}:{}};h.max_budget=(0,c.mapEmptyStringToNull)(h.max_budget),h.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(h.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(h.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(h.team_member_tpm_limit=i(t.team_member_tpm_limit),h.team_member_rpm_limit=i(t.team_member_rpm_limit));let{servers:p,accessGroups:_,toolsets:x}=t.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]},b=new Set(p||[]),j=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>b.has(e)));h.object_permission={},p&&(h.object_permission.mcp_servers=p),_&&(h.object_permission.mcp_access_groups=_),j&&(h.object_permission.mcp_tool_permissions=j),x&&(h.object_permission.mcp_toolsets=x),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:y,accessGroups:f}=t.agents_and_groups||{agents:[],accessGroups:[]};y&&y.length>0&&(h.object_permission.agents=y),f&&f.length>0&&(h.object_permission.agent_access_groups=f),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(h.object_permission.vector_stores=t.vector_stores),Array.isArray(t.object_permission_search_tools)&&(h.object_permission.search_tools=t.object_permission_search_tools),void 0!==t.access_group_ids&&(h.access_group_ids=t.access_group_ids),void 0!==t.default_team_member_models&&(h.default_team_member_models=t.default_team_member_models);let v=tC.litellm_model_table?.model_aliases??{};(Object.keys(tr).length>0||Object.keys(v).length>0)&&(h.model_aliases=tr);let T=to.current?.getValue();if(T?.router_settings){let e=e=>null!=e&&""!==e&&!1!==e&&!(Array.isArray(e)&&0===e.length),t=Object.values(T.router_settings).some(e),l=tC.router_settings&&Object.values(tC.router_settings).some(e);(t||l)&&(h.router_settings=T.router_settings)}await (0,r.teamUpdateCall)(o,h),th.invalidateQueries({queryKey:a.organizationKeys.all}),et.default.success("Team settings updated successfully"),e$(!1),tv()}catch(e){console.error("Error updating team:",e)}finally{ti(!1)}};if(eN)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!eS?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:tC}=eS,tk=tC.metadata?.disable_global_guardrails===!0,tM=new Set(Array.isArray(tC.metadata?.opted_out_global_guardrails)?tC.metadata.opted_out_global_guardrails:[]),tI=(Array.isArray(tC.metadata?.guardrails)?tC.metadata.guardrails:[]).filter(e=>!e0.has(e)),tA=tk?tI:[...Array.from(e0).filter(e=>!tM.has(e)),...tI],tF=eZ?.guardrails??[],tP=tF.filter(e=>e.litellm_params?.default_on),tO=tF.filter(e=>!e.litellm_params?.default_on),tD=(e,l)=>(0,t.jsx)(P.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,disabled:l,children:e.guardrail_name},e.guardrail_name),tz=e=>{e.preventDefault(),e.stopPropagation()},tL=async(e,t)=>{await (0,m.copyToClipboard)(e)&&(eQ(e=>({...e,[t]:!0})),setTimeout(()=>{eQ(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(M.Button,{type:"text",icon:(0,t.jsx)(j.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:n,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(k.Title,{children:tC.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(N.Text,{className:"text-gray-500 font-mono",children:tC.team_id}),(0,t.jsx)(M.Button,{type:"text",size:"small",icon:eY["team-id"]?(0,t.jsx)(U.CheckIcon,{size:12}):(0,t.jsx)(E.CopyIcon,{size:12}),onClick:()=>tL(tC.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eY["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsx)(z.Tabs,{defaultActiveKey:tf,className:"mb-4",items:[{key:eA,label:eL[eA],children:(0,t.jsxs)(w.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(k.Title,{children:["$",(0,m.formatNumberWithCommas)(tC.spend,4)]}),(0,t.jsxs)(N.Text,{children:["of ",null===tC.max_budget?"Unlimited":`$${(0,m.formatNumberWithCommas)(tC.max_budget,4)}`]}),tC.budget_duration&&(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Reset: ",tC.budget_duration]}),(0,t.jsx)("br",{}),tC.team_member_budget_table&&(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,m.formatNumberWithCommas)(tC.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(N.Text,{children:["TPM: ",tC.tpm_limit||"Unlimited"]}),(0,t.jsxs)(N.Text,{children:["RPM: ",tC.rpm_limit||"Unlimited"]}),tC.max_parallel_requests&&(0,t.jsxs)(N.Text,{children:["Max Parallel Requests: ",tC.max_parallel_requests]}),(e_=tC.metadata?.model_tpm_limit??{},ex=tC.metadata?.model_rpm_limit??{},0===(eb=Array.from(new Set([...Object.keys(e_),...Object.keys(ex)]))).length?null:(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(N.Text,{className:"text-gray-500",children:"Per-model limits:"}),eb.map(e=>(0,t.jsxs)(N.Text,{className:"text-xs",children:[e,": TPM ",e_[e]??"—",", RPM ",ex[e]??"—"]},e))]}))]})]}),(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===tC.models.length||tC.models.includes("all-proxy-models")?(0,t.jsx)(T.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[tC.models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"blue",children:e},`direct-${l}`)),(tC.access_group_models||[]).map((e,l)=>(0,t.jsx)(T.Badge,{color:"green",title:"From access group",children:e},`ag-${l}`))]})})]}),(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(N.Text,{children:["User Keys: ",eS.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(N.Text,{children:["Service Account Keys: ",eS.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Total: ",eS.keys.length]})]})]}),(0,t.jsx)(el.default,{objectPermission:tC.object_permission,variant:"card",accessToken:o}),(0,t.jsx)(S.Card,{children:(0,t.jsx)(Y,{globalGuardrailNames:e0,teamGuardrails:Array.isArray(tC.metadata?.guardrails)?tC.metadata.guardrails:[],optedOutGlobalGuardrails:Array.isArray(tC.metadata?.opted_out_global_guardrails)?tC.metadata.opted_out_global_guardrails:[],killSwitchOn:tk,variant:"inline"})}),(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),tC.policies&&tC.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:tC.policies.map((e,l)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Badge,{color:"purple",children:e}),e3&&(0,t.jsx)(N.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e3&&e2[e]&&e2[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(N.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e2[e].map((e,l)=>(0,t.jsx)(T.Badge,{color:"blue",size:"xs",children:e},l))})]})]},l))}):(0,t.jsx)(N.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(Q.default,{loggingConfigs:tC.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:eF,label:eL[eF],children:(0,t.jsx)(eI,{teamId:e})},{key:eP,label:eL[eP],children:(0,t.jsx)(e5,{teamId:e,teamAlias:tC.team_alias,organization:td})},{key:eO,label:eL[eO],children:(0,t.jsx)(eV,{teamData:eS,canEditTeam:tj,handleMemberDelete:e=>{e9(e),tt(!0)},setSelectedEditMember:eG,setIsEditMemberModalVisible:eU,setIsAddMemberModalVisible:eM})},{key:eD,label:eL[eD],children:(0,t.jsx)(ej,{teamId:e,accessToken:o,canEditTeam:tj})},{key:ez,label:eL[ez],children:(0,t.jsxs)(S.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(k.Title,{children:"Team Settings"}),tj&&!eK&&(0,t.jsx)(M.Button,{icon:(0,t.jsx)(g.EditOutlined,{className:"h-4 w-4"}),onClick:()=>{tn(tC.litellm_model_table?.model_aliases??{}),e$(!0)},children:"Edit Settings"})]}),eK&&eX?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):eK?(0,t.jsxs)(I.Form,{form:eB,onFinish:tN,onValuesChange:e=>{if("disable_global_guardrails"in e){let t=!0===e.disable_global_guardrails,l=(eB.getFieldValue("guardrails")||[]).filter(e=>!e0.has(e));eB.setFieldValue("guardrails",t?l:[...Array.from(e0),...l])}},initialValues:{...tC,team_alias:tC.team_alias,models:tC.models,tpm_limit:tC.tpm_limit,rpm_limit:tC.rpm_limit,object_permission_search_tools:tC.object_permission?.search_tools||[],modelLimits:Array.from(new Set([...Object.keys(tC.metadata?.model_tpm_limit??{}),...Object.keys(tC.metadata?.model_rpm_limit??{})])).map(e=>({model:e,tpm:tC.metadata?.model_tpm_limit?.[e],rpm:tC.metadata?.model_rpm_limit?.[e]})),max_budget:tC.max_budget,soft_budget:tC.soft_budget,budget_duration:tC.budget_duration,team_member_tpm_limit:tC.team_member_budget_table?.tpm_limit,team_member_rpm_limit:tC.team_member_budget_table?.rpm_limit,team_member_budget:tC.team_member_budget_table?.max_budget,team_member_budget_duration:tC.team_member_budget_table?.budget_duration,guardrails:tA,policies:tC.policies||[],disable_global_guardrails:tC.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(tC.metadata?.soft_budget_alerting_emails)?tC.metadata.soft_budget_alerting_emails.join(", "):"",metadata:tC.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:l,model_tpm_limit:a,model_rpm_limit:s,allowed_passthrough_routes:i,...r})=>r)(tC.metadata),null,2):"",logging_settings:tC.metadata?.logging||[],secret_manager_settings:tC.metadata?.secret_manager_settings?JSON.stringify(tC.metadata.secret_manager_settings,null,2):"",organization_id:tC.organization_id,vector_stores:tC.object_permission?.vector_stores||[],mcp_servers:tC.object_permission?.mcp_servers||[],mcp_access_groups:tC.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:tC.object_permission?.mcp_servers||[],accessGroups:tC.object_permission?.mcp_access_groups||[],toolsets:tC.object_permission?.mcp_toolsets||[]},mcp_tool_permissions:tC.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:tC.object_permission?.agents||[],accessGroups:tC.object_permission?.agent_access_groups||[]},access_group_ids:tC.access_group_ids||[],default_team_member_models:tC.default_team_member_models||[],allowed_passthrough_routes:tC.metadata?.allowed_passthrough_routes||[]},layout:"vertical",children:[(0,t.jsx)(I.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(A.Input,{type:""})}),(0,t.jsx)(I.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(ee.ModelSelect,{value:eB.getFieldValue("models")||[],onChange:e=>eB.setFieldValue("models",e),teamID:e,organizationID:eS?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!eS?.team_info?.organization_id,showAllProxyModelsOverride:(0,u.isProxyAdminRole)(tc)&&!eS?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(I.Form.Item,{label:(0,t.jsxs)("span",{children:["Model Aliases"," ",(0,t.jsx)(B.Tooltip,{title:"Map a custom alias to an underlying model. Team members can call the alias in API requests instead of the real model name.",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(K.default,{accessToken:o||"",initialModelAliases:tr,onAliasUpdate:tn,showExampleConfig:!1})}),(0,t.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(ea.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(I.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(ea.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(I.Form.Item,{label:"Soft Budget Alerting Emails",name:"soft_budget_alerting_emails",tooltip:"Comma-separated email addresses to receive alerts when the soft budget is reached",children:(0,t.jsx)(A.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsxs)(y.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(v.AccordionHeader,{children:(0,t.jsx)("b",{children:"Team Member Settings"})}),(0,t.jsxs)(f.AccordionBody,{children:[(0,t.jsx)(N.Text,{className:"text-xs text-gray-500 mb-4",children:"Optional defaults applied when members join this team. All fields can be overridden per member."}),(0,t.jsx)(I.Form.Item,{label:(0,t.jsxs)("span",{children:["Default Model Access"," ",(0,t.jsx)(B.Tooltip,{title:"Optional. If set, new members can only access these models by default. Must be a subset of the team's models above. Leave empty to give all members access to all team models.",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"default_team_member_models",children:(0,t.jsx)(I.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.models!==t.models,children:({getFieldValue:e})=>{let l=e("models")||tC.models||[];return(0,t.jsx)(P.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",value:eB.getFieldValue("default_team_member_models")||[],onChange:e=>eB.setFieldValue("default_team_member_models",e),options:l.map(e=>({label:e,value:e}))})}})}),(0,t.jsx)(I.Form.Item,{label:"Default Budget (USD)",name:"team_member_budget",tooltip:"Default spend budget for each member in this team.",children:(0,t.jsx)(ea.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(I.Form.Item,{label:"Default Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(q,{onChange:e=>eB.setFieldValue("team_member_budget_duration",e),value:eB.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(I.Form.Item,{label:"Default Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(C.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(I.Form.Item,{label:"Default TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for each member. Can be overridden per member.",children:(0,t.jsx)(ea.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(I.Form.Item,{label:"Default RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for each member. Can be overridden per member.",children:(0,t.jsx)(ea.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})})]})]}),(0,t.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(P.Select,{placeholder:"n/a",children:[(0,t.jsx)(P.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(P.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(P.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(ea.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(ea.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(I.Form.Item,{label:"Model-Specific Rate Limits",tooltip:"Set per-model TPM/RPM limits that apply across the whole team.",children:(0,t.jsx)(I.Form.List,{name:"modelLimits",children:(e,{add:l,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:l,...s})=>(0,t.jsxs)(O.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(I.Form.Item,{...s,name:[l,"model"],rules:[{required:!0,message:"Missing model"},{validator:(e,t)=>t&&(eB.getFieldValue("modelLimits")??[]).filter(e=>e?.model===t).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],style:{minWidth:240},children:(0,t.jsx)(P.Select,{showSearch:!0,placeholder:"Select model",allowClear:!0,options:tb.map(e=>({value:e,label:e}))})}),(0,t.jsx)(I.Form.Item,{...s,name:[l,"tpm"],rules:[{validator:async(e,t)=>{let a=(eB.getFieldValue("modelLimits")??[])[l]??{};return a.model&&null==t&&null==a.rpm?Promise.reject(Error("Set at least one of TPM or RPM")):Promise.resolve()}}],children:(0,t.jsx)(F.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(I.Form.Item,{...s,name:[l,"rpm"],children:(0,t.jsx)(F.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(_.MinusCircleOutlined,{onClick:()=>a(l),style:{color:"#ef4444"}})]},e)),(0,t.jsx)(I.Form.Item,{children:(0,t.jsx)(M.Button,{type:"dashed",onClick:()=>l(),block:!0,icon:(0,t.jsx)(x.PlusOutlined,{}),children:"Add Model Limit"})})]})})}),(0,t.jsx)(I.Form.Item,{label:"Router Settings",children:(0,t.jsx)(en.default,{ref:to,accessToken:o||"",value:tC.router_settings?{router_settings:tC.router_settings}:void 0})}),(0,t.jsx)(I.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(B.Tooltip,{title:"Select which guardrails apply to this team. Global guardrails are enabled by default — uncheck to opt out. Other guardrails are opt-in.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",children:(0,t.jsx)(P.Select,{mode:"multiple",placeholder:"Select guardrails",optionLabelProp:"label",tagRender:({label:e,value:l,closable:a,onClose:s})=>{let i=e0.has(l);return(0,t.jsxs)(L.Tag,{color:"blue",closable:a,onClose:s,onMouseDown:tz,style:{marginInlineEnd:4},children:[i&&(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),e]})},children:tP.length>0&&tO.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.Select.OptGroup,{label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4}}),"Global"]}),children:tP.map(e=>tD(e,!!tx))}),(0,t.jsx)(P.Select.OptGroup,{label:"Other",children:tO.map(e=>tD(e,!1))})]}):[...tP.map(e=>tD(e,!!tx)),...tO.map(e=>tD(e,!1))]})}),(0,t.jsx)(I.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable all global guardrails"," ",(0,t.jsx)(B.Tooltip,{title:"Kill switch: bypass every global guardrail for this team, including any added in the future. For per-guardrail opt-out instead, use the Guardrails dropdown above.",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(D.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(I.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(B.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",children:(0,t.jsx)(P.Select,{mode:"tags",placeholder:"Select or enter policies",options:e1.map(e=>({value:e,label:e}))})}),(0,t.jsx)(I.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(B.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(G.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(I.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(es.default,{onChange:e=>eB.setFieldValue("vector_stores",e),value:eB.getFieldValue("vector_stores"),accessToken:o||"",placeholder:"Select vector stores"})}),(0,t.jsx)(I.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(B.Tooltip,{title:eh?em?"":"Only proxy admins can set allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes",placement:"top",children:(0,t.jsx)(H.default,{onChange:e=>eB.setFieldValue("allowed_passthrough_routes",e),value:eB.getFieldValue("allowed_passthrough_routes"),accessToken:o||"",placeholder:"Select pass through routes",disabled:!eh||!em})})}),(0,t.jsx)(I.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(Z.default,{onChange:e=>eB.setFieldValue("mcp_servers_and_groups",e),value:eB.getFieldValue("mcp_servers_and_groups"),accessToken:o||"",placeholder:"Select MCP servers or access groups (optional)",allowAllProxyMcpServers:em})}),(0,t.jsx)(I.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(A.Input,{type:"hidden"})}),(0,t.jsx)(I.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(X.default,{accessToken:o||"",selectedServers:eB.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:eB.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eB.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(I.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)($.default,{onChange:e=>eB.setFieldValue("agents_and_groups",e),value:eB.getFieldValue("agents_and_groups"),accessToken:o||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsxs)(y.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(v.AccordionHeader,{children:(0,t.jsx)("b",{children:"Search Tool Settings"})}),(0,t.jsx)(f.AccordionBody,{children:(0,t.jsx)(I.Form.Item,{label:"Allowed Search Tools",name:"object_permission_search_tools",tooltip:"Select which search tools this team can access. Leave empty to allow all search tools.",children:(0,t.jsx)(ei,{onChange:e=>eB.setFieldValue("object_permission_search_tools",e),value:eB.getFieldValue("object_permission_search_tools"),accessToken:o||"",placeholder:"Select search tools (optional, empty = all allowed)"})})})]}),(0,t.jsx)(I.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(P.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:tg.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(I.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(er.default,{value:eB.getFieldValue("logging_settings"),onChange:e=>eB.setFieldValue("logging_settings",e)})}),(0,t.jsx)(I.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:eh?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(A.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!eh})}),(0,t.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(A.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 -bottom-6 -inset-x-6",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(M.Button,{onClick:()=>e$(!1),disabled:ts,children:"Cancel"}),(0,t.jsx)(M.Button,{icon:(0,t.jsx)(b.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:ts,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:tC.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:tC.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(tC.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:tC.models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"red",children:e},l))})]}),tC.default_team_member_models&&tC.default_team_member_models.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Default Member Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:tC.default_team_member_models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"blue",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Model Aliases"}),0===(ey=Object.entries(tC.litellm_model_table?.model_aliases??{})).length?(0,t.jsx)("div",{className:"text-gray-400",children:"No model aliases configured"}):(0,t.jsx)("div",{className:"mt-1 space-y-1",children:ey.map(([e,l])=>(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"font-mono",children:e}),(0,t.jsx)("span",{className:"text-gray-400",children:" -> "}),(0,t.jsx)("span",{className:"font-mono",children:l})]},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",tC.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",tC.rpm_limit||"Unlimited"]}),(ef=tC.metadata?.model_tpm_limit??{},ev=tC.metadata?.model_rpm_limit??{},0===(eT=Array.from(new Set([...Object.keys(ef),...Object.keys(ev)]))).length?null:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(N.Text,{className:"text-gray-500",children:"Per-model limits:"}),eT.map(e=>(0,t.jsxs)("div",{className:"text-xs ml-2",children:[e,": TPM ",ef[e]??"—",", RPM ",ev[e]??"—"]},e))]}))]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==tC.max_budget?`$${(0,m.formatNumberWithCommas)(tC.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==tC.soft_budget&&void 0!==tC.soft_budget?`$${(0,m.formatNumberWithCommas)(tC.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",tC.budget_duration||"Never"]}),tC.metadata?.soft_budget_alerting_emails&&Array.isArray(tC.metadata.soft_budget_alerting_emails)&&tC.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",tC.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(N.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(B.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",tC.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",tC.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",tC.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",tC.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",tC.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Router Settings"}),tC.router_settings&&Object.values(tC.router_settings).some(e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))?(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[tC.router_settings.routing_strategy&&(0,t.jsxs)("div",{children:["Routing Strategy: ",(0,t.jsx)(T.Badge,{color:"blue",children:tC.router_settings.routing_strategy})]}),null!=tC.router_settings.num_retries&&(0,t.jsxs)("div",{children:["Number of Retries: ",tC.router_settings.num_retries]}),null!=tC.router_settings.allowed_fails&&(0,t.jsxs)("div",{children:["Allowed Failures: ",tC.router_settings.allowed_fails]}),null!=tC.router_settings.cooldown_time&&(0,t.jsxs)("div",{children:["Cooldown Time: ",tC.router_settings.cooldown_time,"s"]}),null!=tC.router_settings.timeout&&(0,t.jsxs)("div",{children:["Timeout: ",tC.router_settings.timeout,"s"]}),null!=tC.router_settings.retry_after&&(0,t.jsxs)("div",{children:["Retry After: ",tC.router_settings.retry_after,"s"]}),tC.router_settings.fallbacks&&Array.isArray(tC.router_settings.fallbacks)&&tC.router_settings.fallbacks.length>0&&(0,t.jsxs)("div",{children:["Fallbacks: ",tC.router_settings.fallbacks.length," configured"]}),tC.router_settings.enable_tag_filtering&&(0,t.jsx)("div",{children:"Tag Filtering: Enabled"})]}):(0,t.jsx)("div",{className:"text-gray-400",children:"No router settings configured"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:tC.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(T.Badge,{color:tC.blocked?"red":"green",children:tC.blocked?"Blocked":"Active"})]}),(0,t.jsx)(el.default,{objectPermission:tC.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:o}),(0,t.jsx)(Y,{globalGuardrailNames:e0,teamGuardrails:Array.isArray(tC.metadata?.guardrails)?tC.metadata.guardrails:[],optedOutGlobalGuardrails:Array.isArray(tC.metadata?.opted_out_global_guardrails)?tC.metadata.opted_out_global_guardrails:[],killSwitchOn:tk,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsx)(Q.default,{loggingConfigs:tC.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),tC.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded-sm text-xs overflow-x-auto",children:JSON.stringify(tC.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>ty.includes(e.key))}),(0,t.jsx)(eo.default,{visible:eR,onCancel:()=>eU(!1),onSubmit:tS,initialData:eE,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,t.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,t.jsx)(B.Tooltip,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"budget_duration",label:(0,t.jsxs)("span",{children:["Budget Reset Period"," ",(0,t.jsx)(B.Tooltip,{title:"How often this member's budget resets within the team. Leave unset and the budget never resets.",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"budget-duration"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(B.Tooltip,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,t.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,t.jsx)(B.Tooltip,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"},{name:"allowed_models",label:(0,t.jsxs)("span",{children:["Allowed Models"," ",(0,t.jsx)(B.Tooltip,{title:"Models this member can access within this team. Leave empty to inherit all team models.",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"multi-select",options:(tC.models||[]).map(e=>({label:e,value:e})),placeholder:"Leave empty to inherit all team models"}]}}),(0,t.jsx)(i.default,{isVisible:ek,onCancel:()=>eM(!1),onSubmit:tT,accessToken:o,teamId:e}),(0,t.jsx)(W.default,{isOpen:te,title:"Delete Team Member",alertMessage:"Removing team members will also delete any keys created by or created for this member.",message:"Are you sure you want to remove this member from the team? This action cannot be undone.",resourceInformationTitle:"Team Member Information",resourceInformation:[{label:"User ID",value:e7?.user_id,code:!0},{label:"Email",value:e7?.user_email},{label:"Role",value:e7?.role}],onCancel:()=>{tt(!1),e9(null)},onOk:tw,confirmLoading:tl})]})}],56567)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/054z32giulaw7.js b/litellm/proxy/_experimental/out/_next/static/chunks/054z32giulaw7.js
deleted file mode 100644
index e5097101fb1..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/054z32giulaw7.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,799062,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(197647),s=e.i(653824),i=e.i(881073),n=e.i(404206),r=e.i(723731),o=e.i(560445),d=e.i(207082),c=e.i(135214),u=e.i(332102);e.i(707701);var m=e.i(807235),g=e.i(494862);e.i(622826);var x=e.i(200208),h=e.i(399536),p=e.i(964471);function b({value:e}){return e?(0,a.jsx)("span",{className:"block max-w-60 truncate",title:e,children:e}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"})}let j=[{id:"deleted_at",desc:!0}];function f(){return(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,a.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,a.jsx)(u.Inbox,{className:"size-5 text-muted-foreground"})}),(0,a.jsx)("div",{className:"text-sm font-medium text-foreground",children:"No deleted keys found"}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Keys deleted from this proxy will show up here."})]})}function y({keys:e,totalCount:l,isLoading:s,pagination:i,onPaginationChange:n}){let[r,o]=(0,t.useState)(j),d=(0,t.useMemo)(()=>[{id:"token",accessorKey:"token",meta:{title:"Key ID"},header:"Key ID",size:150,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.token,variant:"plain"})},{id:"key_alias",accessorKey:"key_alias",meta:{title:"Key Alias"},header:"Key Alias",size:150,enableSorting:!1,cell:({row:e})=>{let t=e.original.key_alias;return t?(0,a.jsx)("span",{className:"block max-w-60 truncate font-mono text-xs",title:t,children:t}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"})}},{id:"team_alias",accessorKey:"team_alias",meta:{title:"Team Alias"},header:"Team Alias",size:120,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(b,{value:e.original.team_alias})},{id:"spend",accessorKey:"spend",meta:{title:"Spend (USD)",numeric:!0},header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Spend (USD)"}),size:100,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(p.MoneyCell,{value:e.original.spend,decimals:4})},{id:"max_budget",accessorKey:"max_budget",meta:{title:"Budget (USD)",numeric:!0},header:"Budget (USD)",size:110,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(p.MoneyCell,{value:e.original.max_budget,decimals:0,emptyText:"Unlimited",showZero:!0})},{id:"user_email",accessorKey:"user_email",meta:{title:"User Email"},header:"User Email",size:160,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(b,{value:e.original.user_email})},{id:"user_id",accessorKey:"user_id",meta:{title:"User ID"},header:"User ID",size:120,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.user_id,variant:"plain"})},{id:"created_at",accessorKey:"created_at",meta:{title:"Created At"},header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Created At"}),size:120,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(x.DateCell,{value:e.original.created_at,precision:"date"})},{id:"created_by",accessorKey:"created_by",meta:{title:"Created By"},header:"Created By",size:120,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(b,{value:e.original.created_by})},{id:"deleted_at",accessorKey:"deleted_at",meta:{title:"Deleted At"},header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Deleted At"}),size:120,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(x.DateCell,{value:e.original.deleted_at,precision:"date"})},{id:"deleted_by",accessorKey:"deleted_by",meta:{title:"Deleted By"},header:"Deleted By",size:120,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(b,{value:e.original.deleted_by})}],[]);return(0,a.jsx)(m.DataTable,{data:e,columns:d,getRowId:(e,a)=>e.token||String(a),sortingMode:"client",sorting:r,onSortingChange:o,paginationMode:"server",pagination:i,onPaginationChange:n,rowCount:l,isLoading:s,loadingMessage:"Loading deleted keys…",noDataMessage:(0,a.jsx)(f,{}),size:"compact"})}function _(){let{premiumUser:e}=(0,c.default)(),[l,s]=(0,t.useState)({pageIndex:0,pageSize:50}),{data:i,isLoading:n}=(0,d.useDeletedKeys)(l.pageIndex+1,l.pageSize);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,a.jsx)(o.Alert,{type:"info",banner:!0,showIcon:!0,message:"Coming soon to Enterprise",description:"Deleted key auditing is graduating from beta into our Enterprise audit & compliance suite."}),(0,a.jsx)(y,{keys:i?.keys||[],totalCount:i?.total_count||0,isLoading:n,pagination:l,onPaginationChange:s})]})}var v=e.i(785242),S=e.i(547227);let C=[{id:"deleted_at",desc:!0}];function T(){return(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,a.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,a.jsx)(u.Inbox,{className:"size-5 text-muted-foreground"})}),(0,a.jsx)("div",{className:"text-sm font-medium text-foreground",children:"No deleted teams found"}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Teams deleted from this proxy will show up here."})]})}function N({teams:e,isLoading:l}){let[s,i]=(0,t.useState)(C),n=(0,t.useMemo)(()=>[{id:"team_alias",accessorKey:"team_alias",meta:{title:"Team Name"},header:"Team Name",size:150,enableSorting:!1,cell:({row:e})=>{let t=e.original.team_alias;return t?(0,a.jsx)("span",{className:"block max-w-60 truncate font-medium",title:t,children:t}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"})}},{id:"team_id",accessorKey:"team_id",meta:{title:"Team ID"},header:"Team ID",size:150,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.team_id,variant:"plain"})},{id:"created_at",accessorKey:"created_at",meta:{title:"Created"},header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Created"}),size:120,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(x.DateCell,{value:e.original.created_at,precision:"date"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend (USD)",numeric:!0},header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Spend (USD)"}),size:100,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(p.MoneyCell,{value:e.original.spend,decimals:4})},{id:"max_budget",accessorKey:"max_budget",meta:{title:"Budget (USD)",numeric:!0},header:"Budget (USD)",size:110,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(p.MoneyCell,{value:e.original.max_budget,decimals:0,emptyText:"Unlimited",showZero:!0})},{id:"models",accessorKey:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:200,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(S.ModelsCell,{models:e.original.models})},{id:"organization_id",accessorKey:"organization_id",meta:{title:"Organization"},header:"Organization",size:150,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.organization_id,variant:"plain"})},{id:"deleted_at",accessorKey:"deleted_at",meta:{title:"Deleted At"},header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Deleted At"}),size:120,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(x.DateCell,{value:e.original.deleted_at,precision:"date"})},{id:"deleted_by",accessorKey:"deleted_by",meta:{title:"Deleted By"},header:"Deleted By",size:120,enableSorting:!1,cell:({row:e})=>{let t=e.original.deleted_by;return t?(0,a.jsx)("span",{className:"block max-w-60 truncate",title:t,children:t}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"})}}],[]);return(0,a.jsx)(m.DataTable,{data:e,columns:n,getRowId:(e,a)=>e.team_id||String(a),sortingMode:"client",sorting:s,onSortingChange:i,isLoading:l,loadingMessage:"Loading deleted teams…",noDataMessage:(0,a.jsx)(T,{}),size:"compact"})}function k(){let{premiumUser:e}=(0,c.default)(),{data:t,isLoading:l}=(0,v.useDeletedTeams)(1,100);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,a.jsx)(o.Alert,{type:"info",banner:!0,showIcon:!0,message:"Coming soon to Enterprise",description:"Deleted team auditing is graduating from beta into our Enterprise audit & compliance suite."}),(0,a.jsx)(N,{teams:t||[],isLoading:l})]})}var D=e.i(266027),M=e.i(619273),L=e.i(555987),w=e.i(602869),I=e.i(176516),z=e.i(981080),F=e.i(531649),K=e.i(793479),P=e.i(967489),O=e.i(997422),A=e.i(112179),E=e.i(304911);let Y={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},H={created:"success",updated:"info",deleted:"error",rotated:"warning"},q=[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],R=[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],U={object_id:"Object ID",changed_by:"Changed By",team_id:"Team ID",key_hash:"Key Hash",action:"Action",table_name:"Table"},B=(e,a)=>{let t=String(a);return"action"===e?q.find(e=>e.value===t)?.label??t:"table_name"===e?Y[t]??t:t};function V({filtered:e}){return(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,a.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,a.jsx)(I.ScrollText,{className:"size-5 text-muted-foreground"})}),(0,a.jsx)("div",{className:"text-sm font-medium text-foreground",children:e?"No matching audit logs":"No audit logs yet"}),(0,a.jsx)("div",{className:"max-w-xs text-center text-sm text-muted-foreground",children:e?"No audit log entries match your filters.":"Administrative changes to keys, teams, users, and models will appear here."})]})}function $({data:e,rowCount:l,isLoading:s,isRefreshing:i,pagination:n,onPaginationChange:r,columnFilters:o,onColumnFiltersChange:d,onRefresh:c,onViewLog:u}){let[g,p]=(0,t.useState)(!1),b=(0,t.useMemo)(()=>(({onViewLog:e})=>[{id:"updated_at",accessorKey:"updated_at",header:"Timestamp",size:200,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(x.DateCell,{value:e.original.updated_at})},{id:"action",accessorKey:"action",header:"Action",size:110,enableSorting:!1,cell:({row:e})=>{let t;return(0,a.jsx)(A.StatusBadge,{tone:H[e.original.action]??"neutral",label:(t=e.original.action)?t.charAt(0).toUpperCase()+t.slice(1):t})}},{id:"table_name",accessorKey:"table_name",header:"Table",size:130,enableSorting:!1,cell:({row:e})=>(0,a.jsx)("span",{className:"text-sm",children:Y[e.original.table_name]??e.original.table_name})},{id:"object_id",accessorKey:"object_id",header:"Object ID",minSize:220,enableSorting:!1,cell:({row:t})=>(0,a.jsx)(O.IdentityCell,{title:t.original.object_id,titleClassName:"font-mono text-xs font-normal text-primary",className:"max-w-72",onClick:()=>e(t.original)})},{id:"changed_by",accessorKey:"changed_by",header:"Changed By",size:200,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(E.default,{userId:e.original.changed_by})},{id:"changed_by_api_key",accessorKey:"changed_by_api_key",header:"API Key (Hash)",size:160,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.changed_by_api_key,variant:"plain"})}])({onViewLog:u}),[u]);return(0,a.jsx)(m.DataTable,{data:e,columns:b,getRowId:e=>e.id,paginationMode:"server",pagination:n,onPaginationChange:r,rowCount:l,filterMode:"server",columnFilters:o,onColumnFiltersChange:d,isLoading:s,loadingMessage:"Loading audit logs…",noDataMessage:(0,a.jsx)(V,{filtered:o.length>0}),size:"compact",toolbar:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F.DataTableToolbar,{table:e,onRefresh:c,isRefreshing:i,onOpenFilters:()=>p(!0),filterLabels:U,formatFilterValue:B,showViewOptions:!1}),(0,a.jsx)(z.DataTableFilterDrawer,{table:e,open:g,onOpenChange:p,title:"Filters",description:"Narrow down audit log entries",children:({get:e,set:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z.DataTableFilterField,{label:"Object ID",children:(0,a.jsx)(K.Input,{value:e("object_id")??"",onChange:e=>t("object_id",e.target.value),placeholder:"Enter object ID…"})}),(0,a.jsx)(z.DataTableFilterField,{label:"Changed By",children:(0,a.jsx)(K.Input,{value:e("changed_by")??"",onChange:e=>t("changed_by",e.target.value),placeholder:"Enter user ID…"})}),(0,a.jsx)(z.DataTableFilterField,{label:"Team ID",children:(0,a.jsx)(K.Input,{value:e("team_id")??"",onChange:e=>t("team_id",e.target.value),placeholder:"Enter team ID…"})}),(0,a.jsx)(z.DataTableFilterField,{label:"Key Hash",children:(0,a.jsx)(K.Input,{value:e("key_hash")??"",onChange:e=>t("key_hash",e.target.value),placeholder:"Enter key hash…"})}),(0,a.jsx)(z.DataTableFilterField,{label:"Action",children:(0,a.jsxs)(P.Select,{value:e("action")??"all",onValueChange:e=>t("action","all"===e?void 0:e),children:[(0,a.jsx)(P.SelectTrigger,{className:"w-full",children:(0,a.jsx)(P.SelectValue,{placeholder:"All Actions"})}),(0,a.jsxs)(P.SelectContent,{children:[(0,a.jsx)(P.SelectItem,{value:"all",children:"All Actions"}),q.map(e=>(0,a.jsx)(P.SelectItem,{value:e.value,children:e.label},e.value))]})]})}),(0,a.jsx)(z.DataTableFilterField,{label:"Table",children:(0,a.jsxs)(P.Select,{value:e("table_name")??"all",onValueChange:e=>t("table_name","all"===e?void 0:e),children:[(0,a.jsx)(P.SelectTrigger,{className:"w-full",children:(0,a.jsx)(P.SelectValue,{placeholder:"All Tables"})}),(0,a.jsxs)(P.SelectContent,{children:[(0,a.jsx)(P.SelectItem,{value:"all",children:"All Tables"}),R.map(e=>(0,a.jsx)(P.SelectItem,{value:e.value,children:e.label},e.value))]})]})})]})})]})})}var Q=e.i(608856),J=e.i(262218),W=e.i(898586),G=e.i(149192),Z=e.i(166406),X=e.i(492030),ee=e.i(166540);let{Text:ea}=W.Typography,et={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},el={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function es({label:e,value:l}){let[s,i]=(0,t.useState)(!1),n=(0,t.useCallback)(async()=>{try{let e=JSON.stringify(l,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.focus(),a.select(),document.execCommand("copy"),document.body.removeChild(a)}i(!0),setTimeout(()=>i(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[l]);return(0,a.jsxs)("div",{className:"bg-white rounded-sm border overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,a.jsx)("button",{onClick:n,className:"p-1 hover:bg-gray-200 rounded-sm text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:s?(0,a.jsx)(X.CheckOutlined,{className:"text-green-600"}):(0,a.jsx)(Z.CopyOutlined,{})})]}),(0,a.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(l,null,2)})]})}function ei({label:e,value:t}){return(0,a.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,a.jsx)("span",{className:"text-xs text-gray-900 break-all",children:t})]})}function en({log:e}){let{action:t,table_name:l,before_value:s,updated_values:i}=e,n="LiteLLM_VerificationToken"===l,r="updated"===t||"rotated"===t,o=s,d=i;if(r&&s&&i){let e={},a={};new Set([...Object.keys(s),...Object.keys(i)]).forEach(t=>{JSON.stringify(s[t])!==JSON.stringify(i[t])&&(t in s&&(e[t]=s[t]),t in i&&(a[t]=i[t]))}),Object.keys(s).forEach(t=>{t in i||t in e||(e[t]=s[t],a[t]=void 0)}),Object.keys(i).forEach(t=>{t in s||t in a||(a[t]=i[t],e[t]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(a).length>0?a:{note:"No differing fields detected"}}let c=(e,t)=>{if(!t||0===Object.keys(t).length)return(0,a.jsxs)("div",{className:"bg-white rounded-sm border overflow-hidden",children:[(0,a.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,a.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(n&&r){let l=["token","spend","max_budget"];if(Object.keys(t).every(e=>l.includes(e))&&!("note"in t))return(0,a.jsxs)("div",{className:"bg-white rounded-sm border overflow-hidden",children:[(0,a.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,a.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==t.token&&(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",t.token??"N/A"]}),void 0!==t.spend&&(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(t.spend).toFixed(6)]}),void 0!==t.max_budget&&(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(t.max_budget).toFixed(6)]})]})]})}return(0,a.jsx)(es,{label:e,value:t})};return(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function er({open:e,onClose:t,log:l}){if(!l)return null;let s=et[l.table_name]??l.table_name,i=el[l.action]??"default";return(0,a.jsxs)(Q.Drawer,{placement:"right",width:"60%",open:e,onClose:t,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(J.Tag,{color:i,className:"capitalize m-0",children:l.action}),(0,a.jsx)("span",{className:"text-sm text-gray-500",children:ee.default.utc(l.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,a.jsx)("button",{onClick:t,className:"w-8 h-8 flex items-center justify-center rounded-sm hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,a.jsx)(G.CloseOutlined,{})})]}),(0,a.jsxs)("div",{className:"px-6 py-5",children:[(0,a.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,a.jsx)(ei,{label:"Table",value:s}),(0,a.jsx)(ei,{label:"Object ID",value:(0,a.jsx)(ea,{copyable:!0,className:"font-mono text-xs",children:l.object_id})}),(0,a.jsx)(ei,{label:"Changed By",value:(0,a.jsx)(E.default,{userId:l.changed_by})}),(0,a.jsx)(ei,{label:"API Key (Hash)",value:l.changed_by_api_key?(0,a.jsx)(ea,{copyable:!0,className:"font-mono text-xs break-all",children:l.changed_by_api_key}):"—"})]}),(0,a.jsx)(en,{log:l})]})]})}function eo({userID:e,userRole:l,token:s,accessToken:i,isActive:n,premiumUser:r}){let[o,d]=(0,t.useState)({pageIndex:0,pageSize:50}),[c,u]=(0,t.useState)([]),[m,g]=(0,t.useState)(null),[x,h]=(0,t.useState)(!1),p=e=>{let a=c.find(a=>a.id===e);return"string"==typeof a?.value&&a.value.trim()?a.value.trim():void 0},b=!!i&&!!s&&!!l&&!!e&&n&&r,j=(0,D.useQuery)({queryKey:["audit_logs",o.pageIndex,o.pageSize,c],queryFn:async()=>i?(0,w.uiAuditLogsCall)({accessToken:i,page:o.pageIndex+1,page_size:o.pageSize,params:{object_id:p("object_id"),changed_by:p("changed_by"),object_key_hash:p("key_hash"),object_team_id:p("team_id"),action:p("action"),table_name:p("table_name"),sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:o.pageSize,total_pages:0},enabled:b,placeholderData:M.keepPreviousData}),f=(0,t.useCallback)(e=>{u(e),d(e=>({...e,pageIndex:0}))},[]),y=(0,t.useCallback)(e=>{g(e),h(!0)},[]);return r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,a.jsx)($,{data:j.data?.audit_logs??[],rowCount:j.data?.total??0,isLoading:j.isLoading,isRefreshing:j.isFetching,pagination:o,onPaginationChange:d,columnFilters:c,onColumnFiltersChange:f,onRefresh:()=>j.refetch(),onViewLog:y}),(0,a.jsx)(er,{open:x,onClose:()=>h(!1),log:m})]}):(0,a.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,a.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,a.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,a.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,a.jsx)("img",{src:(0,L.resolveLogoSrc)("/ui/assets/audit-logs-preview.png"),alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]})}var ed=e.i(548151),ec=e.i(708347),eu=e.i(20147),em=e.i(97859);let eg=async(e,a)=>{if(!e)return[];try{let t=[],l=1,s=!0;for(;s;){let i=await (0,w.teamListCall)(e,a||null,null);t=[...t,...i],l({start_date:(0,ee.default)(e).utc().format("YYYY-MM-DD HH:mm:ss"),end_date:t?(0,ee.default)(a).utc().format("YYYY-MM-DD HH:mm:ss"):(0,ee.default)(l).utc().format("YYYY-MM-DD HH:mm:ss")}),eM=[{id:"startTime",desc:!0}],eL=(e,a)=>{let t=e.find(e=>e.id===a);if("string"!=typeof t?.value)return;let l=t.value.trim();return""===l?void 0:l};e.i(3565);var ew=e.i(502626);let eI=(0,e.i(475254).default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);var ez=e.i(519455),eF=e.i(337822),eK=e.i(699375);function eP({startTime:e,onStartTimeChange:l,endTime:s,onEndTimeChange:i,isCustomDate:n,onIsCustomDateChange:r,selectedTimeInterval:o,onSelectedTimeIntervalChange:d,isLiveTail:c,onIsLiveTailChange:u,onResetToFirstPage:m,onResetFilters:g}){let[x,h]=(0,t.useState)(!1),p=em.QUICK_SELECT_OPTIONS.find(e=>e.value===o.value&&e.unit===o.unit),b=n?((e,a,t)=>{if(e)return`${(0,ee.default)(a).format("MMM D, h:mm A")} - ${(0,ee.default)(t).format("MMM D, h:mm A")}`;let l=(0,ee.default)(),s=(0,ee.default)(a),i=l.diff(s,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=l.diff(s,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${s.format("MMM D")} - ${l.format("MMM D")}`})(n,e,s):p?.label;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(eF.Popover,{open:x,onOpenChange:h,children:[(0,a.jsx)(eF.PopoverTrigger,{render:(0,a.jsxs)(ez.Button,{variant:"outline",size:"sm",className:"gap-2",children:[(0,a.jsx)(eI,{className:"size-4"}),b]})}),(0,a.jsx)(eF.PopoverContent,{align:"start",className:"w-64 p-2",children:(0,a.jsxs)("div",{className:"space-y-1",children:[em.QUICK_SELECT_OPTIONS.map(e=>(0,a.jsx)(ez.Button,{variant:"ghost",className:"w-full justify-start font-normal",onClick:()=>{m(),i((0,ee.default)().format("YYYY-MM-DDTHH:mm")),l((0,ee.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),d({value:e.value,unit:e.unit}),r(!1),h(!1)},children:e.label},e.label)),(0,a.jsx)("div",{className:"my-2 border-t"}),(0,a.jsx)(ez.Button,{variant:"ghost",className:"w-full justify-start font-normal",onClick:()=>r(!n),children:"Custom Range"})]})})]}),n&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(K.Input,{type:"datetime-local",className:"w-auto",value:e,onChange:e=>{l(e.target.value),m()}}),(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"to"}),(0,a.jsx)(K.Input,{type:"datetime-local",className:"w-auto",value:s,onChange:e=>{i(e.target.value),m()}})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Live Tail"}),(0,a.jsx)(eK.Switch,{checked:c,onCheckedChange:u,"aria-label":"Live Tail"})]}),(0,a.jsx)(ez.Button,{variant:"outline",size:"sm",onClick:g,children:"Reset Filters"})]})}function eO({onStop:e}){return(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between rounded-md border border-green-200 bg-green-50 px-4 py-2",children:[(0,a.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,a.jsx)("button",{type:"button",onClick:e,className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]})}var eA=e.i(768371);let eE=e=>{let a=e.links.next;if(!a)return;let t=new URLSearchParams(a.slice(a.indexOf("?")+1)).get("page");return null===t?void 0:Number(t)};var eY=e.i(621482);let eH=(0,e.i(243652).createQueryKeys)("infiniteKeyAliases");var eq=e.i(625901),eR=e.i(744582),eU=e.i(552546),eB=e.i(131792);let eV=e=>""===e?void 0:e;function e$({value:e,onChange:l,teams:s}){let i=(0,t.useMemo)(()=>s.map(e=>({label:e.team_alias||e.team_id,value:e.team_id,sublabel:e.team_id})),[s]);return(0,a.jsx)(z.DataTableFilterField,{label:"Team ID",children:(0,a.jsx)(eU.SearchSelect,{options:i,value:e,onValueChange:e=>l(eV(e)),placeholder:"Search or select a team",emptyText:"No teams found"})})}function eQ({value:e,onChange:l,teamId:s}){let[i,n]=(0,t.useState)(""),{data:r,fetchNextPage:o,hasNextPage:d,isFetchingNextPage:u,isLoading:m}=((e=50,a,t)=>{let{accessToken:l}=(0,c.default)();return(0,eY.useInfiniteQuery)({queryKey:eH.list({filters:{size:e,...a&&{search:a},...t&&{team_id:t}}}),queryFn:async({pageParam:s})=>await (0,w.keyAliasesCall)(l,s,e,a,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let e=new Set;return(r?.pages??[]).flatMap(a=>a.aliases.flatMap(a=>!a||e.has(a)?[]:(e.add(a),[{label:a,value:a}])))},[r]);return(0,a.jsx)(z.DataTableFilterField,{label:"Key Alias",children:(0,a.jsx)(eR.PaginatedSearchSelect,{options:g,value:e,onValueChange:e=>l(eV(e)),onSearchChange:n,onLoadMore:()=>void o(),hasNextPage:d,isLoading:m,isFetchingNextPage:u,placeholder:"Search a key alias",emptyText:"No key aliases found"})})}function eJ({value:e,onChange:l}){let[s,i]=(0,t.useState)(""),{data:n,fetchNextPage:r,hasNextPage:o,isFetchingNextPage:d,isLoading:c}=(0,eq.useInfiniteModelInfo)(50,eV(s)),u=(0,t.useMemo)(()=>{let e=new Set;return(n?.pages??[]).flatMap(a=>a.data.flatMap(a=>{let t=a.model_info?.id??"",l=a.model_name??"";return!t||e.has(t)?[]:(e.add(t),[{label:l||t,value:t,sublabel:`Model ID: ${t}`}])}))},[n]);return(0,a.jsx)(z.DataTableFilterField,{label:"Model",children:(0,a.jsx)(eR.PaginatedSearchSelect,{options:u,value:e,onValueChange:e=>l(eV(e)),onSearchChange:i,onLoadMore:()=>void r(),hasNextPage:o,isLoading:c,isFetchingNextPage:d,placeholder:"Search a model",emptyText:"No models found"})})}function eW({value:e,onChange:l,logsWindow:s}){let[i,n]=(0,t.useState)(""),{data:r,fetchNextPage:o,hasNextPage:d,isFetchingNextPage:u,isLoading:m}=((e,a=50,t)=>{let{accessToken:l}=(0,c.default)(),s={"filter[startTime][gte]":e.start_date,"filter[startTime][lte]":e.end_date,page_size:a,...void 0!==t&&""!==t?{q:t}:{}};return eA.$api.useInfiniteQuery("get","/management/v1/spend_logs/end_users",{params:{query:s}},{pageParamName:"page",initialPageParam:1,getNextPageParam:eE,enabled:!!l})})(s,50,eV(i)),g=(0,t.useMemo)(()=>{let e=new Set;return(r?.pages??[]).flatMap(a=>a.data.flatMap(a=>!a||e.has(a)?[]:(e.add(a),[{label:a,value:a}])))},[r]);return(0,a.jsx)(z.DataTableFilterField,{label:"End User",children:(0,a.jsx)(eR.PaginatedSearchSelect,{options:g,value:e,onValueChange:e=>l(eV(e)),onSearchChange:n,onLoadMore:()=>void o(),hasNextPage:d,isLoading:m,isFetchingNextPage:u,placeholder:"Search an end user",emptyText:"No end users in this time range"})})}function eG({value:e,onChange:l}){let[s,i]=(0,t.useState)(""),n=(0,t.useMemo)(()=>{let e=s.trim(),a=e.toLowerCase(),t=em.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(a));return""===e||em.ERROR_CODE_OPTIONS.some(a=>a.value===e)?t:[...t,{label:`Use custom code: ${e}`,value:e}]},[s]),r=(0,t.useMemo)(()=>""===e?null:em.ERROR_CODE_OPTIONS.find(a=>a.value===e)??{label:e,value:e},[e]),o=(0,t.useMemo)(()=>null===r||n.some(e=>e.value===r.value)?n:[r,...n],[n,r]);return(0,a.jsx)(z.DataTableFilterField,{label:"Error Code",children:(0,a.jsxs)(eB.Combobox,{items:o,value:r,onValueChange:e=>l(eV(e?.value??"")),onInputValueChange:i,isItemEqualToValue:(e,a)=>e.value===a.value,itemToStringLabel:e=>e.label,filter:null,children:[(0,a.jsx)(eB.ComboboxInput,{placeholder:"Select or type an error code",showClear:""!==e,className:"w-full"}),(0,a.jsxs)(eB.ComboboxContent,{children:[(0,a.jsx)(eB.ComboboxEmpty,{children:"No error codes found"}),(0,a.jsx)(eB.ComboboxList,{"data-testid":"error-code-filter-list",children:e=>(0,a.jsx)(eB.ComboboxItem,{value:e,children:e.label},e.value)})]})]})})}function eZ({get:e,set:t,teams:l,logsWindow:s}){let i=a=>{let t;return"string"==typeof(t=e(a))?t:""},n=e=>a=>t(e,a);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e$,{value:i(ep),onChange:n(ep),teams:l}),(0,a.jsx)(z.DataTableFilterField,{label:"Status",children:(0,a.jsxs)(P.Select,{value:""===i(eb)?"all":i(eb),onValueChange:e=>t(eb,null===e||"all"===e?void 0:e),children:[(0,a.jsx)(P.SelectTrigger,{className:"w-full",children:(0,a.jsx)(P.SelectValue,{placeholder:"All Statuses"})}),(0,a.jsxs)(P.SelectContent,{children:[(0,a.jsx)(P.SelectItem,{value:"all",children:"All Statuses"}),(0,a.jsx)(P.SelectItem,{value:"success",children:"Success"}),(0,a.jsx)(P.SelectItem,{value:"failure",children:"Failure"})]})]})}),(0,a.jsx)(eQ,{value:i(ej),onChange:n(ej),teamId:i(ep)}),(0,a.jsx)(eW,{value:i(ef),onChange:n(ef),logsWindow:s}),(0,a.jsx)(eG,{value:i(ey),onChange:n(ey)}),(0,a.jsx)(z.DataTableFilterField,{label:"Error Message",children:(0,a.jsx)(K.Input,{value:i(e_),onChange:e=>t(e_,eV(e.target.value)),placeholder:"Enter error message…"})}),(0,a.jsx)(z.DataTableFilterField,{label:"Key Hash",children:(0,a.jsx)(K.Input,{value:i(ev),onChange:e=>t(ev,eV(e.target.value)),placeholder:"Enter key hash…"})}),(0,a.jsx)(z.DataTableFilterField,{label:"Session ID",children:(0,a.jsx)(K.Input,{value:i(eS),onChange:e=>t(eS,eV(e.target.value)),placeholder:"Enter session ID…"})}),(0,a.jsx)(eJ,{value:i(eC),onChange:n(eC)}),(0,a.jsx)(z.DataTableFilterField,{label:"Public model / search tool",children:(0,a.jsx)(K.Input,{value:i(eT),onChange:e=>t(eT,eV(e.target.value)),placeholder:"Enter public model or search tool…"})})]})}var eX=e.i(581070),e0=e.i(500330),e1=e.i(916925);let e2=({size:e=12})=>(0,a.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-gray-400",children:(0,a.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),e5=({size:e=10})=>(0,a.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:(0,a.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),e4=({size:e=12})=>(0,a.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:[(0,a.jsx)("path",{d:"M12 8V4H8"}),(0,a.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,a.jsx)("path",{d:"M2 14h2"}),(0,a.jsx)("path",{d:"M20 14h2"}),(0,a.jsx)("path",{d:"M15 13v2"}),(0,a.jsx)("path",{d:"M9 13v2"})]}),e6=({count:e})=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,a.jsx)(e2,{}),null!=e?e:"LLM"]}),e7=({count:e})=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,a.jsx)(e5,{}),null!=e?e:"MCP"]}),e3=({count:e})=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,a.jsx)(e4,{}),null!=e?e:"Agent"]}),e8=(e,a)=>{let t=e?.[a];return"string"==typeof t&&""!==t?t:void 0};function e9({value:e}){let t=e??"-";return(0,a.jsx)(eX.CellTooltip,{content:t,trigger:(0,a.jsx)("span",{className:"max-w-[15ch] truncate block",children:t})})}function ae({filtered:e}){return(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,a.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,a.jsx)(I.ScrollText,{className:"size-5 text-muted-foreground"})}),(0,a.jsx)("div",{className:"text-sm font-medium text-foreground",children:e?"No matching requests":"No requests yet"}),(0,a.jsx)("div",{className:"max-w-xs text-center text-sm text-muted-foreground",children:e?"No requests match your filters for this time range.":"Requests proxied through LiteLLM will appear here."})]})}function aa({data:e,rowCount:l,isLoading:s,isRefreshing:i,pagination:n,onPaginationChange:r,sorting:o,onSortingChange:d,columnFilters:c,onColumnFiltersChange:u,searchValue:b,onSearchChange:j,onRefresh:f,onRowClick:y,onKeyHashClick:_,onSessionClick:v,teams:S,logsWindow:C,toolbarChildren:T}){let[N,k]=(0,t.useState)(!1),D=(0,t.useMemo)(()=>(({onKeyHashClick:e,onSessionClick:t})=>[{id:"startTime",accessorKey:"startTime",header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Time",variant:"dropdown-tristate"}),size:200,enableSorting:!0,cell:({row:e})=>(0,a.jsx)(x.DateCell,{value:e.original.startTime})},{id:"type",header:"Type",size:90,enableSorting:!1,meta:{skeleton:"badge"},cell:({row:e})=>{let t=e.original,l=t.session_total_count||1,s=em.MCP_CALL_TYPES.includes(t.call_type),i=em.AGENT_CALL_TYPES.includes(t.call_type),n=t.session_llm_count??(s||i?0:l),r=t.session_agent_count??(i?l:0),o=t.session_mcp_count??(s?l:0);if(s)return(0,a.jsx)(e7,{});if(i&&l<=1)return(0,a.jsx)(e3,{});if(l<=1)return(0,a.jsx)(e6,{});let d=(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,a.jsx)(e2,{}),(0,a.jsx)("span",{children:l}),r>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-blue-300",children:"·"}),(0,a.jsx)(e4,{size:10})]}),o>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-blue-300",children:"·"}),(0,a.jsx)(e5,{})]})]}),c=[n>0&&`${n} LLM`,r>0&&`${r} Agent`,o>0&&`${o} MCP`].filter(Boolean);return(0,a.jsx)(eX.CellTooltip,{content:c.join(" • "),trigger:d})}},{id:"status",header:"Status",size:100,enableSorting:!1,meta:{skeleton:"badge"},cell:({row:e})=>{let t="failure"!==(e8(e.original.metadata,"status")??"Success").toLowerCase();return(0,a.jsx)(A.StatusBadge,{tone:t?"success":"error",label:t?"Success":"Failure"})}},{id:"session_id",accessorKey:"session_id",header:"Session ID",size:120,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.session_id,onClick:t})},{id:"request_id",accessorKey:"request_id",header:"Request ID",enableSorting:!1,cell:({row:e})=>(0,a.jsx)(h.IdCell,{value:e.original.request_id,variant:"plain"})},{id:"spend",accessorKey:"spend",header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Cost",variant:"dropdown-tristate"}),size:110,enableSorting:!0,meta:{numeric:!0,skeleton:"twoLine"},cell:({row:e})=>{let t=e.original,l=t.mcp_tool_call_count||0,s=t.mcp_tool_call_spend||0,i=(t.session_total_count||1)>1,n=i&&null!=t.session_total_spend?t.session_total_spend:t.spend,r=(0,a.jsx)("span",{children:(0,a.jsx)(p.MoneyCell,{value:n,decimals:6})});return(0,a.jsxs)("div",{className:"flex flex-col items-end",children:[n?(0,a.jsx)(eX.CellTooltip,{content:`$${String(n)}`,trigger:r}):r,i&&(0,a.jsx)("span",{className:"text-[10px] text-gray-400",children:"session total"}),l>0&&s>0&&(0,a.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,e0.getSpendString)(s)," from ",l," MCP"]})]})}},{id:"request_duration_ms",accessorKey:"request_duration_ms",header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Duration (s)",variant:"dropdown-tristate"}),enableSorting:!0,meta:{numeric:!0},cell:({row:e})=>{let t=e.original.request_duration_ms;return null==t?(0,a.jsx)("span",{children:"-"}):(0,a.jsx)(eX.CellTooltip,{content:`${t}ms`,trigger:(0,a.jsx)("span",{className:"max-w-[15ch] truncate inline-block",children:(t/1e3).toFixed(2)})})}},{id:"ttft_ms",accessorKey:"completionStartTime",header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"TTFT (s)",variant:"dropdown-tristate"}),enableSorting:!0,meta:{numeric:!0},cell:({row:e})=>{let t=e.original,l=t.completionStartTime;if(!l||l===t.endTime)return(0,a.jsx)("span",{children:"-"});let s=new Date(l).getTime()-new Date(t.startTime).getTime();return s<=0?(0,a.jsx)("span",{children:"-"}):(0,a.jsx)(eX.CellTooltip,{content:`${s}ms`,trigger:(0,a.jsx)("span",{className:"max-w-[15ch] truncate inline-block",children:(s/1e3).toFixed(2)})})}},{id:"team_alias",header:"Team Name",size:150,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(e9,{value:e8(e.original.metadata,"user_api_key_team_alias")})},{id:"key_hash",header:"Key Hash",size:110,enableSorting:!1,cell:({row:t})=>(0,a.jsx)(h.IdCell,{value:e8(t.original.metadata,"user_api_key"),variant:"plain",onClick:e})},{id:"key_alias",header:"Key Alias",size:150,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(e9,{value:e8(e.original.metadata,"user_api_key_alias")})},{id:"model",accessorKey:"model",header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Model",variant:"dropdown-tristate"}),size:200,enableSorting:!0,cell:({row:e})=>{let t=e.original,l=t.custom_llm_provider,s=t.model??"";return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[l&&(0,a.jsx)("img",{src:(e=>{let a=e?.mcp_tool_call_metadata;if("object"!=typeof a||null===a)return;let t=a.mcp_server_logo_url;return"string"==typeof t&&""!==t?t:void 0})(t.metadata)??(l?(0,e1.getProviderLogoAndName)(l).logo:""),alt:"",className:"w-4 h-4",onError:e=>{e.currentTarget.style.display="none"}}),(0,a.jsx)(eX.CellTooltip,{content:s,trigger:(0,a.jsx)("span",{className:"max-w-[15ch] truncate block",children:s})})]})}},{id:"total_tokens",accessorKey:"total_tokens",header:({column:e})=>(0,a.jsx)(g.DataTableSortHeader,{column:e,title:"Tokens",variant:"dropdown-tristate"}),size:140,enableSorting:!0,meta:{numeric:!0},cell:({row:e})=>{let t=e.original;return(0,a.jsxs)("span",{className:"text-sm",children:[String(t.total_tokens||"0"),(0,a.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(t.prompt_tokens||"0"),"+",String(t.completion_tokens||"0"),")"]})]})}},{id:"user",accessorKey:"user",header:"Internal User",size:150,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(e9,{value:e.original.user})},{id:"end_user",accessorKey:"end_user",header:"End User",size:140,enableSorting:!1,cell:({row:e})=>(0,a.jsx)(e9,{value:e.original.end_user})},{id:"request_tags",accessorKey:"request_tags",header:"Tags",size:150,enableSorting:!1,meta:{skeleton:"chips"},cell:({row:e})=>{let t=e.original.request_tags;if(!t||0===Object.keys(t).length)return"-";let l=Object.entries(t),[s,i]=l[0],n=l.length-1;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,a.jsx)(eX.CellTooltip,{content:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:l.map(([e,t])=>(0,a.jsxs)("span",{children:[e,": ",String(t)]},e))}),trigger:(0,a.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[s,": ",String(i),n>0&&` +${n}`]})})})}}])({onKeyHashClick:_,onSessionClick:v}),[_,v]),M=c.length>0||""!==b;return(0,a.jsx)(m.DataTable,{data:e,columns:D,getRowId:e=>e.request_id,sortingMode:"server",sorting:o,onSortingChange:d,paginationMode:"server",pagination:n,onPaginationChange:r,rowCount:l,filterMode:"server",columnFilters:c,onColumnFiltersChange:u,isLoading:s,loadingMessage:"Loading request logs…",noDataMessage:(0,a.jsx)(ae,{filtered:M}),size:"compact",onRowClick:y,toolbar:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F.DataTableToolbar,{table:e,searchValue:b,onSearchChange:j,searchPlaceholder:"Search by Request ID",onRefresh:f,isRefreshing:i,onOpenFilters:()=>k(!0),filterLabels:ek,showViewOptions:!1,children:T}),(0,a.jsx)(z.DataTableFilterDrawer,{table:e,open:N,onOpenChange:k,title:"Filters",description:"Narrow down request logs",children:({get:e,set:t})=>(0,a.jsx)(eZ,{get:e,set:t,teams:S,logsWindow:C})})]})})}let at={value:24,unit:"hours"};function al({accessToken:e,token:l,userRole:s,userID:i,isActive:n}){let[r,o]=(0,t.useState)({pageIndex:0,pageSize:50}),[d,c]=(0,t.useState)(eM),[u,m]=(0,t.useState)([]),[g,x]=(0,t.useState)((0,ee.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[h,p]=(0,t.useState)((0,ee.default)().format("YYYY-MM-DDTHH:mm")),[b,j]=(0,t.useState)(!1),[f,y]=(0,t.useState)(at),[_,v]=(0,t.useState)(null),[S,C]=(0,t.useState)(null),[T,N]=(0,t.useState)(!1),[k,L]=(0,t.useState)(null),[I,z]=(0,t.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,t.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(I))},[I]);let F=ec.internalUserRoles.includes(s),{logsQuery:K,filteredLogs:P,allTeams:O}=function({accessToken:e,token:a,userRole:t,userID:l,columnFilters:s,filterByCurrentUser:i,activeTab:n,isLiveTail:r,startTime:o,endTime:d,pagination:c,isCustomDate:u,sorting:m}){let g,x=c.pageSize||ex.defaultPageSize,h=m[0]??eM[0],p=Object.hasOwn(eh,h.id)?h.id:"startTime",b=h.desc?"desc":"asc",j={queryKey:["logs","table",c.pageIndex,x,o,d,u,s,i?l:null,p,b],queryFn:async()=>{if(!e||!a||!t||!l)return{data:[],total:0,page:1,page_size:x,total_pages:0};let n=eD(o,d,u),r=eL(s,"user_id");return await (0,w.uiSpendLogsCall)({accessToken:e,start_date:n.start_date,end_date:n.end_date,page:c.pageIndex+1,page_size:x,params:{api_key:eL(s,ev),team_id:eL(s,ep),request_id:eL(s,eN),session_id:eL(s,eS),user_id:r??(i?l??void 0:void 0),end_user:eL(s,ef),status_filter:eL(s,eb),model_id:eL(s,eC),model:eL(s,eT),key_alias:eL(s,ej),error_code:eL(s,ey),error_message:eL(s,e_),sort_by:p,sort_order:b}})},enabled:!!e&&!!a&&!!t&&!!l&&"request logs"===n,refetchInterval:(g=c.pageIndex,!!r&&0===g&&15e3),placeholderData:M.keepPreviousData,refetchIntervalInBackground:!1},f=(0,D.useQuery)(j),y=f.data??{data:[],total:0,page:1,page_size:x,total_pages:0},{data:_}=(0,D.useQuery)({queryKey:["allTeamsForLogFilters",e],queryFn:async()=>e&&await eg(e)||[],enabled:!!e});return{logsQuery:f,filteredLogs:y,allTeams:_}}({accessToken:e,token:l,userRole:s,userID:i,columnFilters:u,filterByCurrentUser:F,activeTab:n?"request logs":"inactive",isLiveTail:I,startTime:g,endTime:h,pagination:r,isCustomDate:b,sorting:d}),A=(Math.floor((K.dataUpdatedAt||Date.parse(h))/6e4)+1)*6e4,E=(0,t.useMemo)(()=>eD(g,h,b,A),[g,h,b,A]),{data:Y}=(0,D.useQuery)({queryKey:["requestLogsKeyInfo",_,e],queryFn:async()=>null===_?null:{...(await (0,w.keyInfoV1Call)(e,_)).info,token:_,api_key:_},enabled:null!==_}),H=(0,t.useMemo)(()=>{let e=P.data,a=e.reduce((e,a)=>(a.session_id&&(e[a.session_id]||(e[a.session_id]={llm:0,agent:0,mcp:0}),em.MCP_CALL_TYPES.includes(a.call_type)?e[a.session_id].mcp+=1:em.AGENT_CALL_TYPES.includes(a.call_type)?e[a.session_id].agent+=1:e[a.session_id].llm+=1),e),{}),t=new Map;for(let a of e){if(!a.session_id||1>=(a.session_total_count||1))continue;let e=em.MCP_CALL_TYPES.includes(a.call_type),l=t.get(a.session_id);l&&(!l.isMcp||e)||t.set(a.session_id,{requestId:a.request_id,isMcp:e})}return e.map(e=>{let t=e.session_id?a[e.session_id]:void 0;return{...e,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||t.get(e.session_id)?.requestId===e.request_id)},[P.data]),q=(0,t.useMemo)(()=>{let e=u.find(e=>e.id===eN);return"string"==typeof e?.value?e.value:""},[u]),R=(0,t.useCallback)(e=>{m(a=>{let t=a.filter(e=>e.id!==eN);return""===e?t:[...t,{id:eN,value:e}]}),o(e=>({...e,pageIndex:0}))},[]),U=(0,t.useCallback)(e=>{c(e),o(e=>({...e,pageIndex:0}))},[]),B=(0,t.useCallback)(e=>{m(e),o(e=>({...e,pageIndex:0}))},[]),V=(0,t.useCallback)(()=>{o(e=>({...e,pageIndex:0}))},[]),$=(0,t.useCallback)(()=>{m([]),x((0,ee.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),p((0,ee.default)().format("YYYY-MM-DDTHH:mm")),j(!1),y(at),V()},[V]),Q=(0,t.useCallback)(e=>{L(void 0!==e.session_id&&(e.session_total_count||1)>1?e.session_id??null:null),C(e),N(!0)},[]),J=(0,t.useCallback)(e=>{if(!e)return;let a=H.find(a=>a.session_id===e)??null;L(e),C(a),N(!0)},[H]),W=(0,t.useCallback)(e=>{v(e)},[]);return Y&&_&&Y.api_key===_?(0,a.jsx)(eu.default,{keyId:_,keyData:Y,teams:O??[],onClose:()=>v(null),backButtonText:"Back to Logs"}):(0,a.jsxs)(ed.AutoRouterModelGroupsProvider,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),I&&0===r.pageIndex&&(0,a.jsx)(eO,{onStop:()=>z(!1)}),(0,a.jsx)(aa,{data:H,rowCount:P.total,isLoading:K.isLoading,isRefreshing:K.isFetching,pagination:r,onPaginationChange:o,sorting:d,onSortingChange:U,columnFilters:u,onColumnFiltersChange:B,searchValue:q,onSearchChange:R,onRefresh:()=>void K.refetch(),onRowClick:Q,onKeyHashClick:W,onSessionClick:J,teams:O??[],logsWindow:E,toolbarChildren:(0,a.jsx)(eP,{startTime:g,onStartTimeChange:x,endTime:h,onEndTimeChange:p,isCustomDate:b,onIsCustomDateChange:j,selectedTimeInterval:f,onSelectedTimeIntervalChange:y,isLiveTail:I,onIsLiveTailChange:z,onResetToFirstPage:V,onResetFilters:$})}),(0,a.jsx)(ew.LogDetailsDrawer,{open:T,onClose:()=>{N(!1),L(null)},logEntry:S,sessionId:k,accessToken:e,allLogs:H,onSelectLog:C,startTime:(0,ee.default)(g).utc().format("YYYY-MM-DD HH:mm:ss")})]})}var as=e.i(482725),ai=e.i(56456);function an({size:e,fontSize:t}){let l=(0,a.jsx)(ai.LoadingOutlined,{style:t?{fontSize:t}:void 0,spin:!0});return(0,a.jsx)(as.Spin,{indicator:l,size:e})}function ar({accessToken:e,token:o,userRole:d,userID:c,premiumUser:u}){let[m,g]=(0,t.useState)("request logs");return e&&o&&d&&c?(0,a.jsx)("div",{className:"w-full p-6 overflow-x-hidden box-border",children:(0,a.jsxs)(s.TabGroup,{defaultIndex:0,onIndexChange:e=>g(0===e?"request logs":"audit logs"),children:[(0,a.jsxs)(i.TabList,{children:[(0,a.jsx)(l.Tab,{children:"Request Logs"}),(0,a.jsx)(l.Tab,{children:"Audit Logs"}),(0,a.jsx)(l.Tab,{children:"Deleted Keys"}),(0,a.jsx)(l.Tab,{children:"Deleted Teams"})]}),(0,a.jsxs)(r.TabPanels,{children:[(0,a.jsx)(n.TabPanel,{children:(0,a.jsx)(al,{accessToken:e,token:o,userRole:d,userID:c,isActive:"request logs"===m})}),(0,a.jsx)(n.TabPanel,{children:(0,a.jsx)(eo,{userID:c,userRole:d,token:o,accessToken:e,isActive:"audit logs"===m,premiumUser:u})}),(0,a.jsx)(n.TabPanel,{children:(0,a.jsx)(_,{})}),(0,a.jsx)(n.TabPanel,{children:(0,a.jsx)(k,{})})]})]})}):(0,a.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,a.jsx)(an,{size:"large"})})}e.s(["default",0,function(){let{accessToken:e,userRole:t,userId:l,token:s,premiumUser:i}=(0,c.default)();return(0,a.jsx)(ar,{userID:l,userRole:t,token:s,accessToken:e,premiumUser:i})}],799062)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/058j9m4b8p4wx.js b/litellm/proxy/_experimental/out/_next/static/chunks/058j9m4b8p4wx.js
deleted file mode 100644
index 361fcf6e3e1..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/058j9m4b8p4wx.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,677572,370359,405934,e=>{"use strict";var t,r,n,a=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var i=e.i(271645),s=e.i(951437),l=e.i(146376),o=e.i(667865),u=e.i(552245),c=e.i(53687),d=e.i(733332);let f=i.createContext(void 0);function h(){let e=i.useContext(f);if(void 0===e)throw Error((0,d.default)(64));return e}let p=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),m={tabActivationDirection:e=>({[p.activationDirection]:e})};var g=e.i(675606),x=e.i(56434);let v=i.forwardRef(function(e,t){let{className:r,defaultValue:n=0,onValueChange:d,orientation:h="horizontal",render:p,value:v,style:y,..._}=e,w=void 0!==e.defaultValue,S=i.useRef([]),[C,N]=i.useState(()=>new Map),[T,A]=(0,s.useControlled)({controlled:v,default:n,name:"Tabs",state:"value"}),E=void 0!==v,[j,O]=i.useState(()=>new Map),R=i.useRef(void 0),k=i.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of j.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[j]),[I,M]=i.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:P}=I,U=P,H=!1;L!==T&&(U=b(L,T,h,j),H=null!=L&&null!=T&&null==k(T));let D=H?L:T,z=L!==D||P!==U;(0,l.useIsoLayoutEffect)(()=>{z&&M({previousValue:D,tabActivationDirection:U})},[D,z,U]);let W=(0,o.useStableCallback)((e,t)=>{t.activationDirection=b(T,e,h,j),d?.(e,t),t.isCanceled||A(e)}),B=(0,o.useStableCallback)((e,t)=>{d?.(e,(0,g.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,o.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let n=new Map(r);return n.set(e,t),n})}),F=(0,o.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let n=new Map(r);return n.delete(e),n})}),K=i.useCallback(e=>C.get(e),[C]),$=i.useCallback(e=>{for(let t of j.values())if(e===t?.value)return t?.id},[j]),Y=i.useMemo(()=>({getTabElementBySelectedValue:k,getTabIdByPanelValue:$,getTabPanelIdByValue:K,onValueChange:W,orientation:h,registerMountedTabPanel:V,setTabMap:O,unregisterMountedTabPanel:F,tabActivationDirection:U,value:T}),[k,$,K,W,h,V,O,F,U,T]),G=i.useMemo(()=>{for(let e of j.values())if(null!=e&&e.value===T)return e},[j,T]),J=i.useMemo(()=>{for(let e of j.values())if(null!=e&&!e.disabled)return e.value},[j]),X=i.useRef(!w),q=i.useRef(n),Z=i.useRef(w),Q=i.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(E)return;function e(e,t){A(e),M(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),X.current=!1}if(0===j.size){Q.current&&null!==T&&!R.current?.isConnected&&e(null,x.REASONS.missing);return}Q.current=!0,R.current=j.keys().next().value;let t=G?.disabled,r=null==G&&null!==T;if(t||T!==q.current||(Z.current=!1),Z.current&&t&&T===q.current)return;let n=X.current;if(t||r){let r=J??null;if(T===r){X.current=!1;return}let a=x.REASONS.missing;n?a=x.REASONS.initial:t&&(a=x.REASONS.disabled),e(r,a);return}n&&null!=G&&(B(T,x.REASONS.initial),X.current=!1)},[J,E,B,G,A,j,T]);let ee={orientation:h,tabActivationDirection:U},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:_,stateAttributesMapping:m});return(0,a.jsx)(f.Provider,{value:Y,children:(0,a.jsx)(c.CompositeList,{elementsRef:S,children:et})})});function b(e,t,r,n){if(null==e||null==t)return"none";let a=null,i=null;for(let[r,s]of n.entries()){if(null==s)continue;let n=s.value??s.index;if(e===n&&(a=r),t===n&&(i=r),null!=a&&null!=i)break}if(null==a||null==i)return a!==i&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let s=a.getBoundingClientRect(),l=i.getBoundingClientRect();if("horizontal"===r){if(l.lefts.left)return"right"}else{if(l.tops.top)return"down"}return"none"}var y=e.i(108868),_=e.i(788015),w=e.i(540886);let S="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,S],370359);var C=e.i(395530);let N=i.createContext(void 0);function T(){let e=i.useContext(N);if(void 0===e)throw Error((0,d.default)(65));return e}var A=e.i(647554);let E=i.forwardRef(function(e,t){let{className:r,disabled:n=!1,render:a,value:s,id:o,nativeButton:c=!0,style:d,...f}=e,{value:p,getTabPanelIdByValue:v,orientation:b,tabActivationDirection:N}=h(),{activateOnFocus:E,highlightedTabIndex:j,onTabActivation:O,registerTabResizeObserverElement:R,setHighlightedTabIndex:k,tabsListElement:I}=T(),M=(0,_.useBaseUiId)(o),L=i.useMemo(()=>({disabled:n,id:M,value:s}),[n,M,s]),{compositeProps:P,compositeRef:U,index:H}=(0,C.useCompositeItem)({metadata:L}),D=s===p,z=i.useRef(!1),W=i.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=W.current;if(e)return R(e)},[R]),(0,l.useIsoLayoutEffect)(()=>{if(z.current){z.current=!1;return}if(D&&H>-1&&j!==H){if(null!=I){let e=(0,A.activeElement)((0,y.ownerDocument)(I));if(e&&(0,A.contains)(I,e))return}n||k(H)}},[D,H,j,k,n,I]);let{getButtonProps:B,buttonRef:V}=(0,w.useButton)({disabled:n,native:c,focusableWhenDisabled:!0}),F=v(s),K=i.useRef(!1),$=i.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:n,active:D,orientation:b,tabActivationDirection:N},ref:[t,V,U,W],props:[P,{role:"tab","aria-controls":F,"aria-selected":D,id:M,onClick:function(e){D||n||O(s,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){D||(H>-1&&!n&&k(H),!n&&E&&(!K.current||K.current&&$.current)&&O(s,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){D||n||(K.current=!0,e.button&&0!==e.button||($.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){K.current=!1,$.current=!1},{once:!0})))},[S]:D?"":void 0,onKeyDownCapture(){z.current=!0}},f,B],stateAttributesMapping:m})});var j=e.i(73364),O=e.i(802239),R=e.i(956789);function k(){return R.NOOP}function I(){return!1}function M(){return!0}let L=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var P=e.i(172410);let U={...m,activeTabPosition:()=>null,activeTabSize:()=>null},H=i.forwardRef(function(e,t){let{className:r,render:n,renderBeforeHydration:s=!1,style:l,...o}=e,{nonce:c}=(0,P.useCSPContext)(),{getTabElementBySelectedValue:d,orientation:f,tabActivationDirection:p,value:m}=h(),{tabsListElement:g,registerIndicatorUpdateListener:x}=T(),v=(0,O.useSyncExternalStore)(k,I,M),b=function(){let[,e]=i.useState({});return i.useCallback(()=>{e({})},[])}();i.useEffect(()=>x(b),[x,b]);let y=0,_=0,w=0,S=0,C=0,N=0,A=!1;if(null!=m&&null!=g){let e=d(m);if(null!=e){A=!0;let{width:t,height:r}=(0,j.getCssDimensions)(e),{width:n,height:a}=(0,j.getCssDimensions)(g),i=e.getBoundingClientRect(),s=g.getBoundingClientRect(),l=n>0?s.width/n:1,o=a>0?s.height/a:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=i.left-s.left,t=i.top-s.top;y=e/l+g.scrollLeft-g.clientLeft,w=t/o+g.scrollTop-g.clientTop}else y=e.offsetLeft,w=e.offsetTop;C=t,N=r,_=g.scrollWidth-y-C,S=g.scrollHeight-w-N}}let E=A?{left:y,right:_,top:w,bottom:S}:null,R=A?{width:C,height:N}:null,H=A?{[L.activeTabLeft]:`${y}px`,[L.activeTabRight]:`${_}px`,[L.activeTabTop]:`${w}px`,[L.activeTabBottom]:`${S}px`,[L.activeTabWidth]:`${C}px`,[L.activeTabHeight]:`${N}px`}:void 0,D=A&&C>0&&N>0,z=(0,u.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:E,activeTabSize:R,tabActivationDirection:p},ref:t,props:[{role:"presentation",style:H,hidden:!D},o,{suppressHydrationWarning:!0}],stateAttributesMapping:U});return null==m?null:(0,a.jsxs)(i.Fragment,{children:[z,v&&s&&(0,a.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var D=e.i(144394),z=e.i(209407),W=e.i(137584),B=e.i(223910),V=e.i(673553);let F=((n={}).index="data-index",n.activationDirection="data-activation-direction",n.orientation="data-orientation",n.hidden="data-hidden",n[n.startingStyle=z.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=z.TransitionStatusDataAttributes.endingStyle]="endingStyle",n),K={...m,...z.transitionStatusMapping},$=i.forwardRef(function(e,t){let{className:r,value:n,render:a,keepMounted:s=!1,style:o,...c}=e,{value:d,getTabIdByPanelValue:f,orientation:p,tabActivationDirection:m,registerMountedTabPanel:g,unregisterMountedTabPanel:x}=h(),v=(0,_.useBaseUiId)(),b=i.useMemo(()=>({id:v,value:n}),[v,n]),{ref:y,index:w}=(0,V.useCompositeListItem)({metadata:b}),S=n===d,{mounted:C,transitionStatus:N,setMounted:T}=(0,B.useTransitionStatus)(S),A=!C,E=f(n),j=i.useRef(null),O=(0,u.useRenderElement)("div",e,{state:{hidden:A,orientation:p,tabActivationDirection:m,transitionStatus:N},ref:[t,y,j],props:[{"aria-labelledby":E,hidden:A,id:v,role:"tabpanel",tabIndex:S?0:-1,inert:(0,D.inertValue)(!S),[F.index]:w},c],stateAttributesMapping:K});return((0,W.useOpenChangeComplete)({open:S,ref:j,onComplete(){S||T(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!A||s)&&null!=v)return g(n,v),()=>{x(n,v)}},[A,s,n,v,g,x]),s||C)?O:null});var Y=e.i(590803),G=e.i(828918),J=e.i(673327),X=e.i(621082);let q=[];var Z=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:r,style:n,refs:s=R.EMPTY_ARRAY,props:d=R.EMPTY_ARRAY,state:f=R.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:p,onHighlightedIndexChange:m,orientation:g,grid:x,loopFocus:v,onLoop:b,enableHomeAndEndKeys:y,onMapChange:_,stopEventPropagation:w=!0,rootRef:C,disabledIndices:N,modifierKeys:T,highlightItemOnHover:E=!1,tag:j="div",...O}=e,{props:k,highlightedIndex:I,onHighlightedIndexChange:M,elementsRef:L,onMapChange:P,relayKeyboardEvent:U}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:n,onLoop:a,direction:s,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:p,modifierKeys:m=q}=e,[g,x]=i.useState(0),v=null!=n,b=i.useRef(null),y=(0,G.useMergedRefs)(b,d),_=i.useRef([]),w=i.useRef(!1),C=u??g,N=(0,o.useStableCallback)((e,t=!1)=>{if((c??x)(e),t){let t=_.current[e];(0,J.scrollIntoViewIfNeeded)(b.current,t,s,r)}}),T=(0,o.useStableCallback)(e=>{if(0===e.size||w.current)return;w.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(S))??null,a=n?t.indexOf(n):-1;if(-1!==a)N(a);else if((0,X.isListIndexDisabled)(t,C,p)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:p});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,J.scrollIntoViewIfNeeded)(b.current,n,s,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==p||null!=u||!w.current)return;let e=_.current;if((0,X.isListIndexDisabled)(e,C,p)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:p});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[p,u,C,_,N]);let E=(0,o.useStableCallback)((e,t,r)=>a?a(e,t,r,_):r),j=(0,o.useStableCallback)(e=>{let i=f?J.COMPOSITE_KEYS:J.ARROW_KEYS;if(!i.has(e.key)||function(e,t){for(let r of J.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,m)||!b.current)return;let l="rtl"===s,o=l?J.ARROW_LEFT:J.ARROW_RIGHT,u={horizontal:o,vertical:J.ARROW_DOWN,both:o}[r],c=l?J.ARROW_RIGHT:J.ARROW_LEFT,d={horizontal:c,vertical:J.ARROW_UP,both:c}[r],g=(0,A.getTarget)(e.nativeEvent);if(null!=g&&(0,J.isNativeInput)(g)&&!(0,Y.isElementDisabled)(g)){let t=g.selectionStart,r=g.selectionEnd,n=g.value??"";if(null==t||e.shiftKey||t!==r||e.key!==d&&t0)return}let x=C,y=(0,X.getMinListIndex)(_,p),w=(0,X.getMaxListIndex)(_,p);null!=n&&(x=n({disabledIndices:p,elementsRef:_,event:e,highlightedIndex:C,loopFocus:t,maxIndex:w,minIndex:y,onLoop:E,orientation:r,rtl:l}));let S={horizontal:[o],vertical:[J.ARROW_DOWN],both:[o,J.ARROW_DOWN]}[r],T={horizontal:[c],vertical:[J.ARROW_UP],both:[c,J.ARROW_UP]}[r],j=v?i:({horizontal:f?J.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:J.HORIZONTAL_KEYS,vertical:f?J.VERTICAL_KEYS_WITH_EXTRA_KEYS:J.VERTICAL_KEYS,both:i})[r];f&&(e.key===J.HOME?x=y:e.key===J.END&&(x=w)),x===C&&(S.includes(e.key)||T.includes(e.key))&&(t&&x===w&&S.includes(e.key)?(x=y,a&&(x=a(e,C,x,_))):t&&x===y&&T.includes(e.key)?(x=w,a&&(x=a(e,C,x,_))):x=(0,X.findNonDisabledListIndex)(_.current,{startingIndex:x,decrement:T.includes(e.key),disabledIndices:p})),x===C||(0,X.isIndexOutOfListBounds)(_.current,x)||(h&&e.stopPropagation(),j.has(e.key)&&e.preventDefault(),N(x,!0),queueMicrotask(()=>{_.current[x]?.focus()}))});return{props:{ref:y,onFocus(e){let t=b.current,r=(0,A.getTarget)(e.nativeEvent);t&&null!=r&&(0,J.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:j},highlightedIndex:C,onHighlightedIndexChange:N,elementsRef:_,disabledIndices:p,onMapChange:T,relayKeyboardEvent:j}}({grid:x,loopFocus:v,onLoop:b,orientation:g,highlightedIndex:p,onHighlightedIndexChange:m,rootRef:C,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:(0,Q.useDirection)(),disabledIndices:N,modifierKeys:T}),H=(0,u.useRenderElement)(j,e,{state:f,ref:s,props:[k,...d,O],stateAttributesMapping:h}),D=i.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:M,highlightItemOnHover:E,relayKeyboardEvent:U}),[I,M,E,U]);return(0,a.jsx)(Z.CompositeRootContext.Provider,{value:D,children:(0,a.jsx)(c.CompositeList,{elementsRef:L,onMapChange:e=>{_?.(e),P(e)},children:H})})}e.s(["CompositeRoot",0,ee],405934);let et=i.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:n,loopFocus:s=!0,render:u,style:c,...d}=e,{onValueChange:f,orientation:p,value:g,setTabMap:x,tabActivationDirection:v}=h(),[b,y]=i.useState(0),[_,w]=i.useState(null),S=i.useRef(new Set),C=i.useRef(new Set),T=i.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{S.current.forEach(e=>{e()})});return T.current=e,_&&e.observe(_),C.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[_]);let A=(0,o.useStableCallback)(e=>(S.current.add(e),()=>{S.current.delete(e)})),E=(0,o.useStableCallback)(e=>(C.current.add(e),T.current?.observe(e),()=>{C.current.delete(e),T.current?.unobserve(e)})),j=(0,o.useStableCallback)((e,t)=>{e!==g&&f(e,t)}),O=i.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,registerIndicatorUpdateListener:A,registerTabResizeObserverElement:E,onTabActivation:j,setHighlightedTabIndex:y,tabsListElement:_}),[r,b,A,E,j,y,_]);return(0,a.jsx)(N.Provider,{value:O,children:(0,a.jsx)(ee,{render:u,className:n,style:c,state:{orientation:p,tabActivationDirection:v},refs:[t,w],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},d],stateAttributesMapping:m,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:s,orientation:p,onHighlightedIndexChange:y,onMapChange:x,disabledIndices:R.EMPTY_ARRAY})})});e.s(["Indicator",0,H,"List",0,et,"Panel",0,$,"Root",0,v,"Tab",0,E],69281);var er=e.i(69281),er=er,en=e.i(115504);let ea=(0,en.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,a.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,en.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,a.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,en.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,a.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,en.cn)(ea({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,a.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,en.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},195116,e=>{"use strict";let t=(0,e.i(475254).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,t],195116)},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},292335,122520,165615,779129,280024,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",OAUTH2_TOKEN_EXCHANGE:"oauth2_token_exchange",AWS_SIGV4:"aws_sigv4",TRUE_PASSTHROUGH:"true_passthrough",OAUTH_DELEGATE:"oauth_delegate"},r=e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE,n={INTERACTIVE:"interactive",M2M:"m2m"},a=e=>{let t=e.credentials??{};return JSON.stringify({url:"string"==typeof e.url?e.url:null,spec_path:"string"==typeof e.spec_path?e.spec_path:null,auth_type:e.auth_type??null,oauth_flow_type:e.oauth_flow_type??null,client_id:t.client_id??null,client_secret:t.client_secret??null,scopes:t.scopes??null,upstream_resource:t.upstream_resource??null,issuer:e.issuer??null,authorization_url:e.authorization_url??null,token_url:e.token_url??null,registration_url:e.registration_url??null})},i=["client_id","client_secret"],s=["upstream_resource"],l=["access_token","refresh_token","expires_in","scope"],o=(e,t)=>{if(!e)return;let r=Object.fromEntries(t.filter(t=>"string"==typeof e[t]&&""!==e[t]).map(t=>[t,e[t]]));return Object.keys(r).length>0?r:void 0},u="client_credentials",c={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};e.s(["ADMIN_CONFIG_CREDENTIAL_KEYS",0,s,"AUTH_TYPE",0,t,"CLEARED_ON_INVALIDATION",0,["credentials"],"MCP_OAUTH2_FLOW_INTERACTIVE",0,"authorization_code","MCP_OAUTH2_FLOW_M2M",0,u,"OAUTH_FLOW",0,n,"TRANSPORT",0,c,"credentialAuthClass",0,e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE?"client_forwarded":e??null,"gatewayMintsClientFor",0,e=>e.auth_type===t.TRUE_PASSTHROUGH||e.auth_type===t.OAUTH_DELEGATE&&!e.dcr_bridge,"getMcpOAuthMode",0,function(e){return e.auth_type===t.OAUTH2_TOKEN_EXCHANGE?"token_exchange":e.auth_type!==t.OAUTH2?null:e.oauth2_flow===u?"m2m":e.delegate_auth_to_upstream?"passthrough":"authorization_code"},"getOAuthAuthorizationIdentity",0,a,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?c.SSE:t&&e!==c.STDIO?c.OPENAPI:e,"isClientForwardedTokenMode",0,r,"isHeldOAuthTokenStale",0,(e,t)=>void 0!==t&&a(e)!==t,"isUnsupportedOnGatewayConnect",0,e=>r(e)||e===t.OAUTH2_TOKEN_EXCHANGE,"oauth2FlowToFormValue",0,function(e){return e===u?n.M2M:e?n.INTERACTIVE:void 0},"preservedAdminCredentials",0,e=>o(e,[...i,...s]),"preservedDeclaredAppCredentials",0,e=>o(e,i),"withoutMintedTokenCredentials",0,e=>{if(!e)return;let t=Object.fromEntries(Object.entries(e).filter(([e])=>!l.includes(e)));return Object.keys(t).length>0?t:void 0}],292335);var d=e.i(271645),f=e.i(602869),h=e.i(727749);function p(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["extractErrorMessage",0,p],122520);let m=e=>{let t=new Uint8Array(e),r="";return t.forEach(e=>r+=String.fromCharCode(e)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},g=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),m(e.buffer)},x=async e=>{let t=new TextEncoder().encode(e);return m(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,x,"generateCodeVerifier",0,g],165615);var v=e.i(434166);let b=()=>{{let e=window.location.pathname||"",t=e.indexOf("/ui"),r=t>=0?e.slice(0,t+3).replace(/\/+$/,""):"";return`${window.location.origin}${r}/mcp/oauth/callback`}},y=(...e)=>{e.forEach(e=>{try{window.sessionStorage.removeItem(e)}catch(e){}})};e.s(["TOOLS_OAUTH_UI_STATE_KEY",0,"litellm-mcp-oauth-tools-state","buildCallbackUrl",0,b,"clearStorage",0,y],779129);let _="litellm-user-mcp-oauth-flow-state",w="litellm-user-mcp-oauth-result",S=(e,t)=>{(0,v.setSecureItem)(e,t)},C=e=>(0,v.getSecureItem)(e);e.s(["useUserMcpOAuthFlow",0,({accessToken:e,serverId:t,serverAlias:r,scopes:n,clientId:a,onSuccess:i})=>{let[s,l]=(0,d.useState)("idle"),[o,u]=(0,d.useState)(null),c=(0,d.useRef)(!1),m=(0,d.useCallback)(async()=>{try{let i;l("authorizing"),u(null);let s=a??void 0;if(!s)try{let n=await (0,f.registerMcpOAuthClient)(e,t,{client_name:r||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"});s=n?.client_id,i=n?.client_secret}catch(e){}let o=g(),c=await x(o),d=crypto.randomUUID(),h=b(),p=n?.filter(e=>e.trim()).join(" "),m=(0,f.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:s,redirectUri:h,state:d,codeChallenge:c,scope:p}),v={state:d,codeVerifier:o,serverId:t,redirectUri:h,clientId:s,clientSecret:i,scopes:n};S(_,JSON.stringify(v));let y=new URL(window.location.href);y.searchParams.set("mcpOauthReturn","apps"),S("litellm-mcp-oauth-return-url",y.toString()),window.location.href=m}catch(t){let e=p(t);u(e),l("error"),h.default.error(e)}},[e,t,r,n,a]),v=(0,d.useCallback)(async()=>{if(c.current)return;let r=C(w);if(!r)return;let n=C(_);if(!n)return;try{let e=JSON.parse(n);if(e.serverId&&e.serverId!==t)return}catch(e){}c.current=!0,y(w);let a=null,s=null;try{a=JSON.parse(r);let e=C(_);s=e?JSON.parse(e):null}catch(e){u("Failed to resume OAuth flow. Please retry."),l("error"),c.current=!1,y(_);return}try{if(!s?.state||!s.codeVerifier||!s.serverId)throw Error("OAuth session state was lost. Please retry.");if(!a?.state||a.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(a.error)throw Error(a.error_description||a.error);if(!a.code)throw Error("Authorization code missing in callback.");l("exchanging");let t=await (0,f.exchangeMcpOAuthToken)({serverId:s.serverId,code:a.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri,accessToken:e});await (0,f.storeMCPOAuthUserCredential)(e,s.serverId,{access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,scopes:s.scopes}),l("success"),u(null),h.default.success("Connected successfully"),i()}catch(t){let e=p(t);u(e),l("error"),h.default.error(e)}finally{y(_),setTimeout(()=>{c.current=!1},1e3)}},[e,t,i]);return(0,d.useEffect)(()=>{v()},[v]),{startOAuthFlow:m,status:s,error:o}}],280024)},269638,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",0,t],269638)},21040,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(266027),a=e.i(555436),i=e.i(871689),s=e.i(463059),l=e.i(195116),o=e.i(269638),u=e.i(531278),c=e.i(519455),d=e.i(793479),f=e.i(302747),h=e.i(677572),p=e.i(602869),m=e.i(292335),g=e.i(174553),x=e.i(888259),v=e.i(280024);let b=({server:e,accessToken:n,onConnect:a,variant:i="badge"})=>{let s=e.server_name??e.alias??e.server_id,{startOAuthFlow:l,status:o}=(0,v.useUserMcpOAuthFlow)({accessToken:n,serverId:e.server_id,serverAlias:s,onSuccess:(0,r.useCallback)(()=>a(e.server_id),[a,e.server_id])}),d="authorizing"===o||"exchanging"===o;return"button"===i?(0,t.jsxs)(c.Button,{onClick:l,disabled:d,className:"font-semibold h-[38px] min-w-[110px]",children:[d&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),d?"Connecting…":"Connect"]}):(0,t.jsx)("span",{onClick:e=>{e.stopPropagation(),d||l()},className:`text-[11px] font-semibold rounded-md px-2 py-0.5 shrink-0 whitespace-nowrap ${d?"text-muted-foreground bg-muted cursor-default":"text-primary-foreground bg-primary cursor-pointer hover:bg-primary/90"}`,children:d?"Connecting…":"Connect"})},y=["#1677ff","#52c41a","#fa8c16","#eb2f96","#722ed1","#13c2c2","#fa541c","#2f54eb","#a0d911","#faad14"];function _(e){let t=0;for(let r=0;r{let[S,C]=(0,r.useState)([]),[N,T]=(0,r.useState)(!0),[A,E]=(0,r.useState)(""),[j,O]=(0,r.useState)("all"),[R,k]=(0,r.useState)(new Set),[I,M]=(0,r.useState)(null),[L,P]=(0,r.useState)({}),[U,H]=(0,r.useState)(!1),[D,z]=(0,r.useState)(new Set),[W,B]=(0,r.useState)(new Set),V=(0,r.useRef)([]);(0,r.useEffect)(()=>{V.current=S},[S]);let F=(0,r.useRef)(v);(0,r.useEffect)(()=>{F.current=v},[v]);let K=(0,r.useRef)(y);(0,r.useEffect)(()=>{K.current=y},[y]);let $=e=>e.server_name??e.alias??e.server_id,Y=(0,r.useRef)(!1),G=(0,r.useCallback)(async t=>{try{let r=await (0,p.listMCPTools)(e,t.server_id);if(Y.current)return;let n=Array.isArray(r?.tools)?r.tools:[];P(e=>({...e,[$(t)]:n.length}))}catch{}},[e]),J=(0,r.useCallback)(async t=>{try{let r=await (0,p.getMCPOAuthUserCredentialStatus)(e,t.server_id);if(Y.current)return;r.has_credential&&!r.is_expired&&z(e=>new Set(e).add(t.server_id))}catch{}finally{Y.current||B(e=>{let r=new Set(e);return r.delete(t.server_id),r})}},[e]);(0,r.useEffect)(()=>(Y.current=!1,(0,p.fetchMCPServers)(e).then(async e=>{if(Y.current)return;let t=Array.isArray(e)?e:e?.data??[],r=t.filter(e=>e.auth_type===m.AUTH_TYPE.OAUTH2);for(let e of(C(t),B(new Set(r.map(e=>e.server_id))),T(!1),r.forEach(e=>J(e)),H(!0),Array.from({length:Math.ceil(t.length/5)},(e,r)=>t.slice(5*r,(r+1)*5)))){if(Y.current)return;await Promise.allSettled(e.map(e=>G(e)))}Y.current||H(!1)}).catch(()=>{Y.current||(C([]),T(!1))}),()=>{Y.current=!0}),[e,G,J]),(0,r.useEffect)(()=>{if(0===D.size)return;let e=V.current.filter(e=>D.has(e.server_id)&&!F.current.includes($(e))).map($);e.length>0&&K.current([...F.current,...e])},[D]);let X=async(t,r,n)=>{if(!r){y(v.filter(e=>e!==t)),n&&z(e=>{let t=new Set(e);return t.delete(n),t});return}k(e=>new Set(e).add(t));try{let r=n??t,a=await (0,p.listMCPTools)(e,r);if(a?.error)return void x.default.warning(`Could not load tools for ${t}`);F.current.includes(t)||y([...F.current,t])}catch{x.default.warning(`Could not load tools for ${t}`)}finally{k(e=>{let r=new Set(e);return r.delete(t),r})}},{data:q,isLoading:Z}=(0,n.useQuery)({queryKey:["mcp-apps-panel-detail-tools",I?.server_id],queryFn:()=>(0,p.listMCPTools)(e,I.server_id),enabled:!!I}),Q=Array.isArray(q?.tools)?q.tools:[],ee=S.filter(e=>{let t=$(e),r=!A.trim()||t.toLowerCase().includes(A.toLowerCase())||(e.description??"").toLowerCase().includes(A.toLowerCase()),n="all"===j||v.includes(t);return r&&n}),et=S.filter(e=>v.includes($(e))).length,er=Object.values(L).reduce((e,t)=>e+t,0);if(I){let r=$(I),n=v.includes(r),a=R.has(r),s=_(r);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:()=>M(null),className:"-ml-3 mb-5 gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(i.ArrowLeft,{className:"h-3 w-3"}),"Back"]}),(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-7",children:[I.mcp_info?.logo_url?(0,t.jsx)(g.Logo,{src:I.mcp_info.logo_url,label:r,className:"w-16 h-16 rounded-2xl object-contain shrink-0 bg-muted/50"}):(0,t.jsx)("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center text-white font-bold text-[28px] shrink-0",style:{background:s},children:r.charAt(0).toUpperCase()}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"m-0 mb-1 text-[22px] font-bold text-foreground",children:r}),(0,t.jsx)("p",{className:"m-0 text-sm text-muted-foreground",children:I.description??"MCP server"})]}),I.auth_type===m.AUTH_TYPE.OAUTH2?D.has(I.server_id)?(0,t.jsx)(c.Button,{variant:"destructive",onClick:async()=>{try{await (0,p.deleteMCPOAuthUserCredential)(e,I.server_id)}catch(e){}z(e=>{let t=new Set(e);return t.delete(I.server_id),t}),K.current(F.current.filter(e=>e!==r))},className:"font-semibold h-[38px] min-w-[110px]",children:"Disconnect"}):(0,t.jsx)(b,{server:I,accessToken:e,onConnect:e=>{z(t=>new Set(t).add(e))},variant:"button"}):(0,t.jsxs)(c.Button,{variant:n?"outline":"default",disabled:a,onClick:()=>X(r,!n,I.server_id),className:"font-semibold h-[38px] min-w-[110px]",children:[a&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),n?"Disconnect":"Connect"]})]}),(0,t.jsx)("h3",{className:"m-0 mb-3 text-[15px] font-semibold text-foreground",children:"Information"}),(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden mb-7",children:[["Server ID",I.server_id],["Transport",(0,m.handleTransport)(I.transport,I.spec_path)],["Status",n?"Connected":"Not connected"]].filter(([,e])=>e).map(([e,r],n,a)=>(0,t.jsxs)("div",{className:`flex px-4 py-3 text-[13px] ${n(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30 flex flex-col gap-1.5",children:[(0,t.jsx)(f.Skeleton,{className:"h-3.5 w-1/3"}),(0,t.jsx)(f.Skeleton,{className:"h-3 w-2/3"})]},r))}):0===Q.length?(0,t.jsx)("div",{className:"text-muted-foreground text-[13px] py-2",children:"No tools available"}):(0,t.jsx)("div",{className:"flex flex-col gap-2",children:Q.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${e.description?"mb-1":""}`,children:[(0,t.jsx)(l.Wrench,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold text-foreground font-mono",children:e.name})]}),e.description&&(0,t.jsx)("p",{className:"m-0 text-xs text-muted-foreground pl-[21px]",children:e.description})]},e.name))})]})}return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("h2",{className:"m-0 text-lg font-semibold text-foreground",children:"MCP Servers"}),!w&&(0,t.jsx)("span",{className:"text-[10px] font-semibold text-primary bg-primary/10 rounded px-1.5 py-0.5 uppercase tracking-wider",children:"Beta"})]}),w?(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Click a server to see its tools and connect"}):(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Browse tools, authenticate once, use in chat"}),U?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}),"Loading tools..."]}):er>0?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(l.Wrench,{className:"h-3 w-3"}),er," tool",1!==er?"s":""," available"]}):null]})]}),(0,t.jsxs)("div",{className:"relative w-[220px]",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)(d.Input,{placeholder:"Search servers...",value:A,onChange:e=>E(e.target.value),className:"pl-9 text-[13px] h-9"})]})]}),(0,t.jsx)(h.Tabs,{value:j,onValueChange:e=>O(e),className:"mb-4",children:(0,t.jsxs)(h.TabsList,{variant:"line",className:"border-b rounded-none w-full justify-start h-auto p-0",children:[(0,t.jsx)(h.TabsTrigger,{value:"all",className:"rounded-none px-4 py-2 text-[13px]",children:"All"}),(0,t.jsxs)(h.TabsTrigger,{value:"connected",className:"rounded-none px-4 py-2 text-[13px]",children:["Connected",et>0?` (${et})`:""]})]})}),N?(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:Array.from({length:6},(e,r)=>(0,t.jsxs)("div",{className:`flex items-center gap-3 p-4 ${r%2==0?"border-r":""} ${r<4?"border-b":""}`,children:[(0,t.jsx)(f.Skeleton,{className:"w-[38px] h-[38px] rounded-xl shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1.5",children:[(0,t.jsx)(f.Skeleton,{className:"h-3.5 w-2/3"}),(0,t.jsx)(f.Skeleton,{className:"h-3 w-1/2"})]})]},r))}):0===ee.length?(0,t.jsx)("div",{className:"text-center text-muted-foreground text-[13px] py-12 px-3",children:0===S.length?"No MCP servers configured. Add servers in Tools -> MCP Servers.":"connected"===j?"No servers connected yet.":"No servers match your search."}):(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:ee.map((r,n)=>{var a;let i=$(r),u=_(i),c=L[i],d=!!w&&(0,m.isUnsupportedOnGatewayConnect)(r.auth_type);return(0,t.jsxs)("div",{onClick:()=>M(r),className:`flex items-center gap-3 p-4 bg-card cursor-pointer transition-colors hover:bg-accent/30 min-w-0 ${n%2==0?"border-r":""} ${Math.floor(n/2)0?(0,t.jsxs)("span",{className:"shrink-0 flex items-center gap-1 text-muted-foreground",children:["· ",(0,t.jsx)(l.Wrench,{className:"h-2.5 w-2.5"})," ",c]}):null:U?(0,t.jsx)(f.Skeleton,{className:"w-7 h-3 shrink-0"}):null]})]}),(a=r,w&&(0,m.isUnsupportedOnGatewayConnect)(a.auth_type)?(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 whitespace-nowrap",children:"Not supported on this connection"}):a.auth_type===m.AUTH_TYPE.OAUTH2?D.has(a.server_id)?(0,t.jsx)(o.CheckCircle,{className:"h-3.5 w-3.5 text-emerald-600 shrink-0"}):W.has(a.server_id)?(0,t.jsx)(f.Skeleton,{className:"h-6 w-16 shrink-0 rounded-md"}):(0,t.jsx)(b,{server:a,accessToken:e,onConnect:e=>z(t=>new Set(t).add(e)),variant:"badge"}):v.includes($(a))?(0,t.jsx)("span",{className:"w-[7px] h-[7px] rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}):null),(0,t.jsx)(s.ChevronRight,{className:"h-3 w-3 text-muted-foreground/40 shrink-0"})]},r.server_id)})})]})}])},248536,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(405033),i=e.i(21040),s=e.i(269638),l=e.i(602869);let o=({flowHandle:e,clientOrigin:r})=>{let n=`${(0,l.getProxyBaseUrl)()}/authorize/complete`,a=r??"the application";return(0,t.jsx)("div",{className:"mb-6 rounded-lg border border-primary/30 bg-primary/5 px-5 py-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 min-w-0",children:[(0,t.jsx)(s.CheckCircle,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"text-sm font-semibold text-foreground",children:["Connect your MCP servers to ",a]}),(0,t.jsxs)("p",{className:"text-[13px] text-muted-foreground mt-0.5",children:["Authorize the servers you want to use below, then click Finish connecting to return to ",a,"."]})]})]}),(0,t.jsxs)("form",{method:"POST",action:n,className:"shrink-0",children:[(0,t.jsx)("input",{type:"hidden",name:"flow",value:e}),(0,t.jsx)("button",{type:"submit",className:"h-[38px] rounded-md bg-primary px-4 text-sm font-semibold text-primary-foreground hover:bg-primary/90",children:"Finish connecting"})]})]})})};function u(){let{accessToken:e,selectedMCPServers:s,setSelectedMCPServers:l}=(0,a.useChatShell)(),u=(0,n.useRouter)(),c=(0,n.useSearchParams)(),d=c.get("mcpOauthReturn"),f=c.get("connect_flow"),h=c.get("connect_client");return(0,r.useEffect)(()=>{if(d){let e=new URL(window.location.href);e.searchParams.delete("mcpOauthReturn"),u.replace(e.pathname+e.search)}},[d,u]),(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-auto w-full py-8 px-8",children:[f&&(0,t.jsx)(o,{flowHandle:f,clientOrigin:h}),(0,t.jsx)(i.default,{accessToken:e,selectedServers:s,onChange:l,connectMode:!!f})]})}e.s(["default",0,function(){return(0,t.jsx)(r.Suspense,{children:(0,t.jsx)(u,{})})}],248536)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js b/litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js
deleted file mode 100644
index 9c60665515a..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={},i=!0)=>{let{accessToken:d}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(d,e,a,s),enabled:!!d&&i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={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"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(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:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",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:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{})," # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),' "',e,'": "',l,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05ttqlxo9w0ow.js b/litellm/proxy/_experimental/out/_next/static/chunks/05ttqlxo9w0ow.js
new file mode 100644
index 00000000000..62aaff6d34e
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/05ttqlxo9w0ow.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let A;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let r=(0,i.normalizeRootPath)(l);return r&&(e===r||e.startsWith(`${r}/`))?e:(A=(0,i.normalizeRootPath)(l),`${A}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let A={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,A],301035);let r={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let o={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,o],434339);let d={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let A={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],144923);let r={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let o={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,o],837957);let d={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,d],227247);let u={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,u],708889);let n={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,n],859320);let h={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],586455);let c={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,c],921117);let g={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],21296);let f={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,f],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let A={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,A],901372);let r={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let o={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let A={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],709103);let r={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let o={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,o],768493);let d={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,d],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),A=e.i(470524),r=e.i(901539),s=e.i(434339),o=e.i(857152),d=e.i(922158),u=e.i(896614),n=e.i(9774),h=e.i(503119),c=e.i(272896),g=e.i(144923),f=e.i(562171),m=e.i(533881),p=e.i(837957),b=e.i(227247),x=e.i(708889),I=e.i(859320),E=e.i(586455),C=e.i(921117),O=e.i(21296),w=e.i(579967),_=e.i(336712),v=e.i(770752),R=e.i(383963),L=e.i(862493),B=e.i(902860),k=e.i(901372),T=e.i(206258),H=e.i(176228),U=e.i(728685),D=e.i(39182),M=e.i(272967),S=e.i(551726),y=e.i(399495),q=e.i(740876),W=e.i(709103),N=e.i(277207),G=e.i(836473),P=e.i(768493),Q=e.i(297720),z=e.i(980385);let F={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},V={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},K={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},j={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},Y={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},Z={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},X={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},eA={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},eo={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},ed={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},eu={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},en={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eh=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let ec={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eg=new Set(["bedrock_mantle"]),ef={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":A.default.src,"Aiohttp Openai":z.default.src,Anthropic:r.default.src,"Anthropic Text":r.default.src,AssemblyAI:s.default.src,Azure:D.default.src,"Azure AI Foundry (Studio)":D.default.src,"Azure Text":D.default.src,Baseten:o.default.src,"Amazon Bedrock":d.default.src,"Amazon Bedrock Mantle":d.default.src,"AWS SageMaker":d.default.src,Cerebras:u.default.src,Cloudflare:n.default.src,Codestral:S.default.src,Cohere:h.default.src,"Cohere Chat":h.default.src,Cometapi:c.default.src,Cursor:g.default.src,"Databricks (Qwen API)":f.default.src,Dashscope:j.src,Deepseek:b.default.src,Deepgram:m.default.src,DeepInfra:p.default.src,ElevenLabs:x.default.src,"Fal AI":I.default.src,"Featherless Ai":E.default.src,"Fireworks AI":C.default.src,Friendliai:O.default.src,"Github Copilot":w.default.src,"Google AI Studio":_.default.src,Groq:v.default.src,vllm:er.src,Huggingface:R.default.src,Hyperbolic:L.default.src,Infinity:B.default.src,"Jina AI":k.default.src,"Lambda Ai":T.default.src,"Lm Studio":H.default.src,"Meta Llama":U.default.src,MiniMax:M.default.src,"Mistral AI":S.default.src,Moonshot:y.default.src,Morph:q.default.src,Nebius:W.default.src,Novita:N.default.src,"Nvidia Nim":G.default.src,Ollama:Q.default.src,"Ollama Chat":Q.default.src,Oobabooga:z.default.src,OpenAI:z.default.src,"Openai Like":z.default.src,"OpenAI Text Completion":z.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":z.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":z.default.src,Openrouter:F.src,"Oracle Cloud Infrastructure (OCI)":V.src,Perplexity:K.src,Recraft:Y.src,Replicate:J.src,RunwayML:Z.src,Sagemaker:d.default.src,Sambanova:X.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":S.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:P.default.src,V0:el.src,"Vercel Ai Gateway":eA.src,"Vertex AI (Anthropic, Gemini, etc.)":_.default.src,"Vertex Ai Beta":_.default.src,Vllm:er.src,VolcEngine:es.src,"Voyage AI":eo.src,Watsonx:ed.src,"Watsonx Text":ed.src,xAI:eu.src,Xinference:en.src};e.s(["Providers",()=>eh,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(ef[e])??"",displayName:e}}let t=Object.keys(ec).find(t=>ec[t].toLowerCase()===e.toLowerCase())??Object.keys(ec).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=eh[t];return{logo:(0,i.resolveLogoSrc)(ef[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=ec[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,A="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||A&&!eg.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,ef,"provider_map",0,ec],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),l=e.i(555987);e.s(["Logo",0,({provider:e,src:A,label:r,className:s="w-4 h-4"})=>{let[o,d]=(0,i.useState)(null),u=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,l.resolveLogoSrc)(A)??"",n=r??e??"";return o!==u&&u?(0,t.jsx)("img",{src:u,alt:`${n||"-"} logo`,className:s,onError:()=>{console.warn(`Logo failed to load: ${u}`),d(u)}}):(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:n.charAt(0)||"-"})}])},695411,e=>{"use strict";var t=e.i(602869);let i=async e=>{try{let i=await (0,t.modelHubCall)(e);if(i?.data.length>0){let e=i.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,i])},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(529681),l=e.i(908286),A=e.i(242064),r=e.i(246422),s=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],d=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],n=function(e,t){let a,l,A;return(0,i.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(i=>{l[`${e}-align-${i}`]=t.align===i}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(A={},d.forEach(i=>{A[`${e}-justify-${i}`]=t.justify===i}),A)))},h=(0,r.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:i,paddingLG:a}=e,l=(0,s.mergeToken)(e,{flexGapSM:t,flexGap:i,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,i={};return o.forEach(e=>{i[`${t}-wrap-${e}`]={flexWrap:e}}),i})(l),(e=>{let{componentCls:t}=e,i={};return u.forEach(e=>{i[`${t}-align-${e}`]={alignItems:e}}),i})(l),(e=>{let{componentCls:t}=e,i={};return d.forEach(e=>{i[`${t}-justify-${e}`]={justifyContent:e}}),i})(l)]},()=>({}),{resetStyle:!1});var c=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let g=t.default.forwardRef((e,r)=>{let{prefixCls:s,rootClassName:o,className:d,style:u,flex:g,gap:f,vertical:m=!1,component:p="div",children:b}=e,x=c(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:I,direction:E,getPrefixCls:C}=t.default.useContext(A.ConfigContext),O=C("flex",s),[w,_,v]=h(O),R=null!=m?m:null==I?void 0:I.vertical,L=(0,i.default)(d,o,null==I?void 0:I.className,O,_,v,n(O,e),{[`${O}-rtl`]:"rtl"===E,[`${O}-gap-${f}`]:(0,l.isPresetSize)(f),[`${O}-vertical`]:R}),B=Object.assign(Object.assign({},null==I?void 0:I.style),u);return g&&(B.flex=g),f&&!(0,l.isPresetSize)(f)&&(B.gap=f),w(t.default.createElement(p,Object.assign({ref:r,className:L,style:B},(0,a.default)(x,["justify","wrap","align"])),b))});e.s(["Flex",0,g],525720)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/06hxe45fjy7x7.js b/litellm/proxy/_experimental/out/_next/static/chunks/06hxe45fjy7x7.js
new file mode 100644
index 00000000000..027449f8e8c
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/06hxe45fjy7x7.js
@@ -0,0 +1,7 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196361,e=>{e.q("/litellm-asset-prefix/_next/static/media/arize.2q0zcoh7v2j00.png")},614148,e=>{e.q("/litellm-asset-prefix/_next/static/media/aws.2vuu_29f0wx7g.svg")},858236,e=>{e.q("/litellm-asset-prefix/_next/static/media/braintrust.1qnhppdggfxdj.png")},508296,e=>{e.q("/litellm-asset-prefix/_next/static/media/datadog.20j6djly_hrsx.png")},324755,e=>{e.q("/litellm-asset-prefix/_next/static/media/galileo.1jnyj81fv75mp.ico")},475151,e=>{e.q("/litellm-asset-prefix/_next/static/media/lago.146vobxeazdxy.svg")},274286,e=>{e.q("/litellm-asset-prefix/_next/static/media/langfuse.1y39530irujaj.png")},436494,e=>{e.q("/litellm-asset-prefix/_next/static/media/langsmith.0cuekyutow5l_.png")},204086,e=>{e.q("/litellm-asset-prefix/_next/static/media/openmeter.1wzo3xv7qwtb8.png")},531150,e=>{e.q("/litellm-asset-prefix/_next/static/media/otel.1dei3v2u03nit.png")},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),l=e.i(673706),o=e.i(271645);let n=o.default.forwardRef((e,n)=>{let{color:s,children:i,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return o.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",s?(0,l.getColorClassNames)(s,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),i)});n.displayName="Title",e.s(["Title",0,n],629569)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),o=e.i(444755),n=e.i(673706);let s=(0,n.makeClassName)("Card"),i=r.default.forwardRef((e,i)=>{let{decoration:c="",decorationColor:d,children:u,className:p}=e,f=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,o.tremorTwMerge)(s("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,n.getColorClassNames)(d,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),p)},f),u)});i.displayName="Card",e.s(["Card",0,i],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),l=e.i(392221),o=e.i(703923),n=e.i(343794),s=e.i(914949),i=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,i.forwardRef)(function(e,d){var u=e.prefixCls,p=void 0===u?"rc-checkbox":u,f=e.className,m=e.style,v=e.checked,b=e.disabled,h=e.defaultChecked,g=e.type,x=void 0===g?"checkbox":g,y=e.title,C=e.onChange,S=(0,o.default)(e,c),k=(0,i.useRef)(null),w=(0,i.useRef)(null),E=(0,s.default)(void 0!==h&&h,{value:v}),_=(0,l.default)(E,2),N=_[0],$=_[1];(0,i.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=k.current)||t.focus(e)},blur:function(){var e;null==(e=k.current)||e.blur()},input:k.current,nativeElement:w.current}});var j=(0,n.default)(p,f,(0,a.default)((0,a.default)({},"".concat(p,"-checked"),N),"".concat(p,"-disabled"),b));return i.createElement("span",{className:j,title:y,style:m,ref:w},i.createElement("input",(0,t.default)({},S,{className:"".concat(p,"-input"),ref:k,onChange:function(t){b||("checked"in e||$(t.target.checked),null==C||C({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:b,checked:!!N,type:x})),i.createElement("span",{className:"".concat(p,"-inner")}))});e.s(["default",0,d],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=i.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),l=e.i(611935),o=e.i(121872),n=e.i(26905),s=e.i(242064),i=e.i(937328),c=e.i(321883),d=e.i(62139);let u=t.default.createContext(null);e.i(296059);var p=e.i(915654),f=e.i(183293),m=e.i(246422),v=e.i(838378);function b(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,f.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,p.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
+ ${r}:not(${r}-disabled),
+ ${t}:not(${t}-disabled)
+ `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
+ ${r}-checked:not(${r}-disabled),
+ ${t}-checked:not(${t}-disabled)
+ `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,v.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let h=(0,m.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[b(t,e)]);e.s(["default",0,h,"getStyle",0,b],236836);var g=e.i(681216),x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.forwardRef((e,p)=>{var f;let{prefixCls:m,className:v,rootClassName:b,children:y,indeterminate:C=!1,style:S,onMouseEnter:k,onMouseLeave:w,skipGroup:E=!1,disabled:_}=e,N=x(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:$,direction:j,checkbox:O}=t.useContext(s.ConfigContext),P=t.useContext(u),{isFormItemInput:R}=t.useContext(d.FormItemInputContext),M=t.useContext(i.default),T=null!=(f=(null==P?void 0:P.disabled)||_)?f:M,L=t.useRef(N.value),I=t.useRef(null),z=(0,l.composeRef)(p,I);t.useEffect(()=>{null==P||P.registerValue(N.value)},[]),t.useEffect(()=>{if(!E)return N.value!==L.current&&(null==P||P.cancelValue(L.current),null==P||P.registerValue(N.value),L.current=N.value),()=>null==P?void 0:P.cancelValue(N.value)},[N.value]),t.useEffect(()=>{var e;(null==(e=I.current)?void 0:e.input)&&(I.current.input.indeterminate=C)},[C]);let D=$("checkbox",m),A=(0,c.default)(D),[q,V,B]=h(D,A),G=Object.assign({},N);P&&!E&&(G.onChange=(...e)=>{N.onChange&&N.onChange.apply(N,e),P.toggleOption&&P.toggleOption({label:y,value:N.value})},G.name=P.name,G.checked=P.value.includes(N.value));let H=(0,r.default)(`${D}-wrapper`,{[`${D}-rtl`]:"rtl"===j,[`${D}-wrapper-checked`]:G.checked,[`${D}-wrapper-disabled`]:T,[`${D}-wrapper-in-form-item`]:R},null==O?void 0:O.className,v,b,B,A,V),K=(0,r.default)({[`${D}-indeterminate`]:C},n.TARGET_CLS,V),[W,F]=(0,g.default)(G.onClick);return q(t.createElement(o.default,{component:"Checkbox",disabled:T},t.createElement("label",{className:H,style:Object.assign(Object.assign({},null==O?void 0:O.style),S),onMouseEnter:k,onMouseLeave:w,onClick:W},t.createElement(a.default,Object.assign({},G,{onClick:F,prefixCls:D,className:K,disabled:T,ref:z})),null!=y&&t.createElement("span",{className:`${D}-label`},y))))});var C=e.i(8211),S=e.i(529681),k=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let w=t.forwardRef((e,a)=>{let{defaultValue:l,children:o,options:n=[],prefixCls:i,className:d,rootClassName:p,style:f,onChange:m}=e,v=k(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:b,direction:g}=t.useContext(s.ConfigContext),[x,w]=t.useState(v.value||l||[]),[E,_]=t.useState([]);t.useEffect(()=>{"value"in v&&w(v.value||[])},[v.value]);let N=t.useMemo(()=>n.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[n]),$=e=>{_(t=>t.filter(t=>t!==e))},j=e=>{_(t=>[].concat((0,C.default)(t),[e]))},O=e=>{let t=x.indexOf(e.value),r=(0,C.default)(x);-1===t?r.push(e.value):r.splice(t,1),"value"in v||w(r),null==m||m(r.filter(e=>E.includes(e)).sort((e,t)=>N.findIndex(t=>t.value===e)-N.findIndex(e=>e.value===t)))},P=b("checkbox",i),R=`${P}-group`,M=(0,c.default)(P),[T,L,I]=h(P,M),z=(0,S.default)(v,["value","disabled"]),D=n.length?N.map(e=>t.createElement(y,{prefixCls:P,key:e.value.toString(),disabled:"disabled"in e?e.disabled:v.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${R}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):o,A=t.useMemo(()=>({toggleOption:O,value:x,disabled:v.disabled,name:v.name,registerValue:j,cancelValue:$}),[O,x,v.disabled,v.name,j,$]),q=(0,r.default)(R,{[`${R}-rtl`]:"rtl"===g},d,p,I,M,L);return T(t.createElement("div",Object.assign({className:q,style:f},z,{ref:a}),t.createElement(u.Provider,{value:A},D)))});y.Group=w,y.__ANT_CHECKBOX=!0,e.s(["default",0,y],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["RobotOutlined",0,o],983561)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(779241),l=e.i(599724),o=e.i(199133),n=e.i(983561),s=e.i(343488),i=e.i(695411);e.s(["default",0,({accessToken:e,value:c,placeholder:d="Select a Model",onChange:u,disabled:p=!1,style:f,className:m,showLabel:v=!0,labelText:b="Select Model"})=>{let[h,g]=(0,r.useState)(c),[x,y]=(0,r.useState)(!1),[C,S]=(0,r.useState)([]);(0,r.useEffect)(()=>{g(c)},[c]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,i.fetchAvailableModels)(e);t.length>0&&S(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]);let k=(0,s.useDebouncedCallback)(e=>{g(e),u?.(e)},{wait:500});return(0,t.jsxs)("div",{children:[v&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(n.RobotOutlined,{className:"mr-2"})," ",b]}),(0,t.jsx)(o.Select,{value:h,placeholder:d,onChange:e=>{"custom"===e?(y(!0),g(void 0)):(y(!1),g(e),u&&u(e))},options:[...Array.from(new Set(C.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${m||""}`,disabled:p}),x&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:k,disabled:p})]})}])},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(602869);e.s(["default",0,({onChange:e,value:o,className:n,accessToken:s,placeholder:i="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){f(!0);try{let e=await (0,l.vectorStoreListCall)(s);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{f(!1)}}})()},[s]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:i,onChange:e,value:o,loading:p,className:n,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),l=e.i(602869),o=e.i(135214);let n=(0,a.createQueryKeys)("mcpAccessGroups");var s=e.i(500727),i=e.i(699857),c=e.i(199133),d=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:a,className:p,accessToken:f,placeholder:m="Select MCP servers",disabled:v=!1,teamId:b,allowNoMcpServers:h=!1,allowAllProxyMcpServers:g=!1})=>{let{data:x=[],isLoading:y}=(0,s.useMCPServers)(b),{data:C=[],isLoading:S}=(()=>{let{accessToken:e}=(0,o.default)();return(0,r.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:k=[],isLoading:w}=(0,i.useMCPToolsets)(),E=new Set(C),_=[...C.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...k.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},$={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},j=[...a?.servers||[],...a?.accessGroups||[],...(a?.toolsets||[]).map(e=>`${u}${e}`)],O=h&&j.includes(d.NO_MCP_SERVERS_SENTINEL),P=j.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(c.Select,{mode:"multiple",placeholder:m,onChange:t=>{if(g&&t.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[d.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(h&&t.includes(d.NO_MCP_SERVERS_SENTINEL))return void e({servers:[d.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),a=t.filter(e=>!e.startsWith(u));e({servers:a.filter(e=>!E.has(e)),accessGroups:a.filter(e=>E.has(e)),toolsets:r})},value:j,loading:y||S||w,className:p,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:v,filterOption:(e,t)=>t?.value===d.NO_MCP_SERVERS_SENTINEL||t?.value===d.ALL_PROXY_MCP_SERVERS_SENTINEL||(_.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(g||P)&&(0,t.jsx)(c.Select.Option,{value:d.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},d.ALL_PROXY_MCP_SERVERS_SENTINEL),h&&(0,t.jsx)(c.Select.Option,{value:d.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},d.NO_MCP_SERVERS_SENTINEL),_.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,disabled:O||P,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:$[e.type]})]})},e.value))]})})}],75921)},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["UserAddOutlined",0,o],213205)},435451,e=>{"use strict";var t=e.i(843476),r=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M12 4v16m8-8H4"}))},o=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M20 12H4"}))};var n=e.i(444755),s=e.i(673706),i=e.i(677955);let c="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",u=a.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:p=!0,disabled:f,onValueChange:m,onChange:v}=e,b=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),h=(0,a.useRef)(null),[g,x]=a.default.useState(!1),y=a.default.useCallback(()=>{x(!0)},[]),C=a.default.useCallback(()=>{x(!1)},[]),[S,k]=a.default.useState(!1),w=a.default.useCallback(()=>{k(!0)},[]),E=a.default.useCallback(()=>{k(!1)},[]);return a.default.createElement(i.default,Object.assign({type:"number",ref:(0,s.mergeRefs)([h,t]),disabled:f,makeInputClassName:(0,s.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=h.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&y(),"ArrowUp"===e.key&&w()},onKeyUp:e=>{"ArrowDown"===e.key&&C(),"ArrowUp"===e.key&&E()},onChange:e=>{f||(null==m||m(parseFloat(e.target.value)),null==v||v(e))},stepper:p?a.default.createElement("div",{className:(0,n.tremorTwMerge)("flex justify-center align-middle")},a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;f||(null==(e=h.current)||e.stepDown(),null==(t=h.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,n.tremorTwMerge)(!f&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(o,{"data-testid":"step-down",className:(g?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;f||(null==(e=h.current)||e.stepUp(),null==(t=h.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,n.tremorTwMerge)(!f&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(l,{"data-testid":"step-up",className:(S?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},b))});u.displayName="NumberInput",e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:a="Enter a numerical value",min:l,max:o,onChange:n,...s})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:a,min:l,max:o,onChange:n,...s})],435451)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:a}=r.Select;e.s(["default",0,({value:e,onChange:l,className:o="",style:n={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...n},value:e||void 0,onChange:l,className:o,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(a,{value:"1h",children:"hourly"}),(0,t.jsx)(a,{value:"24h",children:"daily"}),(0,t.jsx)(a,{value:"7d",children:"weekly"}),(0,t.jsx)(a,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,a){let l=(0,t.useDebouncer)(e,a).maybeExecute;return(0,r.useCallback)((...e)=>l(...e),[l])}])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500727,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(135214);let o=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,l.default)();return(0,t.useQuery)({queryKey:o.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,a.fetchMCPServers)(r,e),enabled:!!r})}])},699857,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(135214);let o=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:o.list(),queryFn:async()=>await (0,a.fetchMCPToolsets)(e),enabled:!!e})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js b/litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js
deleted file mode 100644
index 251a9ba7430..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,size:r="default",...n},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n}));n.displayName="Card";let o=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));o.displayName="CardHeader";let s=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));s.displayName="CardTitle";let i=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));i.displayName="CardDescription";let l=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));l.displayName="CardAction";let d=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));u.displayName="CardFooter",e.s(["Card",0,n,"CardAction",0,l,"CardContent",0,d,"CardDescription",0,i,"CardFooter",0,u,"CardHeader",0,o,"CardTitle",0,s])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:n=0,side:o="bottom",sideOffset:s=4,className:i,...l}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:o,sideOffset:s,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...l})})})},"DropdownMenuItem",0,function({className:e,inset:n,variant:o="default",...s}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...s})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[n,o]=(0,t.useState)(e);return[a?r:n,e=>{a||o(e)}]}])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},768371,e=>{"use strict";let t,r;var a=e.i(247167);let n=/\{[^{}]+\}/g;function o(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function s(e,t,r){if(!t||"object"!=typeof t)return"";let a=[],n={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)a.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let n=a.join(",");switch(r.style){case"form":return`${e}=${n}`;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return n}}for(let n in t){let s="deepObject"===r.style?`${e}[${n}]`:n;a.push(o(s,t[n],r))}let s=a.join(n);return"label"===r.style||"matrix"===r.style?`${n}${s}`:s}function i(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",n=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(a);switch(r.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return`${e}=${n}`}}let a={simple:",",label:".",matrix:";"}[r.style]||"&",n=[];for(let a of t)"simple"===r.style||"label"===r.style?n.push(!0===r.allowReserved?a:encodeURIComponent(a)):n.push(o(e,a,r));return"label"===r.style||"matrix"===r.style?`${a}${n.join(a)}`:n.join(a)}function l(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let a in t){let n=t[a];if(null!=n){if(Array.isArray(n)){if(0===n.length)continue;r.push(i(a,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof n){r.push(s(a,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(o(a,n,e))}}return r.join("&")}}function d(e,t){let r=e;for(let a of e.match(n)??[]){let e=a.substring(1,a.length-1),n=!1,l="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(l="label",e=e.substring(1)):e.startsWith(";")&&(l="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let d=t[e];if(Array.isArray(d)){r=r.replace(a,i(e,d,{style:l,explode:n}));continue}if("object"==typeof d){r=r.replace(a,s(e,d,{style:l,explode:n}));continue}if("matrix"===l){r=r.replace(a,`;${o(e,d)}`);continue}r=r.replace(a,"label"===l?`.${encodeURIComponent(d)}`:encodeURIComponent(d))}return r}function u(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function c(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,a]of r instanceof Headers?r.entries():Object.entries(r))if(null===a)t.delete(e);else if(Array.isArray(a))for(let r of a)t.append(e,r);else void 0!==a&&t.set(e,a);return t}function p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var f=e.i(954616),m=e.i(621482),h=e.i(869230),g=e.i(469637),b=e.i(254440),x=e.i(266027),v=e.i(431703),y=e.i(97198);let w=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),j=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:o,bodySerializer:s,pathSerializer:i,headers:f,requestInitExt:m,...h}={...e};m="object"==typeof a.default&&Number.parseInt(a.default?.versions?.node?.substring(0,2))>=18&&a.default.versions.undici?m:void 0,t=p(t);let g=[];async function b(e,a){var b,x;let v,y,w,j,C,{baseUrl:k,fetch:N=n,Request:R=r,headers:T,params:E={},parseAs:M="json",querySerializer:S,bodySerializer:z=s??u,pathSerializer:I,body:O,middleware:$=[],...A}=a||{},q=t;k&&(q=p(k)??t);let P="function"==typeof o?o:l(o);S&&(P="function"==typeof S?S:l({..."object"==typeof o?o:{},...S}));let U=I||i||d,D=void 0===O?void 0:z(O,c(f,T,E.header)),L=c(void 0===D||D instanceof FormData?{}:{"Content-Type":"application/json"},f,T,E.header),H=[...g,...$],V={redirect:"follow",...h,...A,body:D,headers:L},_=new R((b=e,x={baseUrl:q,params:E,querySerializer:P,pathSerializer:U},v=`${x.baseUrl}${b}`,x.params?.path&&(v=x.pathSerializer(v,x.params.path)),(y=x.querySerializer(x.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(v+=`?${y}`),v),V);for(let e in A)e in _||(_[e]=A[e]);if(H.length){for(let t of(w=Math.random().toString(36).slice(2,11),j=Object.freeze({baseUrl:q,fetch:N,parseAs:M,querySerializer:P,bodySerializer:z,pathSerializer:U}),H))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:_,schemaPath:e,params:E,options:j,id:w});if(r)if(r instanceof R)_=r;else if(r instanceof Response){C=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!C){try{C=await N(_,m)}catch(r){let t=r;if(H.length)for(let r=H.length-1;r>=0;r--){let a=H[r];if(a&&"object"==typeof a&&"function"==typeof a.onError){let r=await a.onError({request:_,error:t,schemaPath:e,params:E,options:j,id:w});if(r){if(r instanceof Response){t=void 0,C=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(H.length)for(let t=H.length-1;t>=0;t--){let r=H[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:_,response:C,schemaPath:e,params:E,options:j,id:w});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");C=t}}}}let B=C.headers.get("Content-Length");if(204===C.status||"HEAD"===_.method||"0"===B&&!C.headers.get("Transfer-Encoding")?.includes("chunked"))return C.ok?{data:void 0,response:C}:{error:void 0,response:C};if(C.ok){let e=async()=>{if("stream"===M)return C.body;if("json"===M&&!B){let e=await C.text();return e?JSON.parse(e):void 0}return await C[M]()};return{data:await e(),response:C}}let G=await C.text();try{G=JSON.parse(G)}catch{}return{error:G,response:C}}return{request:(e,t,r)=>b(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>b(e,{...t,method:"GET"}),PUT:(e,t)=>b(e,{...t,method:"PUT"}),POST:(e,t)=>b(e,{...t,method:"POST"}),DELETE:(e,t)=>b(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>b(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>b(e,{...t,method:"HEAD"}),PATCH:(e,t)=>b(e,{...t,method:"PATCH"}),TRACE:(e,t)=>b(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");g.push(t)}},eject(...e){for(let t of e){let e=g.indexOf(t);-1!==e&&g.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});j.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await w(e,((e,t)=>{let{pathname:r,search:a}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${a}`})(e.url,t)):e,a=(0,y.getAuthToken)();return a&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${a}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),a=r;try{a=JSON.parse(r),t=(0,v.deriveErrorMessage)(a)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new v.ApiError(t,e.status,a)}});let C=(t=async({queryKey:[e,t,r],signal:a})=>{let n=j[e.toUpperCase()],{data:o,error:s,response:i}=await n(t,{signal:a,...r});if(s)throw s;return 204===i.status||"0"===i.headers.get("Content-Length")?o??null:o},{queryOptions:r=(e,r,...[a,n])=>({queryKey:void 0===a?[e,r]:[e,r,a],queryFn:t,...n}),useQuery:(e,t,...[a,n,o])=>(0,x.useQuery)(r(e,t,a,n),o),useSuspenseQuery:(e,t,...[a,n,o])=>{var s;return s=r(e,t,a,n),(0,g.useBaseQuery)({...s,enabled:!0,suspense:!0,throwOnError:b.defaultThrowOnError,placeholderData:void 0},h.QueryObserver,o)},useInfiniteQuery:(e,t,a,n,o)=>{let{pageParamName:s="cursor",...i}=n,{queryKey:l}=r(e,t,a);return(0,m.useInfiniteQuery)({queryKey:l,queryFn:async({queryKey:[e,t,r],pageParam:a=0,signal:n})=>{let o=j[e.toUpperCase()],i={...r,signal:n,params:{...r?.params||{},query:{...r?.params?.query,[s]:a}}},{data:l,error:d}=await o(t,i);if(d)throw d;return l},...i},o)},useMutation:(e,t,r,a)=>(0,f.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let a=j[e.toUpperCase()],{data:n,error:o}=await a(t,r);if(o)throw o;return n},...r},a)});e.s(["$api",0,C,"fetchClient",0,j],768371)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),a=e.i(266027);let n=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:o}=(0,t.default)();return(0,a.useQuery)({queryKey:n.detail(o),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&o)})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),n=e.i(785242),o=e.i(738014),s=e.i(199133),i=e.i(981339),l=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},u={label:"No Default Models",value:"no-default-models"},c=[d,u],p={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["MODEL_SENTINEL_OPTIONS",0,c,"ModelSelect",0,e=>{let{teamID:f,organizationID:m,options:h,context:g,dataTestId:b,value:x=[],onChange:v,style:y}=e,{includeUserModels:w,showAllTeamModelsOption:j,showAllProxyModelsOverride:C,includeSpecialOptions:k}=h||{},{data:N,isLoading:R}=(0,r.useAllProxyModels)(),{data:T,isLoading:E}=(0,n.useTeam)(f),{data:M,isLoading:S}=(0,a.useOrganization)(m),{data:z,isLoading:I}=(0,o.useCurrentUser)(),O=e=>c.some(t=>t.value===e),$=x.some(O),A=M?.models.includes(d.value)||M?.models.length===0;if(R||E||S||I)return(0,t.jsx)(i.Skeleton.Input,{active:!0,block:!0});let{wildcard:q,regular:P}=(e=>{let t=[],r=[];for(let a of e)a.endsWith("/*")?t.push(a):r.push(a);return{wildcard:t,regular:r}})(((e,t,r)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let n=p[t.context];return n?n({allProxyModels:a,...r,options:t.options}):[]})(N?.data??[],e,{selectedTeam:T,selectedOrganization:M,userModels:z?.models}));return(0,t.jsx)(s.Select,{"data-testid":b,value:x,onChange:e=>{let t=e.filter(O);v(t.length>0?[t[t.length-1]]:e)},style:y,options:[...k?[{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||A&&k||"global"===g?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>O(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:u.value,disabled:x.length>0&&x.some(e=>O(e)&&e!==u.value),key:u.value}]}]:[],...q.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:q.map(e=>{let r=e.replace("/*",""),a=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:$}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:P.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:$}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(l.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,a,n){let[o,s,i]=(0,t.useDebouncedState)(e,a,n);return(0,r.useEffect)(()=>{s(e)},[e,s]),[o,i]}])},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("textarea",{ref:n,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));n.displayName="Textarea",e.s(["Textarea",0,n])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),n=e.i(519455),o=e.i(793479),s=e.i(624687);let i=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),l=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:o="ghost",size:s="xs",...i},d)=>(0,t.jsx)(n.Button,{ref:d,type:r,"data-size":s,variant:o,className:(0,a.cn)(l({size:s}),e),...i}));d.displayName="InputGroupButton";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(o.Input,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));u.displayName="InputGroupInput",r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(s.Textarea,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(i({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let a=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:n,onValueChange:o,placeholder:s="Select…",emptyText:i="No results",disabled:l=!1,className:d}){let u=e.find(e=>e.value===n)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:u,onValueChange:e=>o(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:a,disabled:l,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:s,showClear:null!=n&&""!==n,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:i}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},78085,e=>{"use strict";var t=e.i(290571),r=e.i(103471),a=e.i(888288),n=e.i(271645),o=e.i(444755),s=e.i(673706);let i=(0,s.makeClassName)("Textarea"),l=n.default.forwardRef((e,l)=>{let{value:d,defaultValue:u="",placeholder:c="Type...",error:p=!1,errorMessage:f,disabled:m=!1,className:h,onChange:g,onValueChange:b,autoHeight:x=!1}=e,v=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[y,w]=(0,a.default)(u,d),j=(0,n.useRef)(null),C=(0,r.hasValue)(y);return(0,n.useEffect)(()=>{let e=j.current;if(x&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[x,j,y]),n.default.createElement(n.default.Fragment,null,n.default.createElement("textarea",Object.assign({ref:(0,s.mergeRefs)([j,l]),value:y,placeholder:c,disabled:m,className:(0,o.tremorTwMerge)(i("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,r.getSelectButtonColors)(C,m,p),m?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",h),"data-testid":"text-area",onChange:e=>{null==g||g(e),w(e.target.value),null==b||b(e.target.value)}},v)),p&&f?n.default.createElement("p",{className:(0,o.tremorTwMerge)(i("errorMessage"),"text-sm text-red-500 mt-1")},f):null)});l.displayName="Textarea",e.s(["Textarea",0,l],78085)},744582,e=>{"use strict";var t=e.i(843476),r=e.i(343488),a=e.i(531278),n=e.i(271645),o=e.i(131792),s=e.i(741466);let i=new Set(["input-change","input-clear","clear-press"]);e.s(["PaginatedSearchSelect",0,function({options:e,value:l,onValueChange:d,onSearchChange:u,onLoadMore:c,hasNextPage:p=!1,isLoading:f=!1,isFetchingNextPage:m=!1,placeholder:h="Search…",emptyText:g="No results",loadingText:b="Loading…",disabled:x=!1,className:v,inputId:y,"aria-invalid":w,"aria-describedby":j}){let C=(0,n.useMemo)(()=>void 0===l||""===l?null:e.find(e=>e.value===l)??{label:l,value:l},[e,l]),k=(0,n.useMemo)(()=>null===C||e.some(e=>e.value===C.value)?e:[C,...e],[e,C]),N=(0,r.useDebouncedCallback)(u,{wait:s.DEBOUNCE_WAIT_MS});return(0,t.jsxs)(o.Combobox,{items:k,value:C,onValueChange:e=>d(e?.value??""),onInputValueChange:(e,t)=>{var r;return r=t.reason,void(i.has(r)&&N(e))},isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:null,disabled:x,children:[(0,t.jsx)(o.ComboboxInput,{id:y,"aria-invalid":w,"aria-describedby":j,placeholder:h,showClear:void 0!==l&&""!==l,className:`w-full ${v??""}`}),(0,t.jsxs)(o.ComboboxContent,{children:[(0,t.jsx)(o.ComboboxEmpty,{children:f?b:g}),(0,t.jsx)(o.ComboboxList,{onScroll:e=>{let t=e.currentTarget;0===t.scrollHeight||(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!m&&c()},"data-testid":"paginated-search-select-list",children:e=>(0,t.jsx)(o.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)}),m&&(0,t.jsx)("div",{className:"flex justify-center py-2","data-testid":"paginated-search-select-loading-more",children:(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-muted-foreground"})})]})]})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/06sx0oh8weeph.js b/litellm/proxy/_experimental/out/_next/static/chunks/06sx0oh8weeph.js
new file mode 100644
index 00000000000..57f03aca8e1
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/06sx0oh8weeph.js
@@ -0,0 +1,8 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,784774,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{ref:r,"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";let l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("thead",{ref:r,"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...a}));l.displayName="TableHeader";let o=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tbody",{ref:r,"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...a}));o.displayName="TableBody";let i=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));i.displayName="TableFooter";let s=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tr",{ref:r,"data-slot":"table-row",className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));s.displayName="TableRow";let u=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("th",{ref:r,"data-slot":"table-head",className:(0,n.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));u.displayName="TableHead";let d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("td",{ref:r,"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));d.displayName="TableCell",a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("caption",{ref:r,"data-slot":"table-caption",className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...a})).displayName="TableCaption",e.s(["Table",0,r,"TableBody",0,o,"TableCell",0,d,"TableFooter",0,i,"TableHead",0,u,"TableHeader",0,l,"TableRow",0,s])},302747,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-accent",e),...a}));r.displayName="Skeleton",e.s(["Skeleton",0,r])},108821,e=>{"use strict";var t=e.i(733332),a=e.i(271645);let n=a.createContext(!1),r=a.createContext(void 0);e.s(["DialogRootContext",0,r,"IsDrawerContext",0,n,"useDialogRootContext",0,function(e){let n=a.useContext(r);if(!1===e&&void 0===n)throw Error((0,t.default)(27));return n}])},402820,156736,209793,625834,784324,264951,e=>{"use strict";e.i(247167);var t,a,n=e.i(271645),r=e.i(108821),l=e.i(552245),o=e.i(405005),i=e.i(209407);let s={...o.popupStateMapping,...i.transitionStatusMapping},u=n.forwardRef(function(e,t){let{render:a,className:n,style:o,forceRender:i=!1,...u}=e,{store:d}=(0,r.useDialogRootContext)(),c=d.useState("open"),p=d.useState("nested"),g=d.useState("mounted"),m=d.useState("transitionStatus");return(0,l.useRenderElement)("div",e,{state:{open:c,transitionStatus:m},ref:[d.context.backdropRef,t],stateAttributesMapping:s,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:i||!p})});e.s(["DialogBackdrop",0,u],402820);var d=e.i(540886),c=e.i(675606),p=e.i(56434);let g=n.forwardRef(function(e,t){let{render:a,className:n,style:o,disabled:i=!1,nativeButton:s=!0,...u}=e,{store:g}=(0,r.useDialogRootContext)(),m=g.useState("open"),{getButtonProps:f,buttonRef:b}=(0,d.useButton)({disabled:i,native:s});return(0,l.useRenderElement)("button",e,{state:{disabled:i},ref:[t,b],props:[{onClick:function(e){m&&g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.closePress,e.nativeEvent))}},u,f]})});e.s(["DialogClose",0,g],156736);var m=e.i(788015);let f=n.forwardRef(function(e,t){let{render:a,className:n,style:o,id:i,...s}=e,{store:u}=(0,r.useDialogRootContext)(),d=(0,m.useBaseUiId)(i);return u.useSyncedValueWithCleanup("descriptionElementId",d),(0,l.useRenderElement)("p",e,{ref:t,props:[{id:d},s]})});e.s(["DialogDescription",0,f],209793);var b=e.i(61487);let x=((t={}).nestedDialogs="--nested-dialogs",t),h=((a={})[a.open=o.CommonPopupDataAttributes.open]="open",a[a.closed=o.CommonPopupDataAttributes.closed]="closed",a[a.startingStyle=o.CommonPopupDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=o.CommonPopupDataAttributes.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a);var y=e.i(733332);let C=n.createContext(void 0);function v(){let e=n.useContext(C);if(void 0===e)throw Error((0,y.default)(26));return e}e.s(["DialogPortalContext",0,C,"useDialogPortalContext",0,v],625834);var S=e.i(137584),w=e.i(673327),$=e.i(264111),D=e.i(843476);let j={...o.popupStateMapping,...i.transitionStatusMapping,nestedDialogOpen:e=>e?{[h.nestedDialogOpen]:""}:null},R=n.forwardRef(function(e,t){let{render:a,className:n,style:o,finalFocus:i,initialFocus:s,...u}=e,{store:d}=(0,r.useDialogRootContext)(),c=d.useState("descriptionElementId"),p=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),m=d.useState("popupProps"),f=d.useState("modal"),h=d.useState("mounted"),y=d.useState("nested"),C=d.useState("nestedOpenDialogCount"),R=d.useState("open"),O=d.useState("openMethod"),N=d.useState("titleElementId"),k=d.useState("transitionStatus"),E=d.useState("role"),M=g.useState("floatingId"),P=u.id??M;v(),(0,S.useOpenChangeComplete)({open:R,ref:d.context.popupRef,onComplete(){R&&d.context.onOpenChangeComplete?.(!0)}});let T=void 0===s?(0,$.createDefaultInitialFocus)(d.context.popupRef):s,A=d.useStateSetter("popupElement"),I=(0,l.useRenderElement)("div",e,{state:{open:R,nested:y,transitionStatus:k,nestedDialogOpen:C>0},props:[m,{id:P,"aria-labelledby":N??void 0,"aria-describedby":c??void 0,role:E,...$.FOCUSABLE_POPUP_PROPS,hidden:!h,onKeyDown(e){w.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[x.nestedDialogs]:C}},u],ref:[t,d.context.popupRef,A],stateAttributesMapping:j});return(0,D.jsx)(b.FloatingFocusManager,{context:g,openInteractionType:O,disabled:!h,closeOnFocusOut:!p,initialFocus:T,returnFocus:i,modal:!1!==f,restoreFocus:"popup",children:I})});e.s(["DialogPopup",0,R],784324);var O=e.i(144394),N=e.i(726674),k=e.i(426);let E=n.forwardRef(function(e,t){let{keepMounted:a=!1,...n}=e,{store:l}=(0,r.useDialogRootContext)(),o=l.useState("mounted"),i=l.useState("modal"),s=l.useState("open");return o||a?(0,D.jsx)(C.Provider,{value:a,children:(0,D.jsxs)(N.FloatingPortal,{ref:t,...n,children:[o&&!0===i&&(0,D.jsx)(k.InternalBackdrop,{ref:l.context.internalBackdropRef,inert:(0,O.inertValue)(!s)}),e.children]})}):null});e.s(["DialogPortal",0,E],264951)},67530,e=>{"use strict";var t=e.i(271645),a=e.i(145484),n=e.i(956789),r=e.i(17989),l=e.i(647554),o=e.i(675606),i=e.i(56434),s=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:o,isDrawer:i}){let u=e.useState("open"),d=e.useState("disablePointerDismissal"),c=e.useState("modal"),p=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,f]=t.useState(0),[b,x]=t.useState(0),h=0===m,y=(0,r.useDismiss)(g,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===c?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let a=(0,l.getTarget)(t);return!!h&&!d&&(!c||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===a||e.context.backdropRef.current===a||(0,l.contains)(a,p)&&!a?.hasAttribute("data-base-ui-portal"))},escapeKey:h});(0,a.useScrollLock)(u&&!0===c,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{f(e),x(t)}),e.useContextCallback("onNestedDialogClose",()=>{f(0),x(0)}),t.useEffect(()=>(o?.onNestedDialogOpen&&u&&o.onNestedDialogOpen(m+1,b+ +!!i),o?.onNestedDialogClose&&!u&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&u&&o.onNestedDialogClose()}),[i,u,m,b,o]);let C=y.reference??n.EMPTY_OBJECT,v=y.trigger??n.EMPTY_OBJECT,S=y.floating??n.EMPTY_OBJECT;return(0,s.usePopupInteractionProps)(e,{activeTriggerProps:C,inactiveTriggerProps:v,popupProps:S,nestedOpenDialogCount:m,nestedOpenDrawerCount:b}),null},"useDialogRoot",0,function(e){let{store:a,actionsRef:n}=e,r=a.useState("open");(0,s.usePopupRootSync)(a,r),(0,s.useImplicitActiveTrigger)(a);let{forceUnmount:l}=(0,s.useOpenStateTransitions)(r,a),u=t.useCallback(()=>{a.setOpen(!1,(0,o.createChangeEventDetails)(i.REASONS.imperativeAction))},[a]);t.useImperativeHandle(n,()=>({unmount:l,close:u}),[l,u])}])},366250,301807,e=>{"use strict";var t=e.i(271645),a=e.i(713203),n=e.i(67530),r=e.i(108821),l=e.i(616269),o=e.i(301252),i=e.i(116786),s=e.i(990627),u=e.i(264111);let d={...i.popupStoreSelectors,modal:(0,l.createSelector)(e=>e.modal),nested:(0,l.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,l.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,l.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,l.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,l.createSelector)(e=>e.openMethod),descriptionElementId:(0,l.createSelector)(e=>e.descriptionElementId),titleElementId:(0,l.createSelector)(e=>e.titleElementId),viewportElement:(0,l.createSelector)(e=>e.viewportElement),role:(0,l.createSelector)(e=>e.role)};class c extends o.ReactStore{constructor(e,a,n=!1){const r=new s.PopupTriggerMap,l=function(e={}){return{...(0,i.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);l.floatingRootContext=(0,i.createPopupFloatingRootContext)(r,a,n),super(l,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},d)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a={open:e};(0,u.setPopupOpenState)(a,e,t.trigger),this.update(a)};static useStore(e,t){return(0,u.usePopupStore)(e,(e,a)=>new c(t,e,a),!0).store}}e.s(["DialogStore",0,c],301807);var p=e.i(843476);e.s(["useRenderDialogRoot",0,function(e,l="dialog"){let{children:o,open:i,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:d,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:f,handle:b,triggerId:x,defaultTriggerId:h=null}=e,y="alert-dialog"===l,C=(0,r.useDialogRootContext)(!0),v={modal:!!y||m,disablePointerDismissal:y||g,nested:!!C,role:y?"alertdialog":"dialog"},S=c.useStore(b?.store,{open:s,openProp:i,activeTriggerId:h,triggerIdProp:x,...v});(0,a.useOnFirstRender)(()=>{let e=void 0===i&&!1===S.state.open&&!0===s?{open:!0,activeTriggerId:h}:null;y?S.update(e?{...v,...e}:v):e&&S.update(e)}),S.useControlledProp("openProp",i),S.useControlledProp("triggerIdProp",x),S.useSyncedValues(v),S.useContextCallback("onOpenChange",u),S.useContextCallback("onOpenChangeComplete",d);let w=S.useState("open"),$=S.useState("mounted"),D=S.useState("payload");(0,n.useDialogRoot)({store:S,actionsRef:f});let j=t.useMemo(()=>({store:S}),[S]);return(0,p.jsx)(r.IsDrawerContext.Provider,{value:!1,children:(0,p.jsxs)(r.DialogRootContext.Provider,{value:j,children:[(w||$)&&(0,p.jsx)(n.DialogInteractions,{store:S,parentContext:C?.store.context,isDrawer:"drawer"===l}),"function"==typeof o?o({payload:D}):o]})})}],366250)},974217,e=>{"use strict";e.i(247167);var t,a=e.i(271645),n=e.i(552245),r=e.i(405005),l=e.i(209407),o=e.i(108821),i=e.i(625834);let s=((t={})[t.open=r.CommonPopupDataAttributes.open]="open",t[t.closed=r.CommonPopupDataAttributes.closed]="closed",t[t.startingStyle=r.CommonPopupDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=r.CommonPopupDataAttributes.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t),u={...r.popupStateMapping,...l.transitionStatusMapping,nested:e=>e?{[s.nested]:""}:null,nestedDialogOpen:e=>e?{[s.nestedDialogOpen]:""}:null},d=a.forwardRef(function(e,t){let{render:a,className:r,style:l,children:s,...d}=e,c=(0,i.useDialogPortalContext)(),{store:p}=(0,o.useDialogRootContext)(),g=p.useState("open"),m=p.useState("nested"),f=p.useState("transitionStatus"),b=p.useState("nestedOpenDialogCount"),x=p.useState("mounted"),h=p.useStateSetter("viewportElement");return(0,n.useRenderElement)("div",e,{enabled:c||x,state:{open:g,nested:m,transitionStatus:f,nestedDialogOpen:b>0},ref:[t,h],stateAttributesMapping:u,props:[{role:"presentation",hidden:!x,style:{pointerEvents:g?void 0:"none"},children:s},d]})});e.s(["DialogViewport",0,d],974217)},77173,313488,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(108821),n=e.i(552245),r=e.i(788015);let l=t.forwardRef(function(e,t){let{render:l,className:o,style:i,id:s,...u}=e,{store:d}=(0,a.useDialogRootContext)(),c=(0,r.useBaseUiId)(s);return d.useSyncedValueWithCleanup("titleElementId",c),(0,n.useRenderElement)("h2",e,{ref:t,props:[{id:c},u]})});e.s(["DialogTitle",0,l],77173);var o=e.i(733332),i=e.i(540886),s=e.i(405005),u=e.i(638396),d=e.i(264111),c=e.i(385689),p=e.i(32199);let g=t.forwardRef(function(e,l){let{render:g,className:m,style:f,disabled:b=!1,nativeButton:x=!0,id:h,payload:y,handle:C,...v}=e,S=(0,a.useDialogRootContext)(!0),w=C?.store??S?.store;if(!w)throw Error((0,o.default)(79));let $=(0,r.useBaseUiId)(h),D=w.useState("floatingRootContext"),j=w.useState("isOpenedByTrigger",$),R=w.useState("triggerPopupId",$),O=t.useRef(null),{registerTrigger:N,isMountedByThisTrigger:k}=(0,d.useTriggerDataForwarding)($,O,w,{payload:y}),{getButtonProps:E,buttonRef:M}=(0,i.useButton)({disabled:b,native:x}),P=(0,c.useClick)(D,{enabled:null!=D}),T=(0,p.useOpenMethodTriggerProps)(()=>w.select("open"),e=>{w.set("openMethod",e)}),A=w.useState("triggerProps",k);return(0,n.useRenderElement)("button",e,{state:{disabled:b,open:j},ref:[M,l,N,O],props:[P.reference,A,T,{[u.CLICK_TRIGGER_IDENTIFIER]:"",id:$,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":R},v,E],stateAttributesMapping:s.triggerOpenStateMapping})});e.s(["DialogTrigger",0,g],313488)},325326,e=>{"use strict";var t=e.i(301807),a=e.i(675606),n=e.i(56434);class r{constructor(e){this.store=e??new t.DialogStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["DialogHandle",0,r,"createDialogHandle",0,function(){return new r}])},353753,e=>{"use strict";e.s([],914651),e.i(914651);var t=e.i(402820),a=e.i(156736),n=e.i(209793),r=e.i(784324),l=e.i(264951),o=e.i(271645),i=e.i(108821),s=e.i(366250),u=e.i(974217),d=e.i(77173),c=e.i(313488),p=e.i(325326);e.s(["Backdrop",()=>t.DialogBackdrop,"Close",()=>a.DialogClose,"Description",()=>n.DialogDescription,"Handle",()=>p.DialogHandle,"Popup",()=>r.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){let t=o.useContext(i.IsDrawerContext)?"drawer":"dialog";return(0,s.useRenderDialogRoot)(e,t)},"Title",()=>d.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>u.DialogViewport,"createHandle",()=>p.createDialogHandle],828376);var g=e.i(828376);e.s(["Dialog",0,g],353753)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("label",{ref:r,"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));r.displayName="Label",e.s(["Label",0,r])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),n=e.i(242064),r=e.i(529681);let l=e=>{let{prefixCls:n,className:r,style:l,size:o,shape:i}=e,s=(0,a.default)({[`${n}-lg`]:"large"===o,[`${n}-sm`]:"small"===o}),u=(0,a.default)({[`${n}-circle`]:"circle"===i,[`${n}-square`]:"square"===i,[`${n}-round`]:"round"===i}),d=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,a.default)(n,s,u,r),style:Object.assign(Object.assign({},d),l)})};e.i(296059);var o=e.i(694758),i=e.i(915654),s=e.i(246422),u=e.i(838378);let d=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),c=e=>({height:e,lineHeight:(0,i.unit)(e)}),p=e=>Object.assign({width:e},c(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},c(e)),m=e=>Object.assign({width:e},c(e)),f=(e,t,a)=>{let{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},c(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:i,controlHeight:s,controlHeightLG:u,controlHeightSM:c,gradientFromColor:x,padding:h,marginSM:y,borderRadius:C,titleHeight:v,blockRadius:S,paragraphLiHeight:w,controlHeightXS:$,paragraphMarginTop:D}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},p(u)),[`${a}-sm`]:Object.assign({},p(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:v,background:x,borderRadius:S,[`+ ${r}`]:{marginBlockStart:c}},[r]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:y,[`+ ${r}`]:{marginBlockStart:D}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:i(n).mul(2).equal(),minWidth:i(n).mul(2).equal()},b(n,i))},f(e,n,a)),{[`${a}-lg`]:Object.assign({},b(r,i))}),f(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},b(l,i))}),f(e,l,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},p(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(r)),[`${t}${t}-sm`]:Object.assign({},p(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:a},g(t,i)),[`${n}-lg`]:Object.assign({},g(r,i)),[`${n}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},m(l(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},m(a)),{maxWidth:l(a).mul(4).equal(),maxHeight:l(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
+ ${n},
+ ${r} > li,
+ ${a},
+ ${l},
+ ${o},
+ ${i}
+ `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,u.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),h=e=>{let{prefixCls:n,className:r,style:l,rows:o=0}=e,i=Array.from({length:o}).map((a,n)=>t.createElement("li",{key:n,style:{width:((e,t)=>{let{width:a,rows:n=2}=t;return Array.isArray(a)?a[e]:n-1===e?a:void 0})(n,e)}}));return t.createElement("ul",{className:(0,a.default)(n,r),style:l},i)},y=({prefixCls:e,className:n,width:r,style:l})=>t.createElement("h3",{className:(0,a.default)(e,n),style:Object.assign({width:r},l)});function C(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:r,loading:o,className:i,rootClassName:s,style:u,children:d,avatar:c=!1,title:p=!0,paragraph:g=!0,active:m,round:f}=e,{getPrefixCls:b,direction:v,className:S,style:w}=(0,n.useComponentConfig)("skeleton"),$=b("skeleton",r),[D,j,R]=x($);if(o||!("loading"in e)){let e,n,r=!!c,o=!!p,d=!!g;if(r){let a=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(c));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},a)))}if(o||d){let e,a;if(o){let a=Object.assign(Object.assign({prefixCls:`${$}-title`},!r&&d?{width:"38%"}:r&&d?{width:"50%"}:{}),C(p));e=t.createElement(y,Object.assign({},a))}if(d){let e,n=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},r&&o||(e.width="61%"),!r&&o?e.rows=3:e.rows=2,e)),C(g));a=t.createElement(h,Object.assign({},n))}n=t.createElement("div",{className:`${$}-content`},e,a)}let b=(0,a.default)($,{[`${$}-with-avatar`]:r,[`${$}-active`]:m,[`${$}-rtl`]:"rtl"===v,[`${$}-round`]:f},S,i,s,j,R);return D(t.createElement("div",{className:b,style:Object.assign(Object.assign({},w),u)},e,n))}return null!=d?d:null};v.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,block:d=!1,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:c},h))))},v.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,shape:d="circle",size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls","className"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:d,size:c},h))))},v.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,block:d,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:c},h))))},v.Image=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s}=e,{getPrefixCls:u}=t.useContext(n.ConfigContext),d=u("skeleton",r),[c,p,g]=x(d),m=(0,a.default)(d,`${d}-element`,{[`${d}-active`]:s},l,o,p,g);return c(t.createElement("div",{className:m},t.createElement("div",{className:(0,a.default)(`${d}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},v.Node=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s,children:u}=e,{getPrefixCls:d}=t.useContext(n.ConfigContext),c=d("skeleton",r),[p,g,m]=x(c),f=(0,a.default)(c,`${c}-element`,{[`${c}-active`]:s},g,l,o,m);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,a.default)(`${c}-image`,l),style:i},u)))},e.s(["default",0,v],185793)},922611,e=>{"use strict";var t=e.i(271645),a=e.i(175066);function n(){}let r=t.createContext({add:n,remove:n});e.s(["usePanelRef",0,function(e){let n=t.useContext(r),l=t.useRef(null);return(0,a.default)(t=>{if(t){let a=e?t.querySelector(e):t;a&&(n.add(a),l.current=a)}else n.remove(l.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let a=(e,t=0,a=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let r={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",r);let l=e<0?"-":"",o=Math.abs(e),i=o,s="";return o>=1e6?(i=o/1e6,s="M"):o>=1e3&&(i=o/1e3,s="K"),`${l}${i.toLocaleString("en-US",r)}${s}`},n=async(e,a="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return r(e,a);try{return await navigator.clipboard.writeText(e),t.default.success(a),!0}catch(t){return console.error("Clipboard API failed: ",t),r(e,a)}},r=(e,a)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let r=document.execCommand("copy");if(document.body.removeChild(n),r)return t.default.success(a),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,n,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let n=a(e,t,!1,!1);if(0===Number(n.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${n}`},"updateExistingKeys",0,function(e,t){let a=structuredClone(e);for(let[e,n]of Object.entries(t))e in a&&(a[e]=n);return a}])},112179,581070,e=>{"use strict";var t=e.i(843476),a=e.i(487486),n=e.i(115504),r=e.i(746798);function l({content:e,trigger:a}){return(0,t.jsx)(r.TooltipProvider,{delay:300,children:(0,t.jsxs)(r.Tooltip,{children:[(0,t.jsx)(r.TooltipTrigger,{render:a}),(0,t.jsx)(r.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,l],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:r,tooltip:i,dataTestId:s}){let u=(0,t.jsx)(a.Badge,{variant:"outline","data-testid":s,className:(0,n.cn)("whitespace-nowrap font-normal",o[e]),children:r});return i?(0,t.jsx)(l,{content:i,trigger:u}):u}],112179)},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),n=e.i(912598),r=e.i(243652),l=e.i(602869),o=e.i(135214);let i=(0,r.createQueryKeys)("models"),s=(0,r.createQueryKeys)("modelHub"),u=(0,r.createQueryKeys)("allProxyModels");(0,r.createQueryKeys)("selectedTeamModels");let d=(0,r.createQueryKeys)("infiniteModels"),c=(0,r.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),m=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),f=e=>e.filter(g),b=async(e,t,a)=>{let n=await (0,l.modelInfoCall)(e,t,a,1,1e3),r=n?.total_pages??1;return[n,...await Promise.all(Array.from({length:Math.max(0,r-1)},(n,r)=>(0,l.modelInfoCall)(e,t,a,r+2,1e3)))].flatMap(e=>e?.data??[])},x=(e,t)=>i.list({filters:{scope:"autoRouters",...e&&{userId:e},...t&&{userRole:t}}});e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,a,n,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&n)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)(),{data:r}=(0,t.useQuery)({queryKey:x(a,n),queryFn:async()=>await b(e,a,n),enabled:!!(e&&a&&n),select:m});return r??p},"useAutoRouters",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:x(a,n),queryFn:async()=>await b(e,a,n),enabled:!!(e&&a&&n),select:f})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:n,userId:r,userRole:i}=(0,o.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...r&&{userId:r},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,l.modelInfoCall)(n,r,i,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let e=(0,n.useQueryClient)();return async()=>{await e.invalidateQueries({queryKey:i.lists()})}},"useModelHub",0,()=>{let{accessToken:e}=(0,o.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,n,r,s,u,d,c=!1)=>{let{accessToken:p,userId:g,userRole:m}=(0,o.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...g&&{userId:g},...m&&{userRole:m},page:e,size:a,...n&&{search:n},...r&&{modelId:r},...s&&{teamId:s},...u&&{sortBy:u},...d&&{sortOrder:d},...c&&{excludeAutoRouters:"true"}}}),queryFn:async()=>await (0,l.modelInfoCall)(p,g,m,e,a,n,r,s,u,d,c),enabled:!!(p&&g&&m)})},"useUserModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:c.list({}),queryFn:async()=>(await (0,l.modelAvailableCall)(e,a,n)).data.map(e=>e.id),enabled:!!(e&&a&&n)})}])},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(199931),r=e.i(625901),l=e.i(487486),o=e.i(115504);let i=new Set,s=(0,a.createContext)(i);function u(e){let t=(0,a.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:a}){return(0,t.jsx)(n.Waypoints,{size:e,className:a,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let a=(0,r.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:a,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:a}){return u(e)?(0,t.jsxs)(l.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",a),children:[(0,t.jsx)(n.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,u],548151);var d=e.i(581070);let c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${c[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${c[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:a="datetime",fallback:n="-"}){let r,l,o,i=e?new Date(e):null;return!i||Number.isNaN(i.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:n}):(0,t.jsx)(d.CellTooltip,{content:(r=Intl.DateTimeFormat().resolvedOptions().timeZone,l=`${c[i.getMonth()]} ${i.getDate()}, ${i.getFullYear()}`,o=`${p(i.getHours())}:${p(i.getMinutes())}:${p(i.getSeconds())}`,`${l}, ${o} (${r})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(i,a)})})},"formatCellDate",0,g],200208);var m=e.i(174886),f=e.i(500330);let b={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:a="pill",onClick:n,copyable:r=!1,truncate:l=!0,fallback:i="-",tooltip:s,disabled:u=!1,dataTestId:c,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:i});let g=!!n&&!u,x=(0,o.cn)(b[a].base,g&&b[a].clickable,l&&"block max-w-[15ch] truncate",u&&"opacity-50",p),h=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":c,onClick:()=>n(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":c,children:e}),y=(0,t.jsx)(d.CellTooltip,{content:s??e,trigger:h});return r?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[y,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,f.copyToClipboard)(e)},children:(0,t.jsx)(m.Copy,{className:"size-3"})})]}):y}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:a,badge:n,onClick:r,className:l,titleClassName:i}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",i),children:e}),(null!=a&&""!==a||null!=n)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=a&&""!==a&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:a}),n]})]});return null!=r?(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",l),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",l),children:s})}],997422);let h={hasModelAccess:!1,label:"Management"},y={hasModelAccess:!1,label:"Read-only"},C={hasModelAccess:!1,label:"SCIM"},v={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),w=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?h:"read_only"===t?y:Array.isArray(e)&&0!==e.length?e.every(S)?C:w(e,"management_routes")?h:w(e,"info_routes")?y:v:v],146512)},355619,e=>{"use strict";var t=e.i(602869);let a=async(e,a,n)=>{try{if(null===e||null===a)return;if(null!==n){let r=(await (0,t.modelAvailableCall)(n,e,a,!0,null,!0)).data.map(e=>e.id),l=[],o=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):o.push(e)}),[...l,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,a,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let a=[],n=[];return e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));n.push(...l),a.push(e)}else n.push(e)}),[...a,...n].filter((e,t,a)=>a.indexOf(e)===t)}])},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var a=e.i(843476),n=e.i(146512),r=e.i(355619),l=e.i(487486);let o="all-proxy-models",i=e=>{if(e===o)return"All Proxy Models";let t=(0,r.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:r=3,allowedRoutes:s,keyType:u}){if(!Array.isArray(e)||0===e.length){let e=(0,n.deriveKeyModelScope)(s,u);return e.hasModelAccess?(0,a.jsx)(l.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,a.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,a.jsx)(l.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let d=e.slice(0,r),c=e.slice(r);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[d.map((e,t)=>(0,a.jsx)(l.Badge,{variant:e===o?"secondary":"outline",children:i(e)},t)),c.length>0&&(0,a.jsx)(t.CellTooltip,{content:(0,a.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:c.map((e,t)=>(0,a.jsx)("span",{children:i(e)},t))}),trigger:(0,a.jsxs)(l.Badge,{variant:"outline",className:"cursor-default",children:["+",c.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:n="-",showZero:r=!1}){return null==e||Number.isNaN(e)?(0,a.jsx)("span",{className:"text-muted-foreground",children:n}):0===e?r?(0,a.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,a.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var u=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:n}){let r="number"!=typeof e||Number.isNaN(e)?0:e,l=t??n??null,o=null==t&&null!=n,i="number"==typeof l&&l>0,d=i?r/l*100:0,c=r>0?(0,s.getSpendString)(r,4):"$0.00",p=null===l?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(l)}${o?" (Team)":""}`;return(0,a.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,a.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,a.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:c})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:p})]}),i&&(0,a.jsx)(u.Meter,{value:r,max:l,"aria-valuetext":`${c} of $${(0,s.formatNumberWithCommas)(l)}`,children:(0,a.jsx)(u.MeterTrack,{children:(0,a.jsx)(u.MeterIndicator,{tone:d>100?"over":d>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)},233565,e=>{"use strict";var t=e.i(246349);e.s(["ChevronRightIcon",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/08goggic_ad66.js b/litellm/proxy/_experimental/out/_next/static/chunks/08goggic_ad66.js
deleted file mode 100644
index e15232235db..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/08goggic_ad66.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233538,e=>{"use strict";e.s(["isDisabledReactIssue7711",0,function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let i=(null==t?void 0:t.getAttribute("disabled"))==="";return!(i&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&i}])},83733,233137,e=>{"use strict";let t,n;var i,s,r=e.i(247167),a=e.i(271645),l=e.i(544508),o=e.i(746725),d=e.i(835696);void 0!==r.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(i=null==r.default?void 0:r.default.env)?void 0:i.NODE_ENV)==="test"&&void 0===(null==(s=null==Element?void 0:Element.prototype)?void 0:s.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
-`)),[]});var u=((t=u||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);e.s(["transitionDataAttributes",0,function(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t},"useTransition",0,function(e,t,n,i){let[s,r]=(0,a.useState)(n),{hasFlag:u,addFlag:c,removeFlag:h}=function(e=0){let[t,n]=(0,a.useState)(e),i=(0,a.useCallback)(e=>n(e),[t]),s=(0,a.useCallback)(e=>n(t=>t|e),[t]),r=(0,a.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:i,addFlag:s,hasFlag:r,removeFlag:(0,a.useCallback)(e=>n(t=>t&~e),[n]),toggleFlag:(0,a.useCallback)(e=>n(t=>t^e),[n])}}(e&&s?3:0),m=(0,a.useRef)(!1),f=(0,a.useRef)(!1),p=(0,o.useDisposables)();return(0,d.useIsoMorphicEffect)(()=>{var s;if(e){if(n&&r(!0),!t){n&&c(3);return}return null==(s=null==i?void 0:i.start)||s.call(i,n),function(e,{prepare:t,run:n,done:i,inFlight:s}){let r=(0,l.disposables)();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return n();let i=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=i}(e,{prepare:t,inFlight:s}),r.nextFrame(()=>{n(),r.requestAnimationFrame(()=>{r.add(function(e,t){var n,i;let s=(0,l.disposables)();if(!e)return s.dispose;let r=!1;s.add(()=>{r=!0});let a=null!=(i=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?i:[];return 0===a.length?t():Promise.allSettled(a.map(e=>e.finished)).then(()=>{r||t()}),s.dispose}(e,i))})}),r.dispose}(t,{inFlight:m,prepare(){f.current?f.current=!1:f.current=m.current,m.current=!0,f.current||(n?(c(3),h(4)):(c(4),h(2)))},run(){f.current?n?(h(3),c(4)):(h(4),c(3)):n?h(1):c(1)},done(){var e;f.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(m.current=!1,h(7),n||r(!1),null==(e=null==i?void 0:i.end)||e.call(i,n))}})}},[e,n,t,p]),e?[s,{closed:u(1),enter:u(2),leave:u(4),transition:u(2)||u(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}],83733);let c=(0,a.createContext)(null);c.displayName="OpenClosedContext";var h=((n=h||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);e.s(["OpenClosedProvider",0,function({value:e,children:t}){return a.default.createElement(c.Provider,{value:e},t)},"ResetOpenClosedProvider",0,function({children:e}){return a.default.createElement(c.Provider,{value:null},e)},"State",0,h,"useOpenClosed",0,function(){return(0,a.useContext)(c)}],233137)},677667,674175,886148,543086,e=>{"use strict";let t,n;var i,s=e.i(290571),r=e.i(783222),a=e.i(433336),l=e.i(271645),o=e.i(394487),d=e.i(914189),u=e.i(144279),c=e.i(294316),h=e.i(83733);let m=(0,l.createContext)(()=>{});function f({value:e,children:t}){return l.default.createElement(m.Provider,{value:e},t)}e.s(["CloseProvider",0,f],674175);var p=e.i(233137),g=e.i(233538),v=e.i(397701),x=e.i(402155),b=e.i(700020);let y=null!=(i=l.default.startTransition)?i:function(e){e()};var _=e.i(998348),j=((t=j||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),E=((n=E||{})[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.SetButtonElement=4]="SetButtonElement",n[n.SetPanelElement=5]="SetPanelElement",n);let w={0:e=>({...e,disclosureState:(0,v.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},C=(0,l.createContext)(null);function k(e){let t=(0,l.useContext)(C);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,k),t}return t}C.displayName="DisclosureContext";let S=(0,l.createContext)(null);S.displayName="DisclosureAPIContext";let T=(0,l.createContext)(null);function N(e,t){return(0,v.match)(t.type,w,e,t)}T.displayName="DisclosurePanelContext";let O=l.Fragment,I=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,R=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:n=!1,...i}=e,s=(0,l.useRef)(null),r=(0,c.useSyncRefs)(t,(0,c.optionalRef)(e=>{s.current=e},void 0===e.as||e.as===l.Fragment)),a=(0,l.useReducer)(N,{disclosureState:+!n,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:u},h]=a,m=(0,d.useEvent)(e=>{h({type:1});let t=(0,x.getOwnerDocument)(s);if(!t||!u)return;let n=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(u):t.getElementById(u);null==n||n.focus()}),g=(0,l.useMemo)(()=>({close:m}),[m]),y=(0,l.useMemo)(()=>({open:0===o,close:m}),[o,m]),_=(0,b.useRender)();return l.default.createElement(C.Provider,{value:a},l.default.createElement(S.Provider,{value:g},l.default.createElement(f,{value:m},l.default.createElement(p.OpenClosedProvider,{value:(0,v.match)(o,{0:p.State.Open,1:p.State.Closed})},_({ourProps:{ref:r},theirProps:i,slot:y,defaultTag:O,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:i=`headlessui-disclosure-button-${n}`,disabled:s=!1,autoFocus:h=!1,...m}=e,[f,p]=k("Disclosure.Button"),v=(0,l.useContext)(T),x=null!==v&&v===f.panelId,y=(0,l.useRef)(null),j=(0,c.useSyncRefs)(y,t,(0,d.useEvent)(e=>{if(!x)return p({type:4,element:e})}));(0,l.useEffect)(()=>{if(!x)return p({type:2,buttonId:i}),()=>{p({type:2,buttonId:null})}},[i,p,x]);let E=(0,d.useEvent)(e=>{var t;if(x){if(1===f.disclosureState)return;switch(e.key){case _.Keys.Space:case _.Keys.Enter:e.preventDefault(),e.stopPropagation(),p({type:0}),null==(t=f.buttonElement)||t.focus()}}else switch(e.key){case _.Keys.Space:case _.Keys.Enter:e.preventDefault(),e.stopPropagation(),p({type:0})}}),w=(0,d.useEvent)(e=>{e.key===_.Keys.Space&&e.preventDefault()}),C=(0,d.useEvent)(e=>{var t;(0,g.isDisabledReactIssue7711)(e.currentTarget)||s||(x?(p({type:0}),null==(t=f.buttonElement)||t.focus()):p({type:0}))}),{isFocusVisible:S,focusProps:N}=(0,r.useFocusRing)({autoFocus:h}),{isHovered:O,hoverProps:I}=(0,a.useHover)({isDisabled:s}),{pressed:R,pressProps:P}=(0,o.useActivePress)({disabled:s}),L=(0,l.useMemo)(()=>({open:0===f.disclosureState,hover:O,active:R,disabled:s,focus:S,autofocus:h}),[f,O,R,S,s,h]),D=(0,u.useResolveButtonType)(e,f.buttonElement),A=x?(0,b.mergeProps)({ref:j,type:D,disabled:s||void 0,autoFocus:h,onKeyDown:E,onClick:C},N,I,P):(0,b.mergeProps)({ref:j,id:i,type:D,"aria-expanded":0===f.disclosureState,"aria-controls":f.panelElement?f.panelId:void 0,disabled:s||void 0,autoFocus:h,onKeyDown:E,onKeyUp:w,onClick:C},N,I,P);return(0,b.useRender)()({ourProps:A,theirProps:m,slot:L,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:i=`headlessui-disclosure-panel-${n}`,transition:s=!1,...r}=e,[a,o]=k("Disclosure.Panel"),{close:u}=function e(t){let n=(0,l.useContext)(S);if(null===n){let n=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}return n}("Disclosure.Panel"),[m,f]=(0,l.useState)(null),g=(0,c.useSyncRefs)(t,(0,d.useEvent)(e=>{y(()=>o({type:5,element:e}))}),f);(0,l.useEffect)(()=>(o({type:3,panelId:i}),()=>{o({type:3,panelId:null})}),[i,o]);let v=(0,p.useOpenClosed)(),[x,_]=(0,h.useTransition)(s,m,null!==v?(v&p.State.Open)===p.State.Open:0===a.disclosureState),j=(0,l.useMemo)(()=>({open:0===a.disclosureState,close:u}),[a.disclosureState,u]),E={ref:g,id:i,...(0,h.transitionDataAttributes)(_)},w=(0,b.useRender)();return l.default.createElement(p.ResetOpenClosedProvider,null,l.default.createElement(T.Provider,{value:a.panelId},w({ourProps:E,theirProps:r,slot:j,defaultTag:"div",features:I,visible:x,name:"Disclosure.Panel"})))})});e.s(["Disclosure",0,R],886148);let P=(0,l.createContext)(void 0);var L=e.i(444755);let D=(0,e.i(673706).makeClassName)("Accordion"),A=(0,l.createContext)({isOpen:!1}),F=l.default.forwardRef((e,t)=>{var n;let{defaultOpen:i=!1,children:r,className:a}=e,o=(0,s.__rest)(e,["defaultOpen","children","className"]),d=null!=(n=(0,l.useContext)(P))?n:(0,L.tremorTwMerge)("rounded-tremor-default border");return l.default.createElement(R,Object.assign({as:"div",ref:t,className:(0,L.tremorTwMerge)(D("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,a),defaultOpen:i},o),({open:e})=>l.default.createElement(A.Provider,{value:{isOpen:e}},r))});F.displayName="Accordion",e.s(["OpenContext",0,A,"default",0,F],543086),e.s(["Accordion",0,F],677667)},130643,e=>{"use strict";var t=e.i(290571),n=e.i(271645),i=e.i(886148),s=e.i(444755);let r=(0,e.i(673706).makeClassName)("AccordionBody"),a=n.default.forwardRef((e,a)=>{let{children:l,className:o}=e,d=(0,t.__rest)(e,["children","className"]);return n.default.createElement(i.Disclosure.Panel,Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},d),l)});a.displayName="AccordionBody",e.s(["AccordionBody",0,a],130643)},898667,e=>{"use strict";var t=e.i(290571),n=e.i(271645),i=e.i(886148);let s=e=>{var i=(0,t.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},i),n.default.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 r=e.i(543086),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("AccordionHeader"),o=n.default.forwardRef((e,o)=>{let{children:d,className:u}=e,c=(0,t.__rest)(e,["children","className"]),{isOpen:h}=(0,n.useContext)(r.OpenContext);return n.default.createElement(i.Disclosure.Button,Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",u)},c),n.default.createElement("div",{className:(0,a.tremorTwMerge)(l("children"),"flex flex-1 text-inherit mr-4")},d),n.default.createElement("div",null,n.default.createElement(s,{className:(0,a.tremorTwMerge)(l("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",h?"transition-all":"transition-all -rotate-180")})))});o.displayName="AccordionHeader",e.s(["AccordionHeader",0,o],898667)},743151,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=a(e.r(844343)),s=a(e.r(271645)),r=["text","onCopy","options","children"];function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="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 o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function d(e){for(var t=1;t{"use strict";var i=e.r(743151).CopyToClipboard;i.CopyToClipboard=i,t.exports=i},285027,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var s=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(s.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["WarningOutlined",0,r],285027)},540626,e=>{"use strict";let t;var n,i=e.i(271645);let s=(0,i.createContext)(null);function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=a(e);if(n.length!==a(t).length)return!1;for(let i=0;ie,n){let s=n?.compare??o,r=(0,i.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,i.useCallback)(()=>e.get(),[e]);return(0,l.useSyncExternalStoreWithSelector)(r,a,a,t,s)}function u(e,...t){return"function"==typeof e?e(...t):e}var c=class{#e=!0;#t;#n;#i;#s;#r;#a;#l;#o=0;#d=5;#u=!1;#c=!1;#h=null;#m=()=>{this.debugLog("Connected to event bus"),this.#r=!0,this.#u=!1,this.debugLog("Emitting queued events",this.#s),this.#s.forEach(e=>this.emitEventToBus(e)),this.#s=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#m)};#f=()=>{if(this.#o{this.#u||(this.#u=!0,this.#n().addEventListener("tanstack-connect-success",this.#m),this.#f())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:i=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#i=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#s=[],this.#r=!1,this.#c=!1,this.#a=null,this.#l=i}startConnectLoop(){null!==this.#a||this.#r||(this.debugLog(`Starting connect loop (every ${this.#l}ms)`),this.#a=setInterval(this.#f,this.#l))}stopConnectLoop(){this.#u=!1,null!==this.#a&&(clearInterval(this.#a),this.#a=null,this.#s=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#i&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#h&&(this.debugLog("Emitting event to internal event target",e,t),this.#h.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#c)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#r){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#s.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#u&&(this.#p(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let i=n?.withEventTarget??!1,s=`${this.#t}:${e}`;if(i&&(this.#h||(this.#h=new EventTarget),this.#h.addEventListener(s,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",s),()=>{};let r=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(s,r),this.debugLog("Registered event to bus",s),()=>{i&&this.#h?.removeEventListener(s,r),this.#n().removeEventListener(s,r)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let h=new Map;function m(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let f=new class extends c{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}},p=((n={})[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n);function g(e,t,n){let i="object"==typeof e,s=i?e:void 0;return{next:(i?e.next:e)?.bind(s),error:(i?e.error:t)?.bind(s),complete:(i?e.complete:n)?.bind(s)}}let v=[],x=0,{link:b,unlink:y,propagate:_,checkDirty:j,shallowPropagate:E}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let i=t.depsTail;if(void 0!==i&&i.dep===e)return;let s=void 0!==i?i.nextDep:t.deps;if(void 0!==s&&s.dep===e){s.version=n,t.depsTail=s;return}let r=e.subsTail;if(void 0!==r&&r.version===n&&r.sub===t)return;let a=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:i,nextDep:s,prevSub:r,nextSub:void 0};void 0!==s&&(s.prevDep=a),void 0!==i?i.nextDep=a:t.deps=a,void 0!==r?r.nextSub=a:e.subs=a},unlink:function(e,t=e.sub){let i=e.dep,s=e.prevDep,r=e.nextDep,a=e.nextSub,l=e.prevSub;return void 0!==r?r.prevDep=s:t.depsTail=s,void 0!==s?s.nextDep=r:t.deps=r,void 0!==a?a.prevSub=l:i.subsTail=l,void 0!==l?l.nextSub=a:void 0===(i.subs=a)&&n(i),r},propagate:function(e){let n,i=e.nextSub;e:for(;;){let s=e.sub,r=s.flags;if(r&(p.RecursedCheck|p.Recursed|p.Dirty|p.Pending)?r&(p.RecursedCheck|p.Recursed)?r&p.RecursedCheck?!(r&(p.Dirty|p.Pending))&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,s)?(s.flags=r|(p.Recursed|p.Pending),r&=p.Mutable):r=p.None:s.flags=r&~p.Recursed|p.Pending:r=p.None:s.flags=r|p.Pending,r&p.Watching&&t(s),r&p.Mutable){let t=s.subs;if(void 0!==t){let s=(e=t).nextSub;void 0!==s&&(n={value:i,prev:n},i=s);continue}}if(void 0!==(e=i)){i=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){i=e.nextSub;continue e}break}},checkDirty:function(t,n){let s,r=0,a=!1;e:for(;;){let l=t.dep,o=l.flags;if(n.flags&p.Dirty)a=!0;else if((o&(p.Mutable|p.Dirty))==(p.Mutable|p.Dirty)){if(e(l)){let e=l.subs;void 0!==e.nextSub&&i(e),a=!0}}else if((o&(p.Mutable|p.Pending))==(p.Mutable|p.Pending)){(void 0!==t.nextSub||void 0!==t.prevSub)&&(s={value:t,prev:s}),t=l.deps,n=l,++r;continue}if(!a){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;r--;){let r=n.subs,l=void 0!==r.nextSub;if(l?(t=s.value,s=s.prev):t=r,a){if(e(n)){l&&i(r),n=t.sub;continue}a=!1}else n.flags&=~p.Pending;n=t.sub;let o=t.nextDep;if(void 0!==o){t=o;continue e}}return a}},shallowPropagate:i};function i(e){do{let n=e.sub,i=n.flags;(i&(p.Pending|p.Dirty))===p.Pending&&(n.flags=i|p.Dirty,(i&(p.Watching|p.RecursedCheck))===p.Watching&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){v[C++]=e,e.flags&=~p.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=p.Mutable|p.Dirty,k(e))}}),w=0,C=0;function k(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=y(n,e)}var S=class{constructor(e,n){this.atom=function(e){let n="function"==typeof e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?p.None:p.Mutable,get:()=>(void 0!==t&&b(i,t,x),i._snapshot),subscribe(e){var n;let s,r,a=g(e),l={current:!1},o=(n=()=>{i.get(),l.current?a.next?.(i._snapshot):l.current=!0},s=()=>{let e=t;t=r,++x,r.depsTail=void 0,r.flags=p.Watching|p.RecursedCheck;try{return n()}finally{t=e,r.flags&=~p.RecursedCheck,k(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:p.Watching|p.RecursedCheck,notify(){let e=this.flags;e&p.Dirty||e&p.Pending&&j(this.deps,this)?s():this.flags=p.Watching},stop(){this.flags=p.None,this.depsTail=void 0,k(this)}},s(),r);return{unsubscribe:()=>{o.stop()}}},_update(s){let r=t,a=(void 0)??Object.is;if(n)t=i,++x,i.depsTail=void 0;else if(void 0===s)return!1;n&&(i.flags=p.Mutable|p.RecursedCheck);try{let t=i._snapshot,r="function"==typeof s?s(t):void 0===s&&n?e(t):s;if(void 0===t||!a(t,r))return i._snapshot=r,!0;return!1}finally{t=r,n&&(i.flags&=~p.RecursedCheck),k(i)}}};return n?(i.flags=p.Mutable|p.Dirty,i.get=function(){let e=i.flags;if(e&p.Dirty||e&p.Pending&&j(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&E(e)}}else e&p.Pending&&(i.flags=e&~p.Pending);return void 0!==t&&b(i,t,x),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;if(void 0!==e&&(_(e),E(e),1)){for(;w{this.options={...this.options,...e},this.#v()||this.cancel()},this.#x=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:i}=n;return{...n,status:this.#v()?i?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;if(n){var i,s;h.set(n,t),f.emit(e,{key:(i={...t,key:n}).key,store:{state:m("function"==typeof(s=i.store).get?s.get():s.state)},options:m(i.options)})}})("Debouncer",this)},this.#v=()=>!!u(this.options.enabled,this),this.#b=()=>u(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#v())return;this.#x({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#x({canLeadingExecute:!1}),t=!0,this.#y(...e)),this.options.trailing&&this.#x({isPending:!0,lastArgs:e}),this.#g&&clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#x({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#y(...e)},this.#b())},this.#y=(...e)=>{this.#v()&&(this.fn(...e),this.#x({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#_(),this.#y(...this.store.state.lastArgs))},this.#_=()=>{this.#g&&(clearTimeout(this.#g),this.#g=void 0)},this.cancel=()=>{this.#_(),this.#x({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#x(T())},this.key=t.key,this.options={...N,...t},this.#x(this.options.initialState??{}),this.key&&f.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#x(e.payload.store.state),this.setOptions(e.payload.options))})}#x;#v;#b;#y;#_};e.s(["useDebouncer",0,function(e,t,n=()=>({})){let a={...((0,i.useContext)(s)?.defaultOptions??{}).debouncer,...t},[l]=(0,i.useState)(()=>{let t=new O(e,a);return t.Subscribe=function(e){let n=d(t.store,e.selector,{compare:r});return"function"==typeof e.children?e.children(n):e.children},t});l.fn=e,l.setOptions(a),(0,i.useEffect)(()=>()=>{a.onUnmount?a.onUnmount(l):l.cancel()},[]);let o=d(l.store,n,{compare:r});return(0,i.useMemo)(()=>({...l,state:o}),[l,o])}],540626)},741466,e=>{"use strict";e.s(["DEBOUNCE_WAIT_MS",0,300])},399029,e=>{"use strict";var t=e.i(540626),n=e.i(271645);e.s(["useDebouncedState",0,function(e,i,s){let[r,a]=(0,n.useState)(e),l=(0,t.useDebouncer)(a,i,s);return[r,l.maybeExecute,l]}])},663435,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(199133),s=e.i(898586),r=e.i(56456),a=e.i(399029),l=e.i(785242),o=e.i(741466);let{Text:d}=s.Typography;e.s(["default",0,({value:e,onChange:s,onTeamSelect:u,disabled:c,organizationId:h,pageSize:m=20})=>{let[f,p]=(0,n.useState)(""),[g,v]=(0,a.useDebouncedState)("",{wait:o.DEBOUNCE_WAIT_MS}),{data:x,fetchNextPage:b,hasNextPage:y,isFetchingNextPage:_,isLoading:j}=(0,l.useInfiniteTeams)(m,g||void 0,h),E=(0,n.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let n of x.pages)for(let i of n.teams)e.has(i.team_id)||(e.add(i.team_id),t.push(i));return t},[x]);return(0,t.jsx)(i.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{s?.(e??""),u&&u(e?E.find(t=>t.team_id===e)??null:null)},disabled:c,allowClear:!0,filterOption:!1,onSearch:e=>{p(e),v(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&y&&!_&&b()},loading:j,notFoundContent:j?(0,t.jsx)(r.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(r.LoadingOutlined,{spin:!0})})]}),children:E.map(e=>(0,t.jsxs)(i.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(d,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},59935,(e,t,n)=>{var i;let s;e.e,i=function e(){var t,n="u">typeof self?self:"u">typeof window?window:void 0!==n?n:{},i=!n.document&&!!n.postMessage,s=n.IS_PAPA_WORKER||!1,r={},a=0,l={};function o(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 m(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var i=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,s)n.postMessage({results:r,workerId:l.WORKER_ID,finished:i});else if(_(this._config.chunk)&&!t){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!i||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),i||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):s&&this._config.error&&n.postMessage({workerId:l.WORKER_ID,error:e,finished:!1})}}function d(e){var t;(e=e||{}).chunkSize||(e.chunkSize=l.RemoteChunkSize),o.call(this,e),this._nextChunk=i?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),i||(t.onload=y(this._chunkLoaded,this),t.onerror=y(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var e,n,s=this._config.downloadRequestHeaders;for(n in s)t.setRequestHeader(n,s[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)}i&&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),o.call(this,e);var t,n,i="u">typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=y(this._chunkLoaded,this),t.onerror=y(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 c(e){var t;o.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 h(e){o.call(this,e=e||{});var t=[],n=!0,i=!1;this.pause=function(){o.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){o.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(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=y(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=y(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=y(function(){this._streamCleanUp(),i=!0,this._streamData("")},this),this._streamCleanUp=y(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(e){var t,n,i,s,r=/^\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)))$/,o=this,d=0,u=0,c=!1,h=!1,m=[],g={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function x(){if(g&&i&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!v(e)})),y()){if(g)if(Array.isArray(g.data[0])){for(var t,n=0;y()&&n(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&((e=>{if(r.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(n)?parseFloat(n):a.test(n)?new Date(n):""===n?null:n):n)(l=e.header?s>=m.length?"__parsed_extra":m[s]:l,o=e.transform?e.transform(o,l):o);"__parsed_extra"===l?(i[l]=i[l]||[],i[l].push(o)):i[l]=o}return e.header&&(s>m.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+s,u+n):se.preview?n.abort():(g.data=g.data[0],s(g,o))))}),this.parse=function(s,r,a){var o=e.quoteChar||'"',o=(e.newline||(e.newline=this.guessLineEndings(s,o)),i=!1,e.delimiter?_(e.delimiter)&&(e.delimiter=e.delimiter(s),g.meta.delimiter=e.delimiter):((o=((t,n,i,s,r)=>{var a,o,d,u;r=r||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var c=0;c=n.length/2?"\r\n":"\r"}}function f(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(e){var t=(e=e||{}).delimiter,n=e.newline,i=e.comments,s=e.step,r=e.preview,a=e.fastMode,o=null,d=!1,u=null==e.quoteChar?'"':e.quoteChar,c=u;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof t||-1=r)return M(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:h}),R++}}else if(i&&0===C.length&&l.substring(h,h+y)===i){if(-1===O)return M();h=O+b,O=l.indexOf(n,h),N=l.indexOf(t,h)}else if(-1!==N&&(N=r)return M(!0)}return A();function L(e){E.push(e),k=h}function D(e){return -1!==e&&(e=l.substring(R+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=l.substring(h)),C.push(e),h=v,L(C),j&&B()),M()}function F(e){h=e,L(C),C=[],O=l.indexOf(n,h)}function M(i){if(e.header&&!p&&E.length&&!d){var s=E[0],r=Object.create(null),a=new Set(s);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||(s=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||(d=t.skipEmptyLines),"string"==typeof t.newline&&(r=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(o=t.escapeChar+a),t.escapeFormulae instanceof RegExp?c=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(c=/^[=+\-@\t\r].*$/)}})(),RegExp(f(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return m(null,e,d);if("object"==typeof e[0])return m(u||Object.keys(e[0]),e,d)}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])),m(e.fields||[],e.data||[],d);throw Error("Unable to serialize unrecognized input");function m(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{"use strict";var t=e.i(271645),n=e.i(914189);e.s(["useControllable",0,function(e,i,s){let[r,a]=(0,t.useState)(s),l=void 0!==e,o=(0,t.useRef)(l),d=(0,t.useRef)(!1),u=(0,t.useRef)(!1);return!l||o.current||d.current?l||!o.current||u.current||(u.current=!0,o.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(d.current=!0,o.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:r,(0,n.useEvent)(e=>(l||a(e),null==i?void 0:i(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[n]=(0,t.useState)(e);return n}],214520);let i=(0,t.createContext)(void 0);function s(){return(0,t.useContext)(i)}e.s(["useDisabled",0,s],601893);var r=e.i(174080),a=e.i(746725);function l(e={},t=null,n=[]){for(let[i,s]of Object.entries(e))!function e(t,n,i){if(Array.isArray(i))for(let[s,r]of i.entries())e(t,o(n,s.toString()),r);else i instanceof Date?t.push([n,i.toISOString()]):"boolean"==typeof i?t.push([n,i?"1":"0"]):"string"==typeof i?t.push([n,i]):"number"==typeof i?t.push([n,`${i}`]):null==i?t.push([n,""]):l(i,n,t)}(n,o(t,i),s);return n}function o(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,n;let i=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(i){for(let t of i.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=i.requestSubmit)||n.call(i)}},"objectToFormEntries",0,l],694421);var d=e.i(700020),u=e.i(2788);let c=(0,t.createContext)(null);function h({children:e}){let n=(0,t.useContext)(c);if(!n)return t.default.createElement(t.default.Fragment,null,e);let{target:i}=n;return i?(0,r.createPortal)(t.default.createElement(t.default.Fragment,null,e),i):null}function m({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(u.Hidden,{features:u.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",0,function({data:e,form:n,disabled:i,onReset:s,overrides:r}){let[o,c]=(0,t.useState)(null),f=(0,a.useDisposables)();return(0,t.useEffect)(()=>{if(s&&o)return f.addEventListener(o,"reset",s)},[o,n,s]),t.default.createElement(h,null,t.default.createElement(m,{setForm:c,formId:n}),l(e).map(([e,s])=>t.default.createElement(u.Hidden,{features:u.HiddenFeatures.Hidden,...(0,d.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:i,name:e,value:s,...r})})))}],140721);let f=(0,t.createContext)(void 0);function p(){return(0,t.useContext)(f)}e.s(["useProvidedId",0,p],942803);var g=e.i(835696),v=e.i(294316);let x=(0,t.createContext)(null);x.displayName="DescriptionContext";let b=Object.assign((0,d.forwardRefWithAs)(function(e,n){let i=(0,t.useId)(),r=s(),{id:a=`headlessui-description-${i}`,...l}=e,o=function e(){let n=(0,t.useContext)(x);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),u=(0,v.useSyncRefs)(n);(0,g.useIsoMorphicEffect)(()=>o.register(a),[a,o.register]);let c=r||!1,h=(0,t.useMemo)(()=>({...o.slot,disabled:c}),[o.slot,c]),m={ref:u,...o.props,id:a};return(0,d.useRender)()({ourProps:m,theirProps:l,slot:h,defaultTag:"p",name:o.name||"Description"})}),{});e.s(["Description",0,b,"useDescribedBy",0,function(){var e,n;return null!=(n=null==(e=(0,t.useContext)(x))?void 0:e.value)?n:void 0},"useDescriptions",0,function(){let[e,i]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let s=(0,n.useEvent)(e=>(i(t=>[...t,e]),()=>i(t=>{let n=t.slice(),i=n.indexOf(e);return -1!==i&&n.splice(i,1),n}))),r=(0,t.useMemo)(()=>({register:s,slot:e.slot,name:e.name,props:e.props,value:e.value}),[s,e.slot,e.name,e.props,e.value]);return t.default.createElement(x.Provider,{value:r},e.children)},[i])]}],35889);let y=(0,t.createContext)(null);function _(e){var n,i,s;let r=null!=(i=null==(n=(0,t.useContext)(y))?void 0:n.value)?i:void 0;return(null!=(s=null==e?void 0:e.length)?s:0)>0?[r,...e].filter(Boolean).join(" "):r}y.displayName="LabelContext";let j=Object.assign((0,d.forwardRefWithAs)(function(e,i){var r;let a=(0,t.useId)(),l=function e(){let n=(0,t.useContext)(y);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),o=p(),u=s(),{id:c=`headlessui-label-${a}`,htmlFor:h=null!=o?o:null==(r=l.props)?void 0:r.htmlFor,passive:m=!1,...f}=e,x=(0,v.useSyncRefs)(i);(0,g.useIsoMorphicEffect)(()=>l.register(c),[c,l.register]);let b=(0,n.useEvent)(e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),l.props&&"onClick"in l.props&&"function"==typeof l.props.onClick&&l.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),_=u||!1,j=(0,t.useMemo)(()=>({...l.slot,disabled:_}),[l.slot,_]),E={ref:x,...l.props,id:c,htmlFor:h,onClick:b};return m&&("onClick"in E&&(delete E.htmlFor,delete E.onClick),"onClick"in f&&delete f.onClick),(0,d.useRender)()({ourProps:E,theirProps:f,slot:j,defaultTag:h?"label":"div",name:l.name||"Label"})}),{});e.s(["Label",0,j,"useLabelledBy",0,_,"useLabels",0,function({inherit:e=!1}={}){let i=_(),[s,r]=(0,t.useState)([]),a=e?[i,...s].filter(Boolean):s;return[a.length>0?a.join(" "):void 0,(0,t.useMemo)(()=>function(e){let i=(0,n.useEvent)(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),i=n.indexOf(e);return -1!==i&&n.splice(i,1),n}))),s=(0,t.useMemo)(()=>({register:i,slot:e.slot,name:e.name,props:e.props,value:e.value}),[i,e.slot,e.name,e.props,e.value]);return t.default.createElement(y.Provider,{value:s},e.children)},[r])]}],722678)},35983,220508,e=>{"use strict";var t=e.i(333771);e.s(["SelectItem",()=>t.default],35983);var n=e.i(271645);let i=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,i],220508)},371455,172372,e=>{"use strict";var t=e.i(843476),n=e.i(827252),i=e.i(213205),s=e.i(912598),r=e.i(109799),a=e.i(677667),l=e.i(130643),o=e.i(898667),d=e.i(35983),u=e.i(779241),c=e.i(560445),h=e.i(464571),m=e.i(536916),f=e.i(808613),p=e.i(311451),g=e.i(212931),v=e.i(199133),x=e.i(770914),b=e.i(592968),y=e.i(898586),_=e.i(271645),j=e.i(599724),E=e.i(291542),w=e.i(515831),C=e.i(519756),k=e.i(737434),S=e.i(285027),T=e.i(993914),N=e.i(955135);e.i(247167);var O=e.i(931067);let 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"};var R=e.i(9583),P=_.forwardRef(function(e,t){return _.createElement(R.default,(0,O.default)({},e,{ref:t,icon:I}))}),L=e.i(602869),D=e.i(59935),A=e.i(220508);let F=_.forwardRef(function(e,t){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}),M=_.forwardRef(function(e,t){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});var B=e.i(237016),U=e.i(727749);let z=({accessToken:e,teams:n,possibleUIRoles:i,onUsersCreated:s})=>{let[r,a]=(0,_.useState)(!1),[l,o]=(0,_.useState)([]),[d,u]=(0,_.useState)(!1),[c,m]=(0,_.useState)(null),[f,p]=(0,_.useState)(null),[v,x]=(0,_.useState)(null),[b,O]=(0,_.useState)(null),[I,R]=(0,_.useState)(null),[z,V]=(0,_.useState)("http://localhost:4000");(0,_.useEffect)(()=>{(async()=>{try{let t=await (0,L.getProxyUISettings)(e);R(t)}catch(e){console.error("Error fetching UI settings:",e)}})(),V(new URL("/",window.location.href).toString())},[e]);let $=async()=>{u(!0);let t=l.map(e=>({...e,status:"pending"}));o(t);let n=!1;for(let i=0;ie.trim()).filter(Boolean),0===t.teams.length&&delete t.teams),s.models&&"string"==typeof s.models&&""!==s.models.trim()&&(t.models=s.models.split(",").map(e=>e.trim()).filter(Boolean),0===t.models.length&&delete t.models),s.max_budget&&""!==s.max_budget.toString().trim()){let e=parseFloat(s.max_budget.toString());!isNaN(e)&&e>0&&(t.max_budget=e)}s.budget_duration&&""!==s.budget_duration.trim()&&(t.budget_duration=s.budget_duration.trim()),s.metadata&&"string"==typeof s.metadata&&""!==s.metadata.trim()&&(t.metadata=s.metadata.trim());let r=await (0,L.userCreateCall)(e,null,t);if(r&&(r.key||r.user_id)){n=!0;let t=r.data?.user_id||r.user_id;try{if(I?.SSO_ENABLED){let e=new URL("/ui",z).toString();o(t=>t.map((t,n)=>n===i?{...t,status:"success",key:r.key||r.user_id,invitation_link:e}:t))}else{let n=await (0,L.invitationCreateCall)(e,t),s=new URL(`/ui/onboarding?invitation_id=${n.id}`,z).toString();o(e=>e.map((e,t)=>t===i?{...e,status:"success",key:r.key||r.user_id,invitation_link:s}:e))}}catch(e){console.error("Error creating invitation:",e),o(e=>e.map((e,t)=>t===i?{...e,status:"success",key:r.key||r.user_id,error:"User created but failed to generate invitation link"}:e))}}else{let e=r?.error||"Failed to create user";o(t=>t.map((t,n)=>n===i?{...t,status:"failed",error:e}:t))}}catch(t){console.error("Caught error:",t);let e=t?.response?.data?.error||t?.message||String(t);o(t=>t.map((t,n)=>n===i?{...t,status:"failed",error:e}:t))}}u(!1),n&&s&&s()},H=[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,n)=>n.isValid?n.status&&"pending"!==n.status?"success"===n.status?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(A.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}),(0,t.jsx)("span",{className:"text-green-500",children:"Success"})]}),n.invitation_link&&(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:n.invitation_link}),(0,t.jsx)(B.CopyToClipboard,{text:n.invitation_link,onCopy:()=>U.default.success("Invitation link copied!"),children:(0,t.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(F,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsx)("span",{className:"text-red-500",children:"Failed"})]}),n.error&&(0,t.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(n.error)})]}):(0,t.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(F,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),n.error&&(0,t.jsx)("span",{className:"text-sm text-red-500 ml-7",children:n.error})]})}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Button,{type:"primary",className:"mb-0",onClick:()=>a(!0),children:"+ Bulk Invite Users"}),(0,t.jsx)(g.Modal,{title:"Bulk Invite Users",open:r,width:800,onCancel:()=>a(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,t.jsxs)("div",{className:"ml-11 mb-6",children:[(0,t.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,t.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,t.jsx)("li",{children:"Download our CSV template"}),(0,t.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,t.jsx)("li",{children:"Save the file and upload it here"}),(0,t.jsx)("li",{children:"After creation, download the results file containing the Virtual Keys for each user"})]}),(0,t.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"user_email"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"user_role"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer") '})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"teams"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"models"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,t.jsx)(h.Button,{type:"primary",size:"large",className:"w-full md:w-auto",icon:(0,t.jsx)(k.DownloadOutlined,{}),children:"Download CSV Template"})]}),(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,t.jsxs)("div",{className:"ml-11",children:[b?(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-md border ${v?"bg-red-50 border-red-200":"bg-blue-50 border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[v?(0,t.jsx)(P,{className:"text-red-500 text-xl mr-3"}):(0,t.jsx)(T.FileTextOutlined,{className:"text-blue-500 text-xl mr-3"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,className:v?"text-red-800":"text-blue-800",children:b.name}),(0,t.jsxs)(y.Typography.Text,{className:`block text-xs ${v?"text-red-600":"text-blue-600"}`,children:[(b.size/1024).toFixed(1)," KB • ",new Date().toLocaleDateString()]})]})]}),(0,t.jsx)(h.Button,{size:"small",onClick:()=>{O(null),o([]),m(null),p(null),x(null)},className:"flex items-center",icon:(0,t.jsx)(N.DeleteOutlined,{}),children:"Remove"})]}),v?(0,t.jsxs)("div",{className:"mt-3 text-red-600 text-sm flex items-start",children:[(0,t.jsx)(S.WarningOutlined,{className:"mr-2 mt-0.5"}),(0,t.jsx)("span",{children:v})]}):!f&&(0,t.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,t.jsx)("div",{className:"bg-blue-500 h-1.5 rounded-full w-full animate-pulse"})}),(0,t.jsx)("span",{className:"ml-2 text-xs text-blue-600",children:"Processing..."})]})]}):(0,t.jsx)(w.Upload,{beforeUpload:e=>((m(null),p(null),x(null),O(e),"text/csv"===e.type||e.name.endsWith(".csv"))?e.size>5242880?x(`File is too large (${(e.size/1048576).toFixed(1)} MB). Please upload a CSV file smaller than 5MB.`):D.default.parse(e,{complete:e=>{if(!e.data||0===e.data.length){p("The CSV file appears to be empty. Please upload a file with data."),o([]);return}if(1===e.data.length){p("The CSV file only contains headers but no user data. Please add user data to your CSV."),o([]);return}let t=e.data[0];if(0===t.length||1===t.length&&""===t[0]){p("The CSV file doesn't contain any column headers. Please make sure your CSV has headers."),o([]);return}let i=["user_email","user_role"].filter(e=>!t.includes(e));if(i.length>0){p(`Your CSV is missing these required columns: ${i.join(", ")}. Please add these columns to your CSV file.`),o([]);return}try{let i=e.data.slice(1).map((e,i)=>{if(0===e.length||1===e.length&&""===e[0])return null;if(e.length=parseFloat(s.max_budget.toString())&&r.push("Max budget must be greater than 0")),s.budget_duration&&!s.budget_duration.match(/^\d+[dhmwy]$|^\d+mo$/)&&r.push(`Invalid budget duration format "${s.budget_duration}". Use format like "30d", "1mo", "2w", "6h"`),s.teams&&"string"==typeof s.teams&&n&&n.length>0){let e=n.map(e=>e.team_id),t=s.teams.split(",").map(e=>e.trim()).filter(t=>!e.includes(t));t.length>0&&r.push(`Unknown team(s): ${t.join(", ")}`)}return r.length>0&&(s.isValid=!1,s.error=r.join(", ")),s}).filter(Boolean),s=i.filter(e=>e.isValid);o(i),0===i.length?p("No valid data rows found in the CSV file. Please check your file format."):0===s.length?m("No valid users found in the CSV. Please check the errors below and fix your CSV file."):s.length{m(`Failed to parse CSV file: ${e.message}`),o([])},header:!1}):(x(`Invalid file type: ${e.name}. Please upload a CSV file (.csv extension).`),U.default.fromBackend("Invalid file type. Please upload a CSV file.")),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,t.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,t.jsx)(C.UploadOutlined,{className:"text-3xl text-gray-400 mb-2"}),(0,t.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,t.jsx)(h.Button,{size:"small",children:"Browse files"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-4",children:"Only CSV files (.csv) are supported"})]})}),f&&(0,t.jsx)("div",{className:"mb-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(M,{className:"h-5 w-5 text-yellow-500 mr-2 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,className:"text-yellow-800",children:"CSV Structure Error"}),(0,t.jsx)(y.Typography.Paragraph,{className:"text-yellow-700 mt-1 mb-0",children:f}),(0,t.jsx)(y.Typography.Paragraph,{className:"text-yellow-700 mt-2 mb-0",children:"Please download our template and ensure your CSV follows the required format."})]})]})})]})]}):(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:l.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),c&&(0,t.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(S.WarningOutlined,{className:"text-red-500 mr-2 mt-1"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Text,{className:"text-red-600 font-medium",children:c}),l.some(e=>!e.isValid)&&(0,t.jsxs)("ul",{className:"mt-2 list-disc list-inside text-red-600 text-sm",children:[(0,t.jsx)("li",{children:"Check the table below for specific errors in each row"}),(0,t.jsx)("li",{children:"Common issues include invalid email formats, missing required fields, or incorrect role values"}),(0,t.jsx)("li",{children:"Fix these issues in your CSV file and upload again"})]})]})]})}),(0,t.jsxs)("div",{className:"ml-11",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,t.jsx)("div",{className:"flex items-center",children:l.some(e=>"success"===e.status||"failed"===e.status)?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(j.Text,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,t.jsxs)(j.Text,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded-sm mr-2",children:[l.filter(e=>"success"===e.status).length," Successful"]}),l.some(e=>"failed"===e.status)&&(0,t.jsxs)(j.Text,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded-sm",children:[l.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(j.Text,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,t.jsxs)(j.Text,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded-sm",children:[l.filter(e=>e.isValid).length," of ",l.length," users valid"]})]})}),!l.some(e=>"success"===e.status||"failed"===e.status)&&(0,t.jsxs)("div",{className:"flex space-x-3",children:[(0,t.jsx)(h.Button,{onClick:()=>{o([]),m(null)},children:"Back"}),(0,t.jsx)(h.Button,{type:"primary",onClick:$,disabled:0===l.filter(e=>e.isValid).length||d,children:d?"Creating...":`Create ${l.filter(e=>e.isValid).length} Users`})]})]}),l.some(e=>"success"===e.status)&&(0,t.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"mr-3 mt-1",children:(0,t.jsx)(A.CheckCircleIcon,{className:"h-5 w-5 text-blue-500"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Text,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,t.jsxs)(j.Text,{className:"block text-sm text-blue-700 mt-1",children:[(0,t.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing Virtual Keys and invitation links. Users will need these Virtual Keys to make LLM requests through LiteLLM."]})]})]})}),(0,t.jsx)(E.Table,{dataSource:l,columns:H,size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!l.some(e=>"success"===e.status||"failed"===e.status)&&(0,t.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,t.jsx)(h.Button,{onClick:()=>{o([]),m(null)},className:"mr-3",children:"Back"}),(0,t.jsx)(h.Button,{type:"primary",onClick:$,disabled:0===l.filter(e=>e.isValid).length||d,children:d?"Creating...":`Create ${l.filter(e=>e.isValid).length} Users`})]}),l.some(e=>"success"===e.status||"failed"===e.status)&&(0,t.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,t.jsx)(h.Button,{onClick:()=>{o([]),m(null)},className:"mr-3",children:"Start New Bulk Import"}),(0,t.jsx)(h.Button,{type:"primary",onClick:()=>{let e=l.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),t=new Blob([D.default.unparse(e)],{type:"text/csv"}),n=window.URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download="bulk_users_results.csv",document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(n)},icon:(0,t.jsx)(k.DownloadOutlined,{}),children:"Download User Credentials"})]})]})]})})})]})};var V=e.i(663435),$=e.i(355619);function H({isInvitationLinkModalVisible:e,setIsInvitationLinkModalVisible:n,baseUrl:i,invitationLinkData:s,modalType:r="invitation"}){let{Title:a,Paragraph:l}=y.Typography,o=()=>(function({baseUrl:e,invitationId:t,hasUserSetupSso:n,resetPassword:i}){if(!e)return"";let s=new URL(e).pathname,r=s&&"/"!==s?`${s}/ui`:"ui";return n?new URL(r,e).toString():t?new URL(`${r}/onboarding?invitation_id=${t}${i?"&action=reset_password":""}`,e).toString():""})({baseUrl:i,invitationId:s?.id,hasUserSetupSso:s?.has_user_setup_sso??!1,resetPassword:"resetPassword"===r});return(0,t.jsxs)(g.Modal,{title:"invitation"===r?"Invitation Link":"Reset Password Link",open:e,width:800,footer:null,onOk:()=>{n(!1)},onCancel:()=>{n(!1)},children:[(0,t.jsx)(l,{children:"invitation"===r?"Copy and send the generated link to onboard this user to the proxy.":"Copy and send the generated link to the user to reset their password."}),(0,t.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,t.jsx)(j.Text,{className:"text-base",children:"User ID"}),(0,t.jsx)(j.Text,{children:s?.user_id})]}),(0,t.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,t.jsx)(j.Text,{children:"invitation"===r?"Invitation Link":"Reset Password Link"}),(0,t.jsx)(j.Text,{children:(0,t.jsx)(j.Text,{children:o()})})]}),(0,t.jsx)("div",{className:"flex justify-end mt-5",children:(0,t.jsx)(B.CopyToClipboard,{text:o(),onCopy:()=>U.default.success("Copied!"),children:(0,t.jsx)(h.Button,{type:"primary",children:"invitation"===r?"Copy invitation link":"Copy password reset link"})})})]})}e.s(["default",0,H],172372);let{Option:W}=v.Select,{Text:q,Link:K,Title:J}=y.Typography;e.s(["CreateUserButton",0,({userID:e,accessToken:y,teams:j,possibleUIRoles:E,onUserCreated:w,isEmbedded:C=!1})=>{let k=(0,s.useQueryClient)(),[S,T]=(0,_.useState)(null),[N]=f.Form.useForm(),[O,I]=(0,_.useState)(!1),[R,P]=(0,_.useState)(!1),[D,A]=(0,_.useState)([]),[F,M]=(0,_.useState)(!1),[B,J]=(0,_.useState)(null),[G,Q]=(0,_.useState)(null),{data:Y=[]}=(0,r.useOrganizations)();(0,_.useMemo)(()=>{let e=Y.flatMap(e=>e.teams||[]);return e.length>0?e:j||[]},[Y,j]),(0,_.useEffect)(()=>{let t=async()=>{try{let t=await (0,L.modelAvailableCall)(y,e,"any"),n=[];for(let e=0;e{try{U.default.info("Making API Call"),C||I(!0),t.models&&0!==t.models.length||"proxy_admin"===t.user_role||(t.models=["no-default-models"]),t.organization_ids&&(t.organizations=t.organization_ids,delete t.organization_ids);let n=await (0,L.userCreateCall)(y,null,t);await k.invalidateQueries({queryKey:["userList"]}),P(!0);let i=n.data?.user_id||n.user_id;if(w&&C){w(i),N.resetFields();return}if(S?.SSO_ENABLED){let t={id:"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),user_id:i,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:e,updated_at:new Date,updated_by:e,has_user_setup_sso:!0};J(t),M(!0)}else(0,L.invitationCreateCall)(y,i).then(e=>{e.has_user_setup_sso=!1,J(e),M(!0)});U.default.success("API user Created"),N.resetFields(),localStorage.removeItem("userData"+e)}catch(t){let e=t.response?.data?.detail||t?.message||"Error creating the user";U.default.fromBackend(e),console.error("Error creating the user:",t)}};return C?(0,t.jsxs)(f.Form,{form:N,onFinish:Z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer",send_invite_email:!0},children:[(0,t.jsx)(c.Alert,{message:"Email invitations",description:(0,t.jsxs)(t.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,t.jsx)(K,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,t.jsx)(f.Form.Item,{label:"User Email",name:"user_email",children:(0,t.jsx)(u.TextInput,{placeholder:""})}),(0,t.jsx)(f.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(v.Select,{children:E&&Object.entries(E).map(([e,{ui_label:n,description:i}])=>(0,t.jsx)(d.SelectItem,{value:e,title:n,children:(0,t.jsxs)("div",{className:"flex",children:[n," ",(0,t.jsx)(q,{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:i})]})},e))})}),(0,t.jsx)(f.Form.Item,{label:"Team",name:"team_id",children:(0,t.jsx)(V.default,{})}),(0,t.jsx)(f.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(p.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(f.Form.Item,{label:"Send invitation email",name:"send_invite_email",valuePropName:"checked",children:(0,t.jsx)(m.Checkbox,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(h.Button,{htmlType:"submit",children:"Create User"})})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(h.Button,{type:"primary",className:"mb-0",onClick:()=>I(!0),children:"+ Invite User"}),(0,t.jsx)(z,{accessToken:y,teams:j,possibleUIRoles:E}),(0,t.jsxs)(g.Modal,{title:"Invite User",open:O,width:800,footer:null,onOk:()=>{I(!1),N.resetFields()},onCancel:()=>{I(!1),P(!1),N.resetFields()},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",children:[(0,t.jsx)(q,{className:"mb-1",children:"Create a User who can own keys"}),(0,t.jsx)(c.Alert,{message:"Email invitations",description:(0,t.jsxs)(t.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,t.jsx)(K,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"})]}),(0,t.jsxs)(f.Form,{form:N,onFinish:Z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer",send_invite_email:!0},children:[(0,t.jsx)(f.Form.Item,{label:"User Email",name:"user_email",children:(0,t.jsx)(p.Input,{})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(b.Tooltip,{title:"This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings",children:(0,t.jsx)(n.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(v.Select,{children:E&&Object.entries(E).map(([e,{ui_label:n,description:i}])=>(0,t.jsxs)(d.SelectItem,{value:e,title:n,children:[(0,t.jsx)(q,{children:n}),(0,t.jsxs)(q,{type:"secondary",children:[" - ",i]})]},e))})}),(0,t.jsx)(f.Form.Item,{label:"Team",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,t.jsx)(V.default,{})}),(0,t.jsx)(f.Form.Item,{label:"Organization",name:"organization_ids",help:"The user will be added to the selected organization(s).",children:(0,t.jsx)(v.Select,{mode:"multiple",placeholder:"Select Organization",style:{width:"100%"},children:Y.map(e=>(0,t.jsxs)(W,{value:e.organization_id,children:[e.organization_alias," (",e.organization_id,")"]},e.organization_id))})}),(0,t.jsx)(f.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(p.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(f.Form.Item,{label:"Send invitation email",name:"send_invite_email",valuePropName:"checked",children:(0,t.jsx)(m.Checkbox,{})}),(0,t.jsxs)(a.Accordion,{children:[(0,t.jsx)(o.AccordionHeader,{children:(0,t.jsx)(q,{strong:!0,children:"Personal Key Creation"})}),(0,t.jsx)(l.AccordionBody,{children:(0,t.jsx)(f.Form.Item,{className:"gap-2",label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(b.Tooltip,{title:"Models user has access to, outside of team scope.",children:(0,t.jsx)(n.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,t.jsxs)(v.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,t.jsx)(v.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(v.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),D.map(e=>(0,t.jsx)(v.Select.Option,{value:e,children:(0,$.getModelDisplayName)(e)},e))]})})})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(h.Button,{type:"primary",icon:(0,t.jsx)(i.UserAddOutlined,{}),htmlType:"submit",children:"Invite User"})})]})]}),R&&(0,t.jsx)(H,{isInvitationLinkModalVisible:F,setIsInvitationLinkModalVisible:M,baseUrl:G||"",invitationLinkData:B})]})}],371455)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/08k6jolcrw-uw.js b/litellm/proxy/_experimental/out/_next/static/chunks/08k6jolcrw-uw.js
deleted file mode 100644
index e356a78e7e7..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/08k6jolcrw-uw.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,165776,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(898586);e.i(247167);var r=e.i(931067);let a={icon:function(e,t){return{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",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm193.4 225.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 5 25.9 13.3l71.2 98.8 157.2-218c6-8.4 15.7-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.4 12.7z",fill:t}},{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",fill:e}}]}},name:"check-circle",theme:"twotone"};var i=e.i(9583),o=s.forwardRef(function(e,t){return s.createElement(i.default,(0,r.default)({},e,{ref:t,icon:a}))});let n={icon:function(e,t){return{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",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.2 0 4.5-3.6 8-8 8l-66-.3-99.3-118.4-99.3 118.5-66.1.3c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2L471 512.3l-130.1-155a8.32 8.32 0 01-1.9-5.2c0-4.5 3.6-8 8-8l66.1.3 99.3 118.4 99.4-118.5 66-.3c4.4 0 8 3.6 8 8 0 1.9-.6 3.8-1.8 5.2l-130.1 155 129.9 154.9z",fill:t}},{tag:"path",attrs:{d:"M685.8 352c0-4.4-3.6-8-8-8l-66 .3-99.4 118.5-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155-130.1 154.9a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3 99.3-118.5L611.7 680l66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.9 512.2l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z",fill:e}}]}},name:"close-circle",theme:"twotone"};var d=s.forwardRef(function(e,t){return s.createElement(i.default,(0,r.default)({},e,{ref:t,icon:n}))}),c=e.i(56456),m=e.i(602869);let{Text:u}=l.Typography;e.s(["default",0,({accessToken:e,targets:l,onTestComplete:r})=>{let[a,i]=s.default.useState(()=>l.map(()=>({status:"pending"})));return(s.default.useEffect(()=>{let t=!1;return(async()=>{await Promise.all(l.map(async(s,l)=>{let r=await (0,m.testModelGroupConnection)(e,s.modelGroup,s.mode);if(t)return;let a="error"===r.status?{status:"error",error:r.error.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,"")}:r;i(e=>e.map((e,t)=>t===l?a:e))})),!t&&r&&r()})(),()=>{t=!0}},[]),0===l.length)?(0,t.jsx)(u,{type:"secondary",children:"No complexity tiers are configured yet, so there is nothing to test."}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(u,{type:"secondary",style:{display:"block",marginBottom:8},children:"Each configured tier routes to a saved model group. Test Connection sends a minimal request through the proxy to each one, exactly as the auto router would."}),l.map((e,s)=>{let l=a[s]??{status:"pending"};return(0,t.jsxs)("div",{"data-testid":"auto-router-test-row",style:{border:"1px solid #e5e7eb",borderRadius:8,padding:"12px 16px",display:"flex",alignItems:"flex-start",gap:12},children:[(0,t.jsxs)("div",{style:{fontSize:18,lineHeight:"24px"},children:["pending"===l.status&&(0,t.jsx)(c.LoadingOutlined,{"data-testid":"test-status-pending"}),"success"===l.status&&(0,t.jsx)(o,{twoToneColor:"#52c41a","data-testid":"test-status-success"}),"error"===l.status&&(0,t.jsx)(d,{twoToneColor:"#ff4d4f","data-testid":"test-status-error"})]}),(0,t.jsxs)("div",{style:{flex:1},children:[(0,t.jsx)(u,{strong:!0,children:e.labels.join(", ")})," ",(0,t.jsxs)(u,{type:"secondary",children:["->"," ",e.modelGroup,"embedding"===e.mode?" (embedding)":""]}),"error"===l.status&&(0,t.jsx)(u,{type:"danger","data-testid":"test-error-message",style:{display:"block",marginTop:4,fontSize:13},children:l.error})]})]},`${e.modelGroup}-${e.mode}`)})]})}],165776)},120566,e=>{"use strict";let t=["SIMPLE","MEDIUM","COMPLEX","REASONING"];e.s(["buildAutoRouterTestTargets",0,({tiers:e,semanticMatchingEnabled:s,embeddingModel:l})=>[...Object.entries(t.reduce((t,s)=>(e[s]??[]).reduce((e,t)=>{let l=t?.trim();return l?{...e,[l]:[...e[l]??[],s]}:e},t),{})).map(([e,t])=>({labels:t,modelGroup:e,mode:"chat"})),...s&&l?.trim()?[{labels:["Embedding"],modelGroup:l.trim(),mode:"embedding"}]:[]]])},492881,491115,304720,155964,e=>{"use strict";var t=e.i(843476),s=e.i(955135),l=e.i(827252),r=e.i(646563),a=e.i(199133),i=e.i(464571),o=e.i(175712),n=e.i(362024),d=e.i(312361),c=e.i(21548),m=e.i(525720),u=e.i(311451),h=e.i(28651),p=e.i(770914),g=e.i(592968),x=e.i(898586),y=e.i(271645);let{Text:f}=x.Typography,{TextArea:j}=u.Input;e.s(["default",0,({modelInfo:e,value:u,onChange:_})=>{let[b,v]=(0,y.useState)([]),[w,S]=(0,y.useState)(!1),[C,T]=(0,y.useState)([]);(0,y.useEffect)(()=>{let e=u?.routes;if(e){let t=[];v(s=>e.map((e,l)=>{let r=s[l],a=r?.id||e.id||`route-${l}-${Date.now()}`;return t.push(a),{id:a,model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold??.5}})),T(t)}else v([]),T([])},[u]);let k=(e,t,s)=>{let l=b.map(l=>l.id===e?{...l,[t]:s}:l);v(l),N(l)},N=e=>{let t={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};_?.(t)},E=e.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(m.Flex,{justify:"space-between",align:"center",gap:"middle",style:{width:"100%",marginBottom:24},children:[(0,t.jsxs)(p.Space,{align:"center",children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Routes Configuration"}),(0,t.jsx)(g.Tooltip,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(i.Button,{type:"primary",icon:(0,t.jsx)(r.PlusOutlined,{}),onClick:()=>{let e=`route-${Date.now()}`,t=[...b,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];v(t),N(t),T(t=>[...t,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===b.length?(0,t.jsx)(o.Card,{children:(0,t.jsx)(c.Empty,{description:'No routes configured. Click "Add Route" to get started.'})}):(0,t.jsx)(n.Collapse,{activeKey:C,onChange:e=>T(Array.isArray(e)?e:[e].filter(Boolean)),style:{width:"100%"},items:b.map((e,r)=>({key:e.id,label:(0,t.jsxs)(f,{style:{fontSize:16},children:["Route ",r+1,": ",e.model||"Unnamed"]}),extra:(0,t.jsx)(i.Button,{type:"text",danger:!0,size:"small",icon:(0,t.jsx)(s.DeleteOutlined,{}),onClick:t=>{var s;let l;t.stopPropagation(),s=e.id,v(l=b.filter(e=>e.id!==s)),N(l),T(e=>e.filter(e=>e!==s))}}),children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(f,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,t.jsx)(a.Select,{value:e.model,onChange:t=>k(e.id,"model",t),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:E})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(f,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,t.jsx)(j,{value:e.description,onChange:t=>k(e.id,"description",t.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(f,{className:"text-sm font-medium",children:"Score Threshold"}),(0,t.jsx)(g.Tooltip,{title:"Minimum similarity score to route to this model (0-1)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(h.InputNumber,{value:e.score_threshold,onChange:t=>k(e.id,"score_threshold",t||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(f,{className:"text-sm font-medium",children:"Example Utterances"}),(0,t.jsx)(g.Tooltip,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(f,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,t.jsx)(a.Select,{mode:"tags",value:e.utterances,onChange:t=>k(e.id,"utterances",t),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]},e.id)}))}),(0,t.jsx)(d.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,t.jsx)(f,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,t.jsx)(i.Button,{type:"link",onClick:()=>S(!w),className:"text-blue-600 p-0",children:w?"Hide":"Show"})]}),w&&(0,t.jsx)(o.Card,{className:"bg-gray-50 w-full",children:(0,t.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:b.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})}],492881),e.s(["DEFAULT_ADAPTIVE_WEIGHTS",()=>q,"DEFAULT_CLASSIFIER_TIMEOUT_MS",()=>O,"DEFAULT_TIER_DISTANCE_PENALTY",()=>B,"default",()=>D],155964);var _=e.i(790848),b=e.i(91739),v=e.i(850627);let{Text:w}=x.Typography,S=({value:e,onChange:s})=>{let l=e.adaptive_weights??q,r=e.adaptive_eligible??"all",a=e.tier_distance_penalty??B;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(_.Switch,{checked:e.adaptive??!1,onChange:t=>{s({...e,adaptive:t,adaptive_weights:l,adaptive_eligible:r,tier_distance_penalty:a})}}),(0,t.jsx)(w,{strong:!0,children:"Enable adaptive bandit selection"})]}),(0,t.jsx)(w,{type:"secondary",style:{display:"block",fontSize:12},children:"When disabled, each request always uses the model assigned to its classified tier."}),(0,t.jsxs)(o.Card,{className:"bg-gray-50 mt-4",children:[(0,t.jsx)(w,{strong:!0,style:{display:"block",marginBottom:8},children:"How Adaptive Routing Works"}),(0,t.jsx)(w,{type:"secondary",style:{fontSize:13},children:"It learns from how each conversation actually goes: does the user have to rephrase or correct the model, does it get stuck repeating itself, does it run out of tool calls, does the user seem satisfied. Combined with cost, this live feedback shifts future routing toward the models that are actually working well, and improves as more conversations come in. Until there's enough feedback, it defaults to the classified tier's model."})]}),e.adaptive&&(0,t.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(w,{strong:!0,style:{display:"block",marginBottom:4},children:["Quality vs. Cost (",Math.round(100*l.quality),"% quality /"," ",Math.round(100*l.cost),"% cost)"]}),(0,t.jsx)(v.Slider,{min:0,max:100,value:Math.round(100*l.quality),onChange:t=>{let l=t/100;s({...e,adaptive_weights:{quality:l,cost:Math.round((1-l)*100)/100}})},tooltip:{formatter:e=>`${e}% quality / ${100-(e??0)}% cost`}}),(0,t.jsx)(w,{type:"secondary",style:{fontSize:12},children:"Higher quality weight favors more capable (pricier) models; higher cost weight favors cheaper models when the bandit has feedback to act on. Recommended: 30% quality / 70% cost split."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(w,{strong:!0,style:{display:"block",marginBottom:4},children:"Eligible Model Pool"}),(0,t.jsx)(b.Radio.Group,{value:r,onChange:t=>{var l;return l=t.target.value,void s({...e,adaptive_eligible:l})},className:"w-full",children:(0,t.jsxs)(p.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(b.Radio,{value:"all",children:[(0,t.jsx)(w,{strong:!0,children:"All tiers (soft floor)"})," ",(0,t.jsx)(w,{type:"secondary",children:"— router can pick across tiers, depending on the best fit for the prompt"})]}),(0,t.jsxs)(b.Radio,{value:"classified_tier",children:[(0,t.jsx)(w,{strong:!0,children:"Classified tier only"})," ",(0,t.jsx)(w,{type:"secondary",children:"— router can only pick models within tier"})]})]})})]}),"all"===r&&(0,t.jsxs)("div",{children:[(0,t.jsx)(w,{strong:!0,style:{display:"block",marginBottom:4},children:"Tier Distance Penalty"}),(0,t.jsx)(h.InputNumber,{value:a,onChange:t=>{s({...e,tier_distance_penalty:t??B})},min:0,step:.1,style:{width:"100%"}}),(0,t.jsx)(w,{type:"secondary",style:{fontSize:12},children:"Score penalty applied per tier-step away from the classified tier."})]})]})]})},{Text:C}=x.Typography,T=({value:e,onChange:s,modelOptions:r,customTechnicalKeywords:i,onCustomTechnicalKeywordsChange:n,showValidationErrors:d=!1})=>{let c=d&&"llm"===e.classifier_type&&!e.classifier_llm_config?.model;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.Radio.Group,{value:e.classifier_type,onChange:t=>{var l;return l=t.target.value,void s({...e,classifier_type:l,classifier_llm_config:"llm"===l?e.classifier_llm_config??{model:"",timeout_ms:O}:void 0})},className:"w-full",children:(0,t.jsxs)(p.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(b.Radio,{value:"heuristic",children:[(0,t.jsx)(C,{strong:!0,children:"Heuristic"})," ",(0,t.jsx)(C,{type:"secondary",children:"(default) — rule-based scoring, no API calls, <1ms latency"})]}),(0,t.jsxs)(b.Radio,{value:"llm",children:[(0,t.jsx)(C,{strong:!0,children:"LLM Classifier"})," ",(0,t.jsx)(C,{type:"secondary",children:"— use a model to decide the tier (e.g. a small/fast model)"})]})]})}),"llm"===e.classifier_type&&(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(C,{strong:!0,style:{display:"block",marginBottom:4},children:"Classifier Model"}),(0,t.jsx)(a.Select,{value:e.classifier_llm_config?.model||void 0,onChange:t=>{s({...e,classifier_llm_config:{model:t,timeout_ms:e.classifier_llm_config?.timeout_ms??O}})},placeholder:"Select the model that will classify request complexity",showSearch:!0,style:{width:"100%"},options:r,status:c?"error":void 0}),c&&(0,t.jsx)(C,{type:"danger",style:{fontSize:12},children:"A classifier model is required"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(C,{strong:!0,style:{display:"block",marginBottom:4},children:"Timeout (ms)"}),(0,t.jsx)(h.InputNumber,{value:e.classifier_llm_config?.timeout_ms??O,onChange:t=>{s({...e,classifier_llm_config:{model:e.classifier_llm_config?.model??"",timeout_ms:t??O}})},min:1,style:{width:"100%"}}),(0,t.jsx)(C,{type:"secondary",style:{fontSize:12},children:"Falls back to the heuristic scorer if the classifier call errors, times out, or returns an unparseable response."})]})]}),"heuristic"===e.classifier_type&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(C,{strong:!0,children:"Custom Technical Keywords"}),(0,t.jsx)(g.Tooltip,{title:"Domain-specific terms appended to the built-in technical keyword list. Prompts containing these terms score higher on the technical dimension and route to more capable models.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(C,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:"Optional: Add terms to the built-in list to improve classification accuracy on the technical dimension. (e.g., udp, kafka, terraform)."}),(0,t.jsx)(a.Select,{mode:"tags",value:i??[],onChange:e=>n?.(e),placeholder:"Type a keyword and press Enter, or paste a comma-separated list",tokenSeparators:[","],open:!1,suffixIcon:null,style:{width:"100%"},allowClear:!0})]}),(0,t.jsxs)(o.Card,{className:"bg-gray-50 mt-4",children:[(0,t.jsx)(C,{strong:!0,style:{display:"block",marginBottom:8},children:"How Classification Works"}),(0,t.jsx)(C,{type:"secondary",style:{fontSize:13},children:"The router scores each request across 7 dimensions: token count, code presence, reasoning markers, technical terms, simple indicators, multi-step patterns, and question complexity. The weighted score determines the tier:"}),(0,t.jsxs)("ul",{style:{marginTop:8,marginBottom:0,paddingLeft:20,fontSize:13,color:"rgba(0, 0, 0, 0.45)"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"SIMPLE"}),": Score < 0.15"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"MEDIUM"}),": Score 0.15 - 0.35"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"COMPLEX"}),": Score 0.35 - 0.60"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"REASONING"}),": Score > 0.60 (or 2+ reasoning markers)"]})]})]})]})},{Text:k}=x.Typography,N=({keywords:e,onChange:s})=>(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Escalation Keywords"}),(0,t.jsx)(g.Tooltip,{title:"Case-sensitive phrases a user can include in their message to force a bump to the next-higher complexity tier when they aren't happy with results. They can force a stronger model, but not choose which one.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(k,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:'Optional: when a user message contains one of these phrases, the request is bumped one tier higher than it would otherwise route to. Matching is case-sensitive, so "LITELLM ESCALATE" only fires on the exact, shouted form. Leave empty to disable.'}),(0,t.jsx)(a.Select,{mode:"tags",value:e,onChange:s,placeholder:"e.g., LITELLM ESCALATE",tokenSeparators:[","],open:!1,suffixIcon:null,style:{width:"100%"},allowClear:!0})]});e.s(["DEFAULT_ESCALATION_KEYWORDS",0,["LITELLM ESCALATE"],"default",0,N],491115);let{Text:E}=x.Typography,A=[{value:"SIMPLE",label:"Simple"},{value:"MEDIUM",label:"Medium"},{value:"COMPLEX",label:"Complex"},{value:"REASONING",label:"Reasoning"}],M=({rules:e,onChange:n})=>{let d=(t,s)=>{n(e.map(e=>e.id===t?{...e,...s}:e))};return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Keyword Tier Overrides"}),(0,t.jsx)(g.Tooltip,{title:"Match known terms and force the request straight to a chosen complexity tier, bypassing rule-based scoring.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(i.Button,{icon:(0,t.jsx)(r.PlusOutlined,{}),onClick:()=>{n([...e,{id:`${Date.now()}`,keywords:[],tier:"COMPLEX"}])},children:"Add keyword rule"})]}),(0,t.jsx)(E,{type:"secondary",style:{display:"block",marginBottom:16},children:'Optional: route requests containing specific keywords directly to a tier, e.g. route "invoice, refund, billing" to the medium tier.'}),0===e.length?(0,t.jsx)(o.Card,{className:"bg-gray-50",children:(0,t.jsx)(c.Empty,{image:c.Empty.PRESENTED_IMAGE_SIMPLE,description:"No keyword tier overrides configured"})}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map((l,r)=>(0,t.jsx)(o.Card,{size:"small",children:(0,t.jsxs)("div",{className:"flex items-end gap-3",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)(E,{strong:!0,style:{display:"block",marginBottom:8},children:["Keywords ",r+1]}),(0,t.jsx)(a.Select,{mode:"tags",value:l.keywords,onChange:e=>d(l.id,{keywords:e}),placeholder:"e.g., invoice, refund, billing",tokenSeparators:[","],open:!1,suffixIcon:null,style:{width:"100%"},allowClear:!0})]}),(0,t.jsxs)("div",{style:{width:220},children:[(0,t.jsx)(E,{strong:!0,style:{display:"block",marginBottom:8},children:"Route to tier"}),(0,t.jsx)(a.Select,{value:l.tier,onChange:e=>d(l.id,{tier:e}),options:A,style:{width:"100%"}})]}),(0,t.jsx)(i.Button,{danger:!0,type:"text",icon:(0,t.jsx)(s.DeleteOutlined,{}),"aria-label":`Remove keyword rule ${r+1}`,onClick:()=>{var t;return t=l.id,void n(e.filter(e=>e.id!==t))}})]})},l.id))})]})},{Text:R}=x.Typography,I=({enabled:e,onEnabledChange:s,embeddingModel:r,onEmbeddingModelChange:i,matchThreshold:o,onMatchThresholdChange:n,modelInfo:d,showValidationErrors:c=!1})=>{let m=Array.from(new Set(d.filter(e=>"embedding"===e.mode).map(e=>e.model_group))).map(e=>({value:e,label:e})),u=c&&!r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(R,{className:"font-medium",children:"Semantic keyword matching"}),(0,t.jsx)(g.Tooltip,{title:"Recognize related phrasing beyond exact keyword matches by comparing embeddings instead of plain text. Overrides direct keyword matching",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(R,{className:"text-gray-500 text-sm",children:"Uses same keyword-tier pairs as above and overrides direct keyword matching. Adds latency based on embedding model network request."})]}),(0,t.jsx)(_.Switch,{checked:e,onChange:s,"aria-label":"Semantic keyword matching"})]}),e&&(0,t.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 mt-4 pt-4 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{className:"text-sm font-medium mb-1 block",children:"Embedding model"}),(0,t.jsx)(a.Select,{value:r,onChange:i,placeholder:"Select an embedding model",showSearch:!0,style:{width:"100%"},options:m,status:u?"error":void 0}),u&&(0,t.jsx)(R,{type:"danger",style:{fontSize:12},children:"An embedding model is required"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{className:"text-sm font-medium mb-1 block",children:"Minimum match score"}),(0,t.jsx)(h.InputNumber,{value:o,onChange:e=>n(e??.5),min:0,max:1,step:.05,style:{width:"100%"}}),(0,t.jsx)(R,{className:"text-gray-500 text-xs mt-1 block",children:"Match only at or above this similarity score."})]})]})]})};e.s(["DEFAULT_MATCH_THRESHOLD",0,.5,"default",0,I],304720);let{Text:L}=x.Typography,O=3e3,B=.5,q={quality:.3,cost:.7},P={SIMPLE:{label:"Simple",description:"Basic questions, greetings, simple factual queries",examples:'"Hello!", "What is Python?", "Thanks!"'},MEDIUM:{label:"Medium",description:"Standard queries requiring some reasoning or explanation",examples:'"Explain how REST APIs work", "Debug this error"'},COMPLEX:{label:"Complex",description:"Technical, multi-part requests requiring deep knowledge",examples:'"Design a microservices architecture", "Implement a rate limiter"'},REASONING:{label:"Reasoning",description:"Chain-of-thought, analysis, explicit reasoning requests",examples:'"Think step by step...", "Analyze the pros and cons..."'}},D=({modelInfo:e,value:s,onChange:r,customTechnicalKeywords:i,onCustomTechnicalKeywordsChange:c,keywordTierRules:m=[],onKeywordTierRulesChange:u,semanticMatchingEnabled:h=!1,onSemanticMatchingEnabledChange:y,embeddingModel:f,onEmbeddingModelChange:j=()=>{},matchThreshold:b=.5,onMatchThresholdChange:v=()=>{},escalationKeywords:w=[],onEscalationKeywordsChange:C,showValidationErrors:k=!1})=>{let E=e.filter(e=>"embedding"!==e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(p.Space,{align:"center",style:{marginBottom:16},children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Complexity Tier Configuration"}),(0,t.jsx)(g.Tooltip,{title:"Map each complexity tier to one or more models. Simple queries use cheaper/faster models, complex queries use more capable models.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(L,{type:"secondary",style:{display:"block",marginBottom:24},children:"The complexity router automatically classifies requests by complexity using rule-based scoring (no API calls, <1ms latency). Configure which model(s) handle each tier."}),(0,t.jsx)(o.Card,{children:Object.keys(P).map((e,i)=>{let o=P[e],n=k&&0===s.tiers[e].length;return(0,t.jsxs)("div",{children:[i>0&&(0,t.jsx)(d.Divider,{style:{margin:"16px 0"}}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsxs)(L,{strong:!0,style:{fontSize:16},children:[o.label," Tier"]}),(0,t.jsx)(g.Tooltip,{title:o.description,children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)(L,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:["Examples: ",o.examples]}),(0,t.jsx)(a.Select,{mode:"multiple",value:s.tiers[e],onChange:t=>{r({...s,tiers:{...s.tiers,[e]:t}})},placeholder:`Select model(s) for ${o.label.toLowerCase()} queries`,showSearch:!0,style:{width:"100%"},options:E,status:n?"error":void 0}),s.tiers[e].length>1&&(0,t.jsx)(L,{type:"secondary",style:{fontSize:12},children:"Multiple models selected — the router randomly picks among them per request (or Thompson-samples within the pool when adaptive routing is on)."}),n&&(0,t.jsx)(L,{type:"danger",style:{fontSize:12},children:"This tier is required"})]})]},e)})}),(0,t.jsx)(d.Divider,{}),(0,t.jsx)(n.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"classifier",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Classification Method"}),children:(0,t.jsx)(T,{value:s,onChange:r,modelOptions:E,customTechnicalKeywords:i,onCustomTechnicalKeywordsChange:c,showValidationErrors:k})},{key:"adaptive",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Adaptive Routing"}),children:(0,t.jsx)(S,{value:s,onChange:r})},{key:"response",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Response Format"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(_.Switch,{checked:s.return_raw_model_name??!1,onChange:e=>r({...s,return_raw_model_name:e})}),(0,t.jsx)(L,{strong:!0,children:"Return raw model name"})]}),(0,t.jsx)(L,{type:"secondary",style:{display:"block",fontSize:12},children:"Return the resolved underlying model name in responses instead of the autorouter alias."})]})},...C?[{key:"escalation",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Escalation Keywords"}),children:(0,t.jsx)(N,{keywords:w,onChange:C})}]:[],...u||y?[{key:"keyword-semantic",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Keyword/Semantic Matching"}),children:(0,t.jsxs)(t.Fragment,{children:[u&&(0,t.jsx)(M,{rules:m,onChange:u}),u&&y&&(0,t.jsx)(d.Divider,{style:{margin:"16px 0"}}),y&&(0,t.jsx)(I,{enabled:h,onEnabledChange:y,embeddingModel:f,onEmbeddingModelChange:j,matchThreshold:b,onMatchThresholdChange:v,modelInfo:e,showValidationErrors:k})]})}]:[]]})]})}},539677,370410,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"};var r=e.i(9583),a=s.forwardRef(function(e,a){return s.createElement(r.default,(0,t.default)({},e,{ref:a,icon:l}))});e.s(["BranchesOutlined",0,a],539677);var i=e.i(602869),o=e.i(727749);let n=async(e,t,s,l)=>{try{let r;"complexity_router"===e.model_type?r={model_name:e.auto_router_name,litellm_params:{model:"auto_router/complexity_router",complexity_router_config:e.complexity_router_config,complexity_router_default_model:e.auto_router_default_model},model_info:{}}:(r={model_name:e.auto_router_name,litellm_params:{model:`auto_router/${e.auto_router_name}`,auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}},e.auto_router_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model)),e.team_id&&(r.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(r.model_info.access_groups=e.model_access_group),await (0,i.modelCreateCall)(t,r);let a="complexity_router"===e.model_type?"Auto Router":"Semantic Router";o.default.success(`Successfully created ${a}: ${e.auto_router_name}`),s.resetFields(),l&&l()}catch(e){console.error("Failed to add auto router:",e),o.default.fromBackend("Failed to add auto router: "+e)}};e.s(["handleAddAutoRouterSubmit",0,n],370410)},848573,e=>{"use strict";let t=["SIMPLE","MEDIUM","COMPLEX","REASONING"];e.s(["buildComplexityRouterConfig",0,({tiers:e,classifierType:t,classifierLlmConfig:s,customTechnicalKeywords:l,keywordTierRules:r,semanticMatchingEnabled:a,embeddingModel:i,matchThreshold:o,escalationKeywords:n,adaptive:d,adaptiveWeights:c,tierDistancePenalty:m,adaptiveEligible:u,returnRawModelName:h})=>{let p=n.map(e=>e.trim()).filter(Boolean),g=r.map(e=>({keywords:e.keywords.map(e=>e.trim()).filter(Boolean),tier:e.tier})).filter(e=>e.keywords.length>0);return{tiers:e,classifier_type:t,..."llm"===t&&s&&{classifier_llm_config:s},...l.length>0&&{custom_technical_keywords:l},...g.length>0&&{keyword_tier_rules:g},escalation_keywords:p,...a&&{semantic_keyword_matching:!0,embedding_model:i,match_threshold:o},...d&&{adaptive:!0,adaptive_weights:c,..."all"===u&&{tier_distance_penalty:m},adaptive_eligible:u},...h&&{return_raw_model_name:!0}}},"getMissingTiersError",0,e=>{let s=t.filter(t=>0===e[t].length);return 0===s.length?null:`Select a model for the following tier(s): ${s.join(", ")}`},"getSemanticConfigError",0,({semanticMatchingEnabled:e,embeddingModel:t,keywordTierRules:s})=>e?t?0===s.length?"Add at least one keyword tier rule to use semantic keyword matching":s.some(e=>!e.keywords.some(e=>e.trim()))?"Every keyword tier rule needs at least one keyword":null:"Select an embedding model to use semantic keyword matching":null])},838748,e=>{"use strict";e.s(["getSemanticRouterError",0,({defaultModel:e,embeddingModel:t,routerConfig:s})=>e?s?.routes&&0!==s.routes.length?t?s.routes.some(e=>!e.name||!e.description||(e.utterances?.length??0)===0)?"Please ensure all routes have a target model, description, and at least one utterance":null:"Please select an Embedding Model":"Please configure at least one route for the auto router":"Please select a Default Model"])},69509,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(175712),r=e.i(808613),a=e.i(464571),i=e.i(592968),o=e.i(898586),n=e.i(199133),d=e.i(91739),c=e.i(906579),m=e.i(770914),u=e.i(212931),h=e.i(962944),p=e.i(539677),g=e.i(599724),x=e.i(779241),y=e.i(602869),f=e.i(708347),j=e.i(370410),_=e.i(695411),b=e.i(492881),v=e.i(155964),w=e.i(491115),S=e.i(304720),C=e.i(848573),T=e.i(120566),k=e.i(838748),N=e.i(165776),E=e.i(727749);let{Title:A}=o.Typography;e.s(["default",0,({form:e,handleOk:M,accessToken:R,userRole:I})=>{let[L,O]=(0,s.useState)([]),[B,q]=(0,s.useState)([]),[P,D]=(0,s.useState)("recommended"),[F,z]=(0,s.useState)({tiers:{SIMPLE:[],MEDIUM:[],COMPLEX:[],REASONING:[]},classifier_type:"heuristic"}),[U,G]=(0,s.useState)([]),[H,K]=(0,s.useState)([]),[V,$]=(0,s.useState)(!1),[W,X]=(0,s.useState)(void 0),[Y,J]=(0,s.useState)(S.DEFAULT_MATCH_THRESHOLD),[Q,Z]=(0,s.useState)(w.DEFAULT_ESCALATION_KEYWORDS),[ee,et]=(0,s.useState)(!1),[es,el]=(0,s.useState)(null),[er,ea]=(0,s.useState)(!1),[ei,eo]=(0,s.useState)(!1),[en,ed]=(0,s.useState)(0),[ec,em]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{O((await (0,y.modelAvailableCall)(R,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[R]),(0,s.useEffect)(()=>{(async()=>{try{let e=await (0,_.fetchAvailableModels)(R);q(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[R]);let eu=f.all_admin_roles.includes(I),eh=Array.from(new Set(B.map(e=>e.model_group))).map(e=>({value:e,label:e})),ep=()=>{let t=e.getFieldValue("auto_router_name");if(!t){et(!0),e.validateFields(["auto_router_name"]).catch(()=>void 0),E.default.fromBackend("Please enter an Auto Router Name");return}if("recommended"===P)(t=>{let{tiers:s,classifier_type:l,classifier_llm_config:r,adaptive:a=!1,adaptive_weights:i=v.DEFAULT_ADAPTIVE_WEIGHTS,tier_distance_penalty:o=v.DEFAULT_TIER_DISTANCE_PENALTY,adaptive_eligible:n="all",return_raw_model_name:d=!1}=F,c=(0,C.getMissingTiersError)(s);if(c){et(!0),E.default.fromBackend(c);return}if("llm"===l&&!r?.model){et(!0),E.default.fromBackend("Please select a classifier model, or switch back to Heuristic");return}let m=(0,C.getSemanticConfigError)({semanticMatchingEnabled:V,embeddingModel:W,keywordTierRules:H});if(m){et(!0),E.default.fromBackend(m);return}let u=s.MEDIUM[0]||s.SIMPLE[0]||s.COMPLEX[0]||s.REASONING[0];e.setFieldsValue({custom_llm_provider:"auto_router",model:t,api_key:"not_required_for_auto_router",auto_router_default_model:u}),e.validateFields(["auto_router_name"]).then(c=>{let m={...c,auto_router_name:t,auto_router_default_model:u,model_type:"complexity_router",complexity_router_config:(0,C.buildComplexityRouterConfig)({tiers:s,classifierType:l,classifierLlmConfig:r,customTechnicalKeywords:U,keywordTierRules:H,semanticMatchingEnabled:V,embeddingModel:W,matchThreshold:Y,escalationKeywords:Q,adaptive:a,adaptiveWeights:i,tierDistancePenalty:o,adaptiveEligible:n,returnRawModelName:d}),model_access_group:e.getFieldValue("model_access_group")};(0,j.handleAddAutoRouterSubmit)(m,R,e,M)}).catch(e=>{console.error("Validation failed:",e),E.default.fromBackend("Please fill in all required fields")})})(t);else{let s;(s=(0,k.getSemanticRouterError)({defaultModel:e.getFieldValue("auto_router_default_model"),embeddingModel:e.getFieldValue("auto_router_embedding_model"),routerConfig:es}))?E.default.fromBackend(s):(e.setFieldsValue({custom_llm_provider:"auto_router",model:t,api_key:"not_required_for_auto_router"}),e.validateFields().then(s=>{let l={...s,auto_router_name:t,auto_router_config:es,model_type:"semantic_router"};(0,j.handleAddAutoRouterSubmit)(l,R,e,M)}).catch(e=>{console.error("Validation failed:",e),E.default.fromBackend("Please fill in all required fields")}))}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{level:2,children:"Add Auto Router"}),(0,t.jsx)(g.Text,{className:"text-gray-600 mb-6",children:"Create an auto router that automatically selects the best model based on request complexity or semantic matching. Use in place of a single default model."}),(0,t.jsx)(l.Card,{className:"mb-4",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium mb-2 block",children:"Router Type"}),(0,t.jsx)(d.Radio.Group,{value:P,onChange:e=>{D(e.target.value),et(!1)},className:"w-full",children:(0,t.jsxs)(m.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(d.Radio,{value:"recommended",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.ThunderboltOutlined,{className:"text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Auto-Router v2"}),(0,t.jsx)(c.Badge,{count:"Recommended",style:{backgroundColor:"#52c41a",fontSize:"10px",padding:"0 6px"}})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes by request complexity across four tiers, with optional keyword-to-tier overrides and semantic keyword matching. No training data needed."})]}),(0,t.jsxs)(d.Radio,{value:"semantic",className:"w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.BranchesOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Semantic Router [to be deprecated]"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes based on semantic similarity to example utterances. Requires an embedding model and example utterances."})]})]})})]})}),(0,t.jsx)(l.Card,{children:(0,t.jsxs)(r.Form,{form:e,onFinish:ep,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(r.Form.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(x.TextInput,{placeholder:"e.g., smart_router, auto_router_1"})}),"recommended"===P?(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(v.default,{modelInfo:B,value:F,onChange:z,customTechnicalKeywords:U,onCustomTechnicalKeywordsChange:G,keywordTierRules:H,onKeywordTierRulesChange:K,semanticMatchingEnabled:V,onSemanticMatchingEnabledChange:$,embeddingModel:W,onEmbeddingModelChange:X,matchThreshold:Y,onMatchThresholdChange:J,escalationKeywords:Q,onEscalationKeywordsChange:Z,showValidationErrors:ee})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(b.default,{modelInfo:B,value:es,onChange:t=>{el(t),e.setFieldValue("auto_router_config",t)}})}),(0,t.jsx)(r.Form.Item,{rules:[{required:!0,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(n.Select,{placeholder:"Select a default model",options:eh,style:{width:"100%"},showSearch:!0})}),(0,t.jsx)(r.Form.Item,{rules:[{required:!0,message:"Embedding model is required"}],label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(n.Select,{placeholder:"Select an embedding model",options:eh,style:{width:"100%"},showSearch:!0})})]}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,t.jsx)("div",{className:"grow border-t border-gray-200"})]}),eu&&(0,t.jsx)(r.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,t.jsx)(n.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:L.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(i.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(o.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:["recommended"===P&&(0,t.jsx)(a.Button,{"data-testid":"auto-router-test-connect-btn",onClick:()=>{let e=(0,T.buildAutoRouterTestTargets)({tiers:F.tiers,semanticMatchingEnabled:V,embeddingModel:W});0===e.length?E.default.fromBackend("Please select at least one model for a complexity tier"):(em(e),ed(e=>e+1),eo(!0),ea(!0))},loading:ei,children:"Test Connection"}),(0,t.jsx)(a.Button,{type:"primary",onClick:()=>{ep()},children:"Add Auto Router"})]})]})]})}),(0,t.jsx)(u.Modal,{title:"Connection Test Results",open:er,onCancel:()=>{ea(!1),eo(!1)},footer:[(0,t.jsx)(a.Button,{onClick:()=>{ea(!1),eo(!1)},children:"Close"},"close")],width:700,children:er&&(0,t.jsx)(N.default,{accessToken:R,targets:ec,onTestComplete:()=>eo(!1)},en)})]})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/08yk0x-hh3ydk.js b/litellm/proxy/_experimental/out/_next/static/chunks/08yk0x-hh3ydk.js
new file mode 100644
index 00000000000..59041d3173f
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/08yk0x-hh3ydk.js
@@ -0,0 +1,2 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,540626,e=>{"use strict";let t;var n,i=e.i(271645);let s=(0,i.createContext)(null);function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=o(e);if(n.length!==o(t).length)return!1;for(let i=0;ie,n){let s=n?.compare??a,r=(0,i.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),o=(0,i.useCallback)(()=>e.get(),[e]);return(0,l.useSyncExternalStoreWithSelector)(r,o,o,t,s)}function d(e,...t){return"function"==typeof e?e(...t):e}var c=class{#e=!0;#t;#n;#i;#s;#r;#o;#l;#a=0;#u=5;#d=!1;#c=!1;#h=null;#g=()=>{this.debugLog("Connected to event bus"),this.#r=!0,this.#d=!1,this.debugLog("Emitting queued events",this.#s),this.#s.forEach(e=>this.emitEventToBus(e)),this.#s=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#g)};#v=()=>{if(this.#a{this.#d||(this.#d=!0,this.#n().addEventListener("tanstack-connect-success",this.#g),this.#v())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:i=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#i=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#s=[],this.#r=!1,this.#c=!1,this.#o=null,this.#l=i}startConnectLoop(){null!==this.#o||this.#r||(this.debugLog(`Starting connect loop (every ${this.#l}ms)`),this.#o=setInterval(this.#v,this.#l))}stopConnectLoop(){this.#d=!1,null!==this.#o&&(clearInterval(this.#o),this.#o=null,this.#s=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#i&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#h&&(this.debugLog("Emitting event to internal event target",e,t),this.#h.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#c)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#r){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#s.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#d&&(this.#p(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let i=n?.withEventTarget??!1,s=`${this.#t}:${e}`;if(i&&(this.#h||(this.#h=new EventTarget),this.#h.addEventListener(s,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",s),()=>{};let r=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(s,r),this.debugLog("Registered event to bus",s),()=>{i&&this.#h?.removeEventListener(s,r),this.#n().removeEventListener(s,r)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let h=new Map;function g(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let v=new class extends c{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}},p=((n={})[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n);function f(e,t,n){let i="object"==typeof e,s=i?e:void 0;return{next:(i?e.next:e)?.bind(s),error:(i?e.error:t)?.bind(s),complete:(i?e.complete:n)?.bind(s)}}let b=[],m=0,{link:E,unlink:y,propagate:C,checkDirty:T,shallowPropagate:S}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let i=t.depsTail;if(void 0!==i&&i.dep===e)return;let s=void 0!==i?i.nextDep:t.deps;if(void 0!==s&&s.dep===e){s.version=n,t.depsTail=s;return}let r=e.subsTail;if(void 0!==r&&r.version===n&&r.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:i,nextDep:s,prevSub:r,nextSub:void 0};void 0!==s&&(s.prevDep=o),void 0!==i?i.nextDep=o:t.deps=o,void 0!==r?r.nextSub=o:e.subs=o},unlink:function(e,t=e.sub){let i=e.dep,s=e.prevDep,r=e.nextDep,o=e.nextSub,l=e.prevSub;return void 0!==r?r.prevDep=s:t.depsTail=s,void 0!==s?s.nextDep=r:t.deps=r,void 0!==o?o.prevSub=l:i.subsTail=l,void 0!==l?l.nextSub=o:void 0===(i.subs=o)&&n(i),r},propagate:function(e){let n,i=e.nextSub;e:for(;;){let s=e.sub,r=s.flags;if(r&(p.RecursedCheck|p.Recursed|p.Dirty|p.Pending)?r&(p.RecursedCheck|p.Recursed)?r&p.RecursedCheck?!(r&(p.Dirty|p.Pending))&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,s)?(s.flags=r|(p.Recursed|p.Pending),r&=p.Mutable):r=p.None:s.flags=r&~p.Recursed|p.Pending:r=p.None:s.flags=r|p.Pending,r&p.Watching&&t(s),r&p.Mutable){let t=s.subs;if(void 0!==t){let s=(e=t).nextSub;void 0!==s&&(n={value:i,prev:n},i=s);continue}}if(void 0!==(e=i)){i=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){i=e.nextSub;continue e}break}},checkDirty:function(t,n){let s,r=0,o=!1;e:for(;;){let l=t.dep,a=l.flags;if(n.flags&p.Dirty)o=!0;else if((a&(p.Mutable|p.Dirty))==(p.Mutable|p.Dirty)){if(e(l)){let e=l.subs;void 0!==e.nextSub&&i(e),o=!0}}else if((a&(p.Mutable|p.Pending))==(p.Mutable|p.Pending)){(void 0!==t.nextSub||void 0!==t.prevSub)&&(s={value:t,prev:s}),t=l.deps,n=l,++r;continue}if(!o){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;r--;){let r=n.subs,l=void 0!==r.nextSub;if(l?(t=s.value,s=s.prev):t=r,o){if(e(n)){l&&i(r),n=t.sub;continue}o=!1}else n.flags&=~p.Pending;n=t.sub;let a=t.nextDep;if(void 0!==a){t=a;continue e}}return o}},shallowPropagate:i};function i(e){do{let n=e.sub,i=n.flags;(i&(p.Pending|p.Dirty))===p.Pending&&(n.flags=i|p.Dirty,(i&(p.Watching|p.RecursedCheck))===p.Watching&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){b[k++]=e,e.flags&=~p.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=p.Mutable|p.Dirty,I(e))}}),x=0,k=0;function I(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=y(n,e)}var P=class{constructor(e,n){this.atom=function(e){let n="function"==typeof e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?p.None:p.Mutable,get:()=>(void 0!==t&&E(i,t,m),i._snapshot),subscribe(e){var n;let s,r,o=f(e),l={current:!1},a=(n=()=>{i.get(),l.current?o.next?.(i._snapshot):l.current=!0},s=()=>{let e=t;t=r,++m,r.depsTail=void 0,r.flags=p.Watching|p.RecursedCheck;try{return n()}finally{t=e,r.flags&=~p.RecursedCheck,I(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:p.Watching|p.RecursedCheck,notify(){let e=this.flags;e&p.Dirty||e&p.Pending&&T(this.deps,this)?s():this.flags=p.Watching},stop(){this.flags=p.None,this.depsTail=void 0,I(this)}},s(),r);return{unsubscribe:()=>{a.stop()}}},_update(s){let r=t,o=(void 0)??Object.is;if(n)t=i,++m,i.depsTail=void 0;else if(void 0===s)return!1;n&&(i.flags=p.Mutable|p.RecursedCheck);try{let t=i._snapshot,r="function"==typeof s?s(t):void 0===s&&n?e(t):s;if(void 0===t||!o(t,r))return i._snapshot=r,!0;return!1}finally{t=r,n&&(i.flags&=~p.RecursedCheck),I(i)}}};return n?(i.flags=p.Mutable|p.Dirty,i.get=function(){let e=i.flags;if(e&p.Dirty||e&p.Pending&&T(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&S(e)}}else e&p.Pending&&(i.flags=e&~p.Pending);return void 0!==t&&E(i,t,m),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;if(void 0!==e&&(C(e),S(e),1)){for(;x{this.options={...this.options,...e},this.#b()||this.cancel()},this.#m=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:i}=n;return{...n,status:this.#b()?i?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;if(n){var i,s;h.set(n,t),v.emit(e,{key:(i={...t,key:n}).key,store:{state:g("function"==typeof(s=i.store).get?s.get():s.state)},options:g(i.options)})}})("Debouncer",this)},this.#b=()=>!!d(this.options.enabled,this),this.#E=()=>d(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#b())return;this.#m({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#m({canLeadingExecute:!1}),t=!0,this.#y(...e)),this.options.trailing&&this.#m({isPending:!0,lastArgs:e}),this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#m({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#y(...e)},this.#E())},this.#y=(...e)=>{this.#b()&&(this.fn(...e),this.#m({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#C(),this.#y(...this.store.state.lastArgs))},this.#C=()=>{this.#f&&(clearTimeout(this.#f),this.#f=void 0)},this.cancel=()=>{this.#C(),this.#m({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#m(D())},this.key=t.key,this.options={...w,...t},this.#m(this.options.initialState??{}),this.key&&v.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#m(e.payload.store.state),this.setOptions(e.payload.options))})}#m;#b;#E;#y;#C};e.s(["useDebouncer",0,function(e,t,n=()=>({})){let o={...((0,i.useContext)(s)?.defaultOptions??{}).debouncer,...t},[l]=(0,i.useState)(()=>{let t=new L(e,o);return t.Subscribe=function(e){let n=u(t.store,e.selector,{compare:r});return"function"==typeof e.children?e.children(n):e.children},t});l.fn=e,l.setOptions(o),(0,i.useEffect)(()=>()=>{o.onUnmount?o.onUnmount(l):l.cancel()},[]);let a=u(l.store,n,{compare:r});return(0,i.useMemo)(()=>({...l,state:a}),[l,a])}],540626)},741466,e=>{"use strict";e.s(["DEBOUNCE_WAIT_MS",0,300])},399029,e=>{"use strict";var t=e.i(540626),n=e.i(271645);e.s(["useDebouncedState",0,function(e,i,s){let[r,o]=(0,n.useState)(e),l=(0,t.useDebouncer)(o,i,s);return[r,l.maybeExecute,l]}])},233538,e=>{"use strict";e.s(["isDisabledReactIssue7711",0,function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let i=(null==t?void 0:t.getAttribute("disabled"))==="";return!(i&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&i}])},83733,233137,e=>{"use strict";let t,n;var i,s,r=e.i(247167),o=e.i(271645),l=e.i(544508),a=e.i(746725),u=e.i(835696);void 0!==r.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(i=null==r.default?void 0:r.default.env)?void 0:i.NODE_ENV)==="test"&&void 0===(null==(s=null==Element?void 0:Element.prototype)?void 0:s.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
+`)),[]});var d=((t=d||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);e.s(["transitionDataAttributes",0,function(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t},"useTransition",0,function(e,t,n,i){let[s,r]=(0,o.useState)(n),{hasFlag:d,addFlag:c,removeFlag:h}=function(e=0){let[t,n]=(0,o.useState)(e),i=(0,o.useCallback)(e=>n(e),[t]),s=(0,o.useCallback)(e=>n(t=>t|e),[t]),r=(0,o.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:i,addFlag:s,hasFlag:r,removeFlag:(0,o.useCallback)(e=>n(t=>t&~e),[n]),toggleFlag:(0,o.useCallback)(e=>n(t=>t^e),[n])}}(e&&s?3:0),g=(0,o.useRef)(!1),v=(0,o.useRef)(!1),p=(0,a.useDisposables)();return(0,u.useIsoMorphicEffect)(()=>{var s;if(e){if(n&&r(!0),!t){n&&c(3);return}return null==(s=null==i?void 0:i.start)||s.call(i,n),function(e,{prepare:t,run:n,done:i,inFlight:s}){let r=(0,l.disposables)();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return n();let i=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=i}(e,{prepare:t,inFlight:s}),r.nextFrame(()=>{n(),r.requestAnimationFrame(()=>{r.add(function(e,t){var n,i;let s=(0,l.disposables)();if(!e)return s.dispose;let r=!1;s.add(()=>{r=!0});let o=null!=(i=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?i:[];return 0===o.length?t():Promise.allSettled(o.map(e=>e.finished)).then(()=>{r||t()}),s.dispose}(e,i))})}),r.dispose}(t,{inFlight:g,prepare(){v.current?v.current=!1:v.current=g.current,g.current=!0,v.current||(n?(c(3),h(4)):(c(4),h(2)))},run(){v.current?n?(h(3),c(4)):(h(4),c(3)):n?h(1):c(1)},done(){var e;v.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(g.current=!1,h(7),n||r(!1),null==(e=null==i?void 0:i.end)||e.call(i,n))}})}},[e,n,t,p]),e?[s,{closed:d(1),enter:d(2),leave:d(4),transition:d(2)||d(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}],83733);let c=(0,o.createContext)(null);c.displayName="OpenClosedContext";var h=((n=h||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);e.s(["OpenClosedProvider",0,function({value:e,children:t}){return o.default.createElement(c.Provider,{value:e},t)},"ResetOpenClosedProvider",0,function({children:e}){return o.default.createElement(c.Provider,{value:null},e)},"State",0,h,"useOpenClosed",0,function(){return(0,o.useContext)(c)}],233137)},677667,674175,886148,543086,e=>{"use strict";let t,n;var i,s=e.i(290571),r=e.i(783222),o=e.i(433336),l=e.i(271645),a=e.i(394487),u=e.i(914189),d=e.i(144279),c=e.i(294316),h=e.i(83733);let g=(0,l.createContext)(()=>{});function v({value:e,children:t}){return l.default.createElement(g.Provider,{value:e},t)}e.s(["CloseProvider",0,v],674175);var p=e.i(233137),f=e.i(233538),b=e.i(397701),m=e.i(402155),E=e.i(700020);let y=null!=(i=l.default.startTransition)?i:function(e){e()};var C=e.i(998348),T=((t=T||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),S=((n=S||{})[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.SetButtonElement=4]="SetButtonElement",n[n.SetPanelElement=5]="SetPanelElement",n);let x={0:e=>({...e,disclosureState:(0,b.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},k=(0,l.createContext)(null);function I(e){let t=(0,l.useContext)(k);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,I),t}return t}k.displayName="DisclosureContext";let P=(0,l.createContext)(null);P.displayName="DisclosureAPIContext";let D=(0,l.createContext)(null);function w(e,t){return(0,b.match)(t.type,x,e,t)}D.displayName="DisclosurePanelContext";let L=l.Fragment,R=E.RenderFeatures.RenderStrategy|E.RenderFeatures.Static,O=Object.assign((0,E.forwardRefWithAs)(function(e,t){let{defaultOpen:n=!1,...i}=e,s=(0,l.useRef)(null),r=(0,c.useSyncRefs)(t,(0,c.optionalRef)(e=>{s.current=e},void 0===e.as||e.as===l.Fragment)),o=(0,l.useReducer)(w,{disclosureState:+!n,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:a,buttonId:d},h]=o,g=(0,u.useEvent)(e=>{h({type:1});let t=(0,m.getOwnerDocument)(s);if(!t||!d)return;let n=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==n||n.focus()}),f=(0,l.useMemo)(()=>({close:g}),[g]),y=(0,l.useMemo)(()=>({open:0===a,close:g}),[a,g]),C=(0,E.useRender)();return l.default.createElement(k.Provider,{value:o},l.default.createElement(P.Provider,{value:f},l.default.createElement(v,{value:g},l.default.createElement(p.OpenClosedProvider,{value:(0,b.match)(a,{0:p.State.Open,1:p.State.Closed})},C({ourProps:{ref:r},theirProps:i,slot:y,defaultTag:L,name:"Disclosure"})))))}),{Button:(0,E.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:i=`headlessui-disclosure-button-${n}`,disabled:s=!1,autoFocus:h=!1,...g}=e,[v,p]=I("Disclosure.Button"),b=(0,l.useContext)(D),m=null!==b&&b===v.panelId,y=(0,l.useRef)(null),T=(0,c.useSyncRefs)(y,t,(0,u.useEvent)(e=>{if(!m)return p({type:4,element:e})}));(0,l.useEffect)(()=>{if(!m)return p({type:2,buttonId:i}),()=>{p({type:2,buttonId:null})}},[i,p,m]);let S=(0,u.useEvent)(e=>{var t;if(m){if(1===v.disclosureState)return;switch(e.key){case C.Keys.Space:case C.Keys.Enter:e.preventDefault(),e.stopPropagation(),p({type:0}),null==(t=v.buttonElement)||t.focus()}}else switch(e.key){case C.Keys.Space:case C.Keys.Enter:e.preventDefault(),e.stopPropagation(),p({type:0})}}),x=(0,u.useEvent)(e=>{e.key===C.Keys.Space&&e.preventDefault()}),k=(0,u.useEvent)(e=>{var t;(0,f.isDisabledReactIssue7711)(e.currentTarget)||s||(m?(p({type:0}),null==(t=v.buttonElement)||t.focus()):p({type:0}))}),{isFocusVisible:P,focusProps:w}=(0,r.useFocusRing)({autoFocus:h}),{isHovered:L,hoverProps:R}=(0,o.useHover)({isDisabled:s}),{pressed:O,pressProps:A}=(0,a.useActivePress)({disabled:s}),N=(0,l.useMemo)(()=>({open:0===v.disclosureState,hover:L,active:O,disabled:s,focus:P,autofocus:h}),[v,L,O,P,s,h]),M=(0,d.useResolveButtonType)(e,v.buttonElement),_=m?(0,E.mergeProps)({ref:T,type:M,disabled:s||void 0,autoFocus:h,onKeyDown:S,onClick:k},w,R,A):(0,E.mergeProps)({ref:T,id:i,type:M,"aria-expanded":0===v.disclosureState,"aria-controls":v.panelElement?v.panelId:void 0,disabled:s||void 0,autoFocus:h,onKeyDown:S,onKeyUp:x,onClick:k},w,R,A);return(0,E.useRender)()({ourProps:_,theirProps:g,slot:N,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,E.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:i=`headlessui-disclosure-panel-${n}`,transition:s=!1,...r}=e,[o,a]=I("Disclosure.Panel"),{close:d}=function e(t){let n=(0,l.useContext)(P);if(null===n){let n=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}return n}("Disclosure.Panel"),[g,v]=(0,l.useState)(null),f=(0,c.useSyncRefs)(t,(0,u.useEvent)(e=>{y(()=>a({type:5,element:e}))}),v);(0,l.useEffect)(()=>(a({type:3,panelId:i}),()=>{a({type:3,panelId:null})}),[i,a]);let b=(0,p.useOpenClosed)(),[m,C]=(0,h.useTransition)(s,g,null!==b?(b&p.State.Open)===p.State.Open:0===o.disclosureState),T=(0,l.useMemo)(()=>({open:0===o.disclosureState,close:d}),[o.disclosureState,d]),S={ref:f,id:i,...(0,h.transitionDataAttributes)(C)},x=(0,E.useRender)();return l.default.createElement(p.ResetOpenClosedProvider,null,l.default.createElement(D.Provider,{value:o.panelId},x({ourProps:S,theirProps:r,slot:T,defaultTag:"div",features:R,visible:m,name:"Disclosure.Panel"})))})});e.s(["Disclosure",0,O],886148);let A=(0,l.createContext)(void 0);var N=e.i(444755);let M=(0,e.i(673706).makeClassName)("Accordion"),_=(0,l.createContext)({isOpen:!1}),F=l.default.forwardRef((e,t)=>{var n;let{defaultOpen:i=!1,children:r,className:o}=e,a=(0,s.__rest)(e,["defaultOpen","children","className"]),u=null!=(n=(0,l.useContext)(A))?n:(0,N.tremorTwMerge)("rounded-tremor-default border");return l.default.createElement(O,Object.assign({as:"div",ref:t,className:(0,N.tremorTwMerge)(M("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",u,o),defaultOpen:i},a),({open:e})=>l.default.createElement(_.Provider,{value:{isOpen:e}},r))});F.displayName="Accordion",e.s(["OpenContext",0,_,"default",0,F],543086),e.s(["Accordion",0,F],677667)},898667,e=>{"use strict";var t=e.i(290571),n=e.i(271645),i=e.i(886148);let s=e=>{var i=(0,t.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},i),n.default.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 r=e.i(543086),o=e.i(444755);let l=(0,e.i(673706).makeClassName)("AccordionHeader"),a=n.default.forwardRef((e,a)=>{let{children:u,className:d}=e,c=(0,t.__rest)(e,["children","className"]),{isOpen:h}=(0,n.useContext)(r.OpenContext);return n.default.createElement(i.Disclosure.Button,Object.assign({ref:a,className:(0,o.tremorTwMerge)(l("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",d)},c),n.default.createElement("div",{className:(0,o.tremorTwMerge)(l("children"),"flex flex-1 text-inherit mr-4")},u),n.default.createElement("div",null,n.default.createElement(s,{className:(0,o.tremorTwMerge)(l("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",h?"transition-all":"transition-all -rotate-180")})))});a.displayName="AccordionHeader",e.s(["AccordionHeader",0,a],898667)},130643,e=>{"use strict";var t=e.i(290571),n=e.i(271645),i=e.i(886148),s=e.i(444755);let r=(0,e.i(673706).makeClassName)("AccordionBody"),o=n.default.forwardRef((e,o)=>{let{children:l,className:a}=e,u=(0,t.__rest)(e,["children","className"]);return n.default.createElement(i.Disclosure.Panel,Object.assign({ref:o,className:(0,s.tremorTwMerge)(r("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",a)},u),l)});o.displayName="AccordionBody",e.s(["AccordionBody",0,o],130643)},860585,e=>{"use strict";var t=e.i(843476),n=e.i(199133);let{Option:i}=n.Select;e.s(["default",0,({value:e,onChange:s,className:r="",style:o={}})=>(0,t.jsxs)(n.Select,{style:{width:"100%",...o},value:e||void 0,onChange:s,className:r,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(i,{value:"1h",children:"hourly"}),(0,t.jsx)(i,{value:"24h",children:"daily"}),(0,t.jsx)(i,{value:"7d",children:"weekly"}),(0,t.jsx)(i,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0965-angwdvwe.js b/litellm/proxy/_experimental/out/_next/static/chunks/0965-angwdvwe.js
deleted file mode 100644
index 42a71f5bd10..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0965-angwdvwe.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,263005,e=>{"use strict";var a=e.i(843476);e.s(["PageHeader",0,function({title:e,subtitle:t,icon:l,actions:i}){return(0,a.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[null!=l&&(0,a.jsx)("span",{className:"flex flex-none items-center text-foreground",children:l}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),null!=t&&(0,a.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:t})]})]}),null!=i&&(0,a.jsx)("div",{className:"flex items-center gap-2",children:i})]})}])},655063,e=>{"use strict";var a=e.i(399029),t=e.i(271645);e.s(["useDebouncedValue",0,function(e,l,i){let[s,r,n]=(0,a.useDebouncedState)(e,l,i);return(0,t.useEffect)(()=>{r(e)},[e,r]),[s,n]}])},624687,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(115504);let i=t.forwardRef(({className:e,...t},i)=>(0,a.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,l.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(115504),i=e.i(519455),s=e.i(793479),r=e.i(624687);let n=(0,l.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,l.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=t.forwardRef(({className:e,type:t="button",variant:s="ghost",size:r="xs",...n},d)=>(0,a.jsx)(i.Button,{ref:d,type:t,"data-size":r,variant:s,className:(0,l.cn)(o({size:r}),e),...n}));d.displayName="InputGroupButton";let u=t.forwardRef(({className:e,...t},i)=>(0,a.jsx)(s.Input,{ref:i,"data-slot":"input-group-control",className:(0,l.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...t}));u.displayName="InputGroupInput",t.forwardRef(({className:e,...t},i)=>(0,a.jsx)(r.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,l.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...t})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,l.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})},"InputGroupAddon",0,function({className:e,align:t="inline-start",...i}){return(0,a.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,l.cn)(n({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...t}){return(0,a.jsx)("span",{className:(0,l.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}])},552546,e=>{"use strict";var a=e.i(843476),t=e.i(131792);let l=(e,a)=>{let t=a.trim().toLowerCase();return!t||e.label.toLowerCase().includes(t)||(e.sublabel?.toLowerCase().includes(t)??!1)};e.s(["SearchSelect",0,function({options:e,value:i,onValueChange:s,placeholder:r="Select…",emptyText:n="No results",disabled:o=!1,className:d}){let u=e.find(e=>e.value===i)??null;return(0,a.jsxs)(t.Combobox,{items:e,value:u,onValueChange:e=>s(e?.value??""),isItemEqualToValue:(e,a)=>e.value===a.value,itemToStringLabel:e=>e.label,filter:l,disabled:o,children:[(0,a.jsx)(t.ComboboxInput,{placeholder:r,showClear:null!=i&&""!==i,className:`w-full ${d??""}`}),(0,a.jsxs)(t.ComboboxContent,{children:[(0,a.jsx)(t.ComboboxEmpty,{children:n}),(0,a.jsx)(t.ComboboxList,{children:e=>(0,a.jsx)(t.ComboboxItem,{value:e,children:(0,a.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,a.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,a.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},611363,e=>{"use strict";e.s(["navigateWithParams",0,function(e){let a=new URLSearchParams(window.location.search);e(a);let t=a.toString(),l=t?`${window.location.pathname}?${t}`:window.location.pathname;window.history.pushState(null,"",l)}])},502501,e=>{"use strict";var a=e.i(843476),t=e.i(785242),l=e.i(135214),i=e.i(268004),s=e.i(309426),r=e.i(350967),n=e.i(947293),o=e.i(271645),d=e.i(602869);let u=async(e,a,t,l,i)=>{i("Admin"!=t&&"Admin Viewer"!=t?await (0,d.teamListCall)(e,l?.organization_id||null,a):await (0,d.teamListCall)(e,l?.organization_id||null))};var c=e.i(702597),m=e.i(618566),p=e.i(611363),g=e.i(266027),x=e.i(207082),h=e.i(109799),f=e.i(741466);e.i(707701);var b=e.i(807235),v=e.i(981080),y=e.i(531649),_=e.i(552546),k=e.i(263005),w=e.i(793479),j=e.i(655063),S=e.i(465261),C=e.i(20147),I=e.i(827252),N=e.i(282786),z=e.i(898586),D=e.i(494862),T=e.i(302747);e.i(622826);var K=e.i(200208),A=e.i(399536),U=e.i(997422),E=e.i(547227),V=e.i(630500),M=e.i(112179),R=e.i(304911);let L=[{id:"spend",label:"Spend"},{id:"max_budget",label:"Budget"}],B=({userAlias:e,userEmail:t,userId:l,width:i})=>{let s=e||t||l,r="default_user_id"===l,n=(0,a.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:e},{label:"User Email",value:t},{label:"User ID",value:l}].map(({label:e,value:t})=>(0,a.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,a.jsx)("span",{className:"text-gray-400",children:e}),t?(0,a.jsx)(z.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:t},copyable:!0,children:t}):(0,a.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!r||e||t?(0,a.jsx)(N.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,a.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:i,overflow:"hidden"},children:s||"-"})}):(0,a.jsx)(N.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,a.jsx)("span",{className:"cursor-default",children:(0,a.jsx)(R.default,{userId:l})})})},P=({label:e,tooltip:t})=>(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[e,(0,a.jsx)(N.Popover,{content:t,trigger:"hover",children:(0,a.jsx)(I.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),O={token:!1,organization_alias:!1,created_by:!1,updated_at:!1,expires:!1,rate_limits:!1},F=[{id:"created_at",desc:!0}],G={team_id:"Team",org_id:"Organization",user_id:"User ID",key_hash:"Key ID"};function H({headerActions:e}){let i,s,r,{data:n}=(0,h.useOrganizations)(),u=(0,o.useMemo)(()=>n??[],[n]),{data:c}=(0,t.useAllTeams)(),I=(0,o.useMemo)(()=>c??[],[c]),{keyId:N,openKey:z,close:R}=(i=(0,m.useSearchParams)(),s=(0,o.useCallback)(e=>{(0,p.navigateWithParams)(a=>{a.set("key",e)})},[]),r=(0,o.useCallback)(()=>{(0,p.navigateWithParams)(e=>{e.delete("key")})},[]),{keyId:i?.get("key")??null,openKey:s,close:r}),[W,q]=(0,o.useState)(F),[$,J]=(0,o.useState)({pageIndex:0,pageSize:50}),[Q,X]=(0,o.useState)([]),[Y,Z]=(0,o.useState)(!1),[ee,ea]=(0,o.useState)(""),[et]=(0,j.useDebouncedValue)(ee,{wait:f.DEBOUNCE_WAIT_MS}),el=(0,o.useCallback)(e=>{let a=Q.find(a=>a.id===e);return"string"==typeof a?.value&&a.value.trim()?a.value.trim():void 0},[Q]),ei=W[0]?.id,es=(e=>{let a=e[0];if(a)return a.desc?"desc":"asc"})(W),er={teamID:el("team_id"),organizationID:el("org_id"),selectedKeyAlias:et.trim()||void 0,userID:el("user_id"),keyHash:el("key_hash"),sortBy:ei,sortOrder:es,expand:"user"},{data:en,isPending:eo,isFetching:ed,refetch:eu}=(0,x.useKeys)($.pageIndex+1,$.pageSize,er),ec=(0,o.useMemo)(()=>en?.keys??[],[en]),em=en?.total_count??0,ep=(0,o.useCallback)(e=>{ea(e),J(e=>({...e,pageIndex:0}))},[]),eg=(0,o.useCallback)(e=>{q(e),J(e=>({...e,pageIndex:0}))},[]),ex=(0,o.useCallback)(e=>{X(e),J(e=>({...e,pageIndex:0}))},[]),eh=(0,o.useMemo)(()=>(({allTeams:e,organizations:t,onSelectKey:l})=>[{id:"key_alias",accessorKey:"key_alias",meta:{title:"Key",renderSkeleton:()=>(0,a.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,a.jsx)(T.Skeleton,{className:"h-4 w-32"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(T.Skeleton,{className:"h-3 w-20"}),(0,a.jsx)(T.Skeleton,{className:"h-5 w-16 rounded-full"})]})]})},header:({column:e})=>(0,a.jsx)(D.DataTableSortHeader,{column:e,title:"Key",variant:"header-cycle"}),size:260,enableSorting:!0,cell:({row:e})=>{let t=(e=>{if(!0===e.blocked)return{tone:"error",label:"Blocked",tooltip:e.metadata?.scim_blocked===!0?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401."};let a=e.expires?Date.parse(e.expires):NaN;return!Number.isNaN(a)&&al(e.original)})}},{id:"token",accessorKey:"token",meta:{title:"Key ID"},header:({column:e})=>(0,a.jsx)(D.DataTableSortHeader,{column:e,title:"Key ID",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,a.jsx)(A.IdCell,{value:e.getValue(),onClick:()=>l(e.row.original)})},{id:"team_alias",accessorKey:"team_id",meta:{title:"Team"},header:"Team",size:120,enableSorting:!1,cell:t=>{let l=t.getValue();if(!l)return"-";let i=e.find(e=>e.team_id===l),s=i?.team_alias||l,r=t.cell.column.getSize();return(0,a.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"organization_alias",accessorKey:"org_id",meta:{title:"Organization"},header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let i=t.find(e=>e.organization_id===l),s=i?.organization_alias||l,r=e.cell.column.getSize();return(0,a.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",meta:{title:"User"},header:()=>(0,a.jsx)(P,{label:"User",tooltip:"Displays the first available value: User Alias, User Email, or User ID."}),size:160,enableSorting:!1,cell:({row:e})=>{let t=e.original;return(0,a.jsx)(B,{userAlias:t.user?.user_alias??null,userEmail:t.user?.user_email??t.user_email??null,userId:t.user_id??null,width:160})}},{id:"created_at",accessorKey:"created_at",meta:{title:"Created At"},header:({column:e})=>(0,a.jsx)(D.DataTableSortHeader,{column:e,title:"Created At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,a.jsx)(K.DateCell,{value:e.getValue(),precision:"date"})},{id:"created_by",accessorKey:"created_by",meta:{title:"Created By"},header:"Created By",size:160,enableSorting:!1,cell:e=>{let t=e.getValue();if(!t)return"-";let l=e.row.original.created_by_user;return(0,a.jsx)(B,{userAlias:l?.user_alias??null,userEmail:l?.user_email??null,userId:t,width:160})}},{id:"updated_at",accessorKey:"updated_at",meta:{title:"Updated At"},header:({column:e})=>(0,a.jsx)(D.DataTableSortHeader,{column:e,title:"Updated At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,a.jsx)(K.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"last_active",accessorKey:"last_active",meta:{title:"Last Active"},header:()=>(0,a.jsx)(P,{label:"Last Active",tooltip:"This is a new field and is not backfilled. Only new key usage will update this value."}),size:130,enableSorting:!1,cell:e=>(0,a.jsx)(K.DateCell,{value:e.getValue(),precision:"date",fallback:"Unknown"})},{id:"expires",accessorKey:"expires",meta:{title:"Expires"},header:"Expires",size:120,enableSorting:!1,cell:e=>(0,a.jsx)(K.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend / Budget",skeleton:"meter"},header:({table:e})=>(0,a.jsx)(D.DataTableMultiSortHeader,{table:e,fields:L}),size:180,enableSorting:!0,cell:({row:t})=>{let l=t.original.team_id,i=e.find(e=>e.team_id===l);return(0,a.jsx)(V.SpendBudgetCell,{spend:t.original.spend,maxBudget:t.original.max_budget,teamMaxBudget:i?.max_budget??null})}},{id:"budget_reset_at",accessorKey:"budget_reset_at",meta:{title:"Budget Reset"},header:"Budget Reset",size:130,enableSorting:!1,cell:e=>(0,a.jsx)(K.DateCell,{value:e.getValue(),fallback:"Never"})},{id:"models",accessorKey:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:220,enableSorting:!1,cell:e=>(0,a.jsx)(E.ModelsCell,{models:e.getValue(),allowedRoutes:e.row.original.allowed_routes,keyType:e.row.original.key_type})},{id:"rate_limits",meta:{title:"Rate Limits"},header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let t=e.original;return(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsxs)("div",{children:["TPM: ",null!==t.tpm_limit?t.tpm_limit:"Unlimited"]}),(0,a.jsxs)("div",{children:["RPM: ",null!==t.rpm_limit?t.rpm_limit:"Unlimited"]})]})}}])({allTeams:I,organizations:u,onSelectKey:e=>z(e.token)}),[I,u,z]),ef=(0,o.useMemo)(()=>ec.find(e=>e.token===N),[ec,N]),{data:eb,isError:ev}=function(e,a){let{accessToken:t}=(0,l.default)();return(0,g.useQuery)({queryKey:[...x.keyKeys.detail(e??""),t],queryFn:async()=>{if(!t||!e)throw Error("Missing access token or key id");return{...(await (0,d.keyInfoV1Call)(t,e)).info,token:e,api_key:e}},enabled:!!(t&&e)&&(a?.enabled??!0)})}(N,{enabled:!ef}),ey=ef??eb,e_=(0,o.useMemo)(()=>I.map(e=>({label:e.team_alias||e.team_id,value:e.team_id,sublabel:e.team_alias?e.team_id:void 0})),[I]),ek=(0,o.useMemo)(()=>u.filter(e=>e.organization_id).map(e=>{let a=e.organization_id;return{label:e.organization_alias||a,value:a,sublabel:e.organization_alias?a:void 0}}),[u]),ew=(0,o.useCallback)((e,a)=>{let t=String(a);return"team_id"===e?I.find(e=>e.team_id===t)?.team_alias||t:"org_id"===e&&u.find(e=>e.organization_id===t)?.organization_alias||t},[I,u]);return N?ey||ev?(0,a.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,a.jsx)(C.default,{keyId:N,onClose:R,keyData:ey,teams:I,onDelete:eu})}):(0,a.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading key..."}):(0,a.jsxs)("div",{className:"flex h-full flex-col gap-4 overflow-hidden py-2",children:[(0,a.jsx)(k.PageHeader,{icon:(0,a.jsx)(S.KeyRound,{className:"size-5"}),title:"Virtual Keys",subtitle:"Every key that authenticates requests to the gateway."}),e,(0,a.jsx)(b.DataTable,{data:ec,columns:eh,getRowId:e=>e.token,defaultColumnVisibility:O,sortingMode:"server",sorting:W,onSortingChange:eg,paginationMode:"server",pagination:$,onPaginationChange:J,rowCount:em,filterMode:"server",columnFilters:Q,onColumnFiltersChange:ex,enableColumnResizing:!0,columnResizeMode:"onChange",isLoading:eo,loadingMessage:"Loading keys...",noDataMessage:"No keys found",maxBodyHeight:"calc(75vh - 210px)",size:"compact",toolbar:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.DataTableToolbar,{table:e,searchValue:ee,onSearchChange:ep,searchPlaceholder:"Search by key alias…",onRefresh:()=>eu?.(),isRefreshing:ed,onOpenFilters:()=>Z(!0),filterLabels:G,formatFilterValue:ew}),(0,a.jsx)(v.DataTableFilterDrawer,{table:e,open:Y,onOpenChange:Z,title:"Filters",description:"Narrow down virtual keys",children:({get:e,set:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.DataTableFilterField,{label:"Team",children:(0,a.jsx)(_.SearchSelect,{options:e_,value:e("team_id")||void 0,onValueChange:e=>t("team_id",e),placeholder:"Select a team…",emptyText:"No teams found"})}),(0,a.jsx)(v.DataTableFilterField,{label:"Organization",children:(0,a.jsx)(_.SearchSelect,{options:ek,value:e("org_id")||void 0,onValueChange:e=>t("org_id",e),placeholder:"Select an organization…",emptyText:"No organizations found"})}),(0,a.jsx)(v.DataTableFilterField,{label:"User ID",children:(0,a.jsx)(w.Input,{value:e("user_id")??"",onChange:e=>t("user_id",e.target.value),placeholder:"Enter User ID…"})}),(0,a.jsx)(v.DataTableFilterField,{label:"Key ID",children:(0,a.jsx)(w.Input,{value:e("key_hash")??"",onChange:e=>t("key_hash",e.target.value),placeholder:"Enter Key ID…"})})]})})]})})]})}let W=({userID:e,userRole:t,teams:l,keys:m,setUserRole:p,userEmail:g,setUserEmail:x,setTeams:h,setKeys:f,premiumUser:b,addKey:v,createClicked:y,autoOpenCreate:_,prefillData:k})=>{let[w,j]=(0,o.useState)(null),[S,C]=(0,o.useState)(null),I=(0,i.getCookie)("token"),[N,z]=(0,o.useState)(null),[D,T]=(0,o.useState)(null),[K,A]=(0,o.useState)([]),[U,E]=(0,o.useState)(null),[V,M]=(0,o.useState)(null);function R(){(0,i.clearTokenCookies)();let e=(0,d.getProxyBaseUrl)(),a=e?`${e}/sso/key/generate`:"/sso/key/generate";return window.location.href=a,null}if((0,o.useEffect)(()=>{let e=()=>{let e=sessionStorage.getItem("token");sessionStorage.clear(),e&&sessionStorage.setItem("token",e)};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(I){let e=(0,n.jwtDecode)(I);e&&(z(e.key),e.user_role&&p(function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role)),e.user_email&&x(e.user_email))}if(e&&N&&t&&!w){let a=sessionStorage.getItem("userModels"+e);a?A(JSON.parse(a)):((async()=>{try{let a=await (0,d.getProxyUISettings)(N);E(a);let l=await (0,d.userGetInfoV2)(N,e);j(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let i=(await (0,d.modelAvailableCall)(N,e,t)).data.map(e=>e.id);A(i),sessionStorage.setItem("userModels"+e,JSON.stringify(i))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&R()}})(),u(N,e,t,S,h))}},[e,I,N,t]),(0,o.useEffect)(()=>{N&&(async()=>{try{await (0,d.keyInfoCall)(N,[N])}catch(e){e.message.includes("Invalid proxy server token passed")&&R()}})()},[N]),(0,o.useEffect)(()=>{N&&u(N,e,t,S,h)},[S]),(0,o.useEffect)(()=>{if(null!==m&&null!=V&&null!==V.team_id){let e=0;for(let a of m)V.hasOwnProperty("team_id")&&null!==a.team_id&&a.team_id===V.team_id&&(e+=a.spend);T(e)}else if(null!==m){let e=0;for(let a of m)e+=a.spend;T(e)}},[V]),null==I)return R(),null;try{let e=(0,n.jwtDecode)(I).exp,a=Math.floor(Date.now()/1e3);if(e&&a>=e)return R(),null}catch(e){return console.error("Error decoding token:",e),(0,i.clearTokenCookies)(),R(),null}if(null==N)return null;if(null==e)return(0,a.jsx)("h1",{children:"User ID is not set"});null==t&&p("App Owner");let L="Admin Viewer"!==t&&"proxy_admin_viewer"!==t;return(0,a.jsx)("div",{className:"mx-4 h-[75vh]",children:(0,a.jsx)(r.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,a.jsx)(s.Col,{numColSpan:1,className:"flex flex-col gap-2",children:(0,a.jsx)(H,{headerActions:L?(0,a.jsx)(c.default,{team:V,teams:l,data:m,addKey:v,autoOpenCreate:_,prefillData:k},V?V.team_id:null):void 0})})})})};var q=e.i(557951);e.s(["default",0,function(){let{userId:e,userRole:i,userEmail:s,accessToken:r,premiumUser:n}=(0,l.default)(),{setUserRole:d,setUserEmail:u}=(0,q.useAuth)(),c=(0,m.useSearchParams)(),[p,g]=(0,o.useState)(null),[x,h]=(0,o.useState)([]),[f,b]=(0,o.useState)(!1),v="true"===c.get("create"),y=(0,o.useMemo)(()=>{if(!v)return;let e=c.get("owned_by"),a=c.get("team_id"),t=c.get("key_alias"),l=c.get("models"),i=c.get("key_type");if(!e&&!a&&!t&&!l&&!i)return;let s=e&&["you","service_account","another_user"].includes(e)?e:void 0,r=i&&["default","llm_api","management"].includes(i)?i:void 0,n=t?t.trim().slice(0,256):void 0,o=l?l.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:s,team_id:a?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:r}},[c,v]);return(0,o.useEffect)(()=>{r&&e&&i&&(0,t.teamListCall)(r,1,100,{userID:"Admin"!==i&&"Admin Viewer"!==i?e:null}).then(e=>g(e.teams??[])).catch(console.error)},[r,e,i]),(0,a.jsx)(W,{userID:e,userRole:i,premiumUser:n??!1,teams:p,keys:x,setUserRole:d,userEmail:s,setUserEmail:u,setTeams:g,setKeys:h,addKey:e=>{h(a=>a?[...a,e]:[e]),b(e=>!e)},createClicked:f,autoOpenCreate:v,prefillData:y})}],502501)},973095,e=>{"use strict";var a=e.i(843476),t=e.i(502501),l=e.i(135214),i=e.i(936578),s=e.i(271645);function r(){let{isLoading:e,isAuthorized:s}=(0,l.default)();return e||!s?(0,a.jsx)(i.default,{}):(0,a.jsx)(t.default,{})}e.s(["default",0,function(){return(0,a.jsx)(s.Suspense,{fallback:(0,a.jsx)(i.default,{}),children:(0,a.jsx)(r,{})})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0_mw8gm-qowti.js b/litellm/proxy/_experimental/out/_next/static/chunks/0_mw8gm-qowti.js
deleted file mode 100644
index 1f126bf37db..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0_mw8gm-qowti.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,597440,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["default",0,l],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["default",0,l],184163)},309821,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(135551),o=e.i(201072),n=e.i(121229),l=e.i(726289),a=e.i(864517),i=e.i(343794),s=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),g=e.i(703923),m={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(n.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),e.current},f=e.i(410160),v=e.i(392221),h=e.i(654310),b=0,y=(0,h.default)();let k=function(e){var r=t.useState(),o=(0,v.default)(r,2),n=o[0],l=o[1];return t.useEffect(function(){var e;l("rc_progress_".concat((y?(e=b,b+=1):e="TEST_OR_SSR",e)))},[]),e||n};var $=function(e){var r=e.bg,o=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},o)};function x(e,t){return Object.keys(e).map(function(r){var o=parseFloat(r),n="".concat(Math.floor(o*t),"%");return"".concat(e[r]," ").concat(n)})}var C=t.forwardRef(function(e,r){var o=e.prefixCls,n=e.color,l=e.gradientId,a=e.radius,i=e.style,s=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,g=e.gapDegree,m=n&&"object"===(0,f.default)(n),p=u/2,v=t.createElement("circle",{className:"".concat(o,"-circle-path"),r:a,cx:p,cy:p,stroke:m?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==s),style:i,ref:r});if(!m)return v;var h="".concat(l,"-conic"),b=x(n,(360-g)/360),y=x(n,1),k="conic-gradient(from ".concat(g?"".concat(180+g/2,"deg"):"0deg",", ").concat(b.join(", "),")"),C="linear-gradient(to ".concat(g?"bottom":"top",", ").concat(y.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:h},v),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(h,")")},t.createElement($,{bg:C},t.createElement($,{bg:k}))))}),w=function(e,t,r,o,n,l,a,i,s,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-o)/100*t;return"round"===s&&100!==o&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof i?i:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(n+r/100*360*((360-l)/360)+(0===l?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},S=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function E(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let O=function(e){var r,o,n,l,a=(0,u.default)((0,u.default)({},m),e),s=a.id,c=a.prefixCls,v=a.steps,h=a.strokeWidth,b=a.trailWidth,y=a.gapDegree,$=void 0===y?0:y,x=a.gapPosition,O=a.trailColor,j=a.strokeLinecap,M=a.style,N=a.className,I=a.strokeColor,D=a.percent,z=(0,g.default)(a,S),A=k(s),T="".concat(A,"-gradient"),R=50-h/2,W=2*Math.PI*R,P=$>0?90+$/2:-90,H=(360-$)/360*W,L="object"===(0,f.default)(v)?v:{count:v,gap:2},B=L.count,F=L.gap,_=E(D),X=E(I),V=X.find(function(e){return e&&"object"===(0,f.default)(e)}),U=V&&"object"===(0,f.default)(V)?"butt":j,K=w(W,H,0,100,P,$,x,O,U,h),G=p();return t.createElement("svg",(0,d.default)({className:(0,i.default)("".concat(c,"-circle"),N),viewBox:"0 0 ".concat(100," ").concat(100),style:M,id:s,role:"presentation"},z),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:R,cx:50,cy:50,stroke:O,strokeLinecap:U,strokeWidth:b||h,style:K}),B?(r=Math.round(B*(_[0]/100)),o=100/B,n=0,Array(B).fill(null).map(function(e,l){var a=l<=r-1?X[0]:O,i=a&&"object"===(0,f.default)(a)?"url(#".concat(T,")"):void 0,s=w(W,H,n,o,P,$,x,a,"butt",h,F);return n+=(H-s.strokeDashoffset+F)*100/H,t.createElement("circle",{key:l,className:"".concat(c,"-circle-path"),r:R,cx:50,cy:50,stroke:i,strokeWidth:h,opacity:1,style:s,ref:function(e){G[l]=e}})})):(l=0,_.map(function(e,r){var o=X[r]||X[X.length-1],n=w(W,H,l,e,P,$,x,o,U,h);return l+=e,t.createElement(C,{key:r,color:o,ptg:e,radius:R,prefixCls:c,gradientId:T,style:n,strokeLinecap:U,strokeWidth:h,gapDegree:$,ref:function(e){G[r]=e},size:100})}).reverse()))};var j=e.i(491816);e.i(765846);var M=e.i(896091);function N(e){return!e||e<0?0:e>100?100:e}function I({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let D=(e,t,r)=>{var o,n,l,a;let i=-1,s=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(i="small"===e?2:14,s=null!=o?o:8):"number"==typeof e?[i,s]=[e,e]:[i=14,s=8]=Array.isArray(e)?e:[e.width,e.height],i*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?s=t||("small"===e?6:8):"number"==typeof e?[i,s]=[e,e]:[i=-1,s=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[i,s]="small"===e?[60,60]:[120,120]:"number"==typeof e?[i,s]=[e,e]:Array.isArray(e)&&(i=null!=(n=null!=(o=e[0])?o:e[1])?n:120,s=null!=(a=null!=(l=e[0])?l:e[1])?a:120));return[i,s]},z=e=>{let{prefixCls:r,trailColor:o=null,strokeLinecap:n="round",gapPosition:l,gapDegree:a,width:s=120,type:c,children:d,success:u,size:g=s,steps:m}=e,[p,f]=D(g,"circle"),{strokeWidth:v}=e;void 0===v&&(v=Math.max(3/p*100,6));let h=t.useMemo(()=>a||0===a?a:"dashboard"===c?75:void 0,[a,c]),b=(({percent:e,success:t,successPercent:r})=>{let o=N(I({success:t,successPercent:r}));return[o,N(N(e)-o)]})(e),y="[object Object]"===Object.prototype.toString.call(e.strokeColor),k=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||M.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),$=(0,i.default)(`${r}-inner`,{[`${r}-circle-gradient`]:y}),x=t.createElement(O,{steps:m,percent:m?b[1]:b,strokeWidth:v,trailWidth:v,strokeColor:m?k[1]:k,strokeLinecap:n,trailColor:o,prefixCls:r,gapDegree:h,gapPosition:l||"dashboard"===c&&"bottom"||void 0}),C=p<=20,w=t.createElement("div",{className:$,style:{width:p,height:f,fontSize:.15*p+6}},x,!C&&d);return C?t.createElement(j.default,{title:d},w):w};e.i(296059);var A=e.i(694758),T=e.i(915654),R=e.i(183293),W=e.i(246422),P=e.i(838378);let H="--progress-line-stroke-color",L="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new A.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},F=(0,W.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,P.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,R.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${H})`]},height:"100%",width:`calc(1 / var(${L}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,T.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var _=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let X=e=>{let{prefixCls:r,direction:o,percent:n,size:l,strokeWidth:a,strokeColor:s,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:g,success:m}=e,{align:p,type:f}=g,v=s&&"string"!=typeof s?((e,t)=>{let{from:r=M.presetPrimaryColors.blue,to:o=M.presetPrimaryColors.blue,direction:n="rtl"===t?"to left":"to right"}=e,l=_(e,["from","to","direction"]);if(0!==Object.keys(l).length){let e,t=(e=[],Object.keys(l).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:l[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${n}, ${t})`;return{background:r,[H]:r}}let a=`linear-gradient(${n}, ${r}, ${o})`;return{background:a,[H]:a}})(s,o):{[H]:s,background:s},h="square"===c||"butt"===c?0:void 0,[b,y]=D(null!=l?l:[-1,a||("small"===l?6:8)],"line",{strokeWidth:a}),k=Object.assign(Object.assign({width:`${N(n)}%`,height:y,borderRadius:h},v),{[L]:N(n)/100}),$=I(e),x={width:`${N($)}%`,height:y,borderRadius:h,backgroundColor:null==m?void 0:m.strokeColor},C=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:h}},t.createElement("div",{className:(0,i.default)(`${r}-bg`,`${r}-bg-${f}`),style:k},"inner"===f&&d),void 0!==$&&t.createElement("div",{className:`${r}-success-bg`,style:x})),w="outer"===f&&"start"===p,S="outer"===f&&"end"===p;return"outer"===f&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},C,d):t.createElement("div",{className:`${r}-outer`,style:{width:b<0?"100%":b}},w&&d,C,S&&d)},V=e=>{let{size:r,steps:o,rounding:n=Math.round,percent:l=0,strokeWidth:a=8,strokeColor:s,trailColor:c=null,prefixCls:d,children:u}=e,g=n(l/100*o),[m,p]=D(null!=r?r:["small"===r?2:14,a],"step",{steps:o,strokeWidth:a}),f=m/o,v=Array.from({length:o});for(let e=0;et.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let K=["normal","exception","active","success"],G=t.forwardRef((e,d)=>{let u,{prefixCls:g,className:m,rootClassName:p,steps:f,strokeColor:v,percent:h=0,size:b="default",showInfo:y=!0,type:k="line",status:$,format:x,style:C,percentPosition:w={}}=e,S=U(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:E="end",type:O="outer"}=w,j=Array.isArray(v)?v[0]:v,M="string"==typeof v||Array.isArray(v)?v:void 0,A=t.useMemo(()=>{if(j){let e="string"==typeof j?j:Object.values(j)[0];return new r.FastColor(e).isLight()}return!1},[v]),T=t.useMemo(()=>{var t,r;let o=I(e);return Number.parseInt(void 0!==o?null==(t=null!=o?o:0)?void 0:t.toString():null==(r=null!=h?h:0)?void 0:r.toString(),10)},[h,e.success,e.successPercent]),R=t.useMemo(()=>!K.includes($)&&T>=100?"success":$||"normal",[$,T]),{getPrefixCls:W,direction:P,progress:H}=t.useContext(c.ConfigContext),L=W("progress",g),[B,_,G]=F(L),q="line"===k,Q=q&&!f,Y=t.useMemo(()=>{let r;if(!y)return null;let s=I(e),c=x||(e=>`${e}%`),d=q&&A&&"inner"===O;return"inner"===O||x||"exception"!==R&&"success"!==R?r=c(N(h),N(s)):"exception"===R?r=q?t.createElement(l.default,null):t.createElement(a.default,null):"success"===R&&(r=q?t.createElement(o.default,null):t.createElement(n.default,null)),t.createElement("span",{className:(0,i.default)(`${L}-text`,{[`${L}-text-bright`]:d,[`${L}-text-${E}`]:Q,[`${L}-text-${O}`]:Q}),title:"string"==typeof r?r:void 0},r)},[y,h,T,R,k,L,x]);"line"===k?u=f?t.createElement(V,Object.assign({},e,{strokeColor:M,prefixCls:L,steps:"object"==typeof f?f.count:f}),Y):t.createElement(X,Object.assign({},e,{strokeColor:j,prefixCls:L,direction:P,percentPosition:{align:E,type:O}}),Y):("circle"===k||"dashboard"===k)&&(u=t.createElement(z,Object.assign({},e,{strokeColor:j,prefixCls:L,progressStatus:R}),Y));let J=(0,i.default)(L,`${L}-status-${R}`,{[`${L}-${"dashboard"===k&&"circle"||k}`]:"line"!==k,[`${L}-inline-circle`]:"circle"===k&&D(b,"circle")[0]<=20,[`${L}-line`]:Q,[`${L}-line-align-${E}`]:Q,[`${L}-line-position-${O}`]:Q,[`${L}-steps`]:f,[`${L}-show-info`]:y,[`${L}-${b}`]:"string"==typeof b,[`${L}-rtl`]:"rtl"===P},null==H?void 0:H.className,m,p,_,G);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==H?void 0:H.style),C),className:J,role:"progressbar","aria-valuenow":T,"aria-valuemin":0,"aria-valuemax":100},(0,s.default)(S,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,G],309821)},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["FileTextOutlined",0,l],993914)},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),o=e.i(673706),n=e.i(271645);let l={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"},a={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"},s={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,l,"gridColsLg",0,s,"gridColsMd",0,i,"gridColsSm",0,a],46757);let c=(0,o.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=n.default.forwardRef((e,o)=>{let{numItems:u=1,numItemsSm:g,numItemsMd:m,numItemsLg:p,children:f,className:v}=e,h=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=d(u,l),y=d(g,a),k=d(m,i),$=d(p,s),x=(0,r.tremorTwMerge)(b,y,k,$);return n.default.createElement("div",Object.assign({ref:o,className:(0,r.tremorTwMerge)(c("root"),"grid",x,v)},h),f)});u.displayName="Grid",e.s(["Grid",0,u],350967)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["UploadOutlined",0,l],519756)},435451,e=>{"use strict";var t=e.i(843476),r=e.i(290571),o=e.i(271645);let n=e=>{var t=(0,r.__rest)(e,[]);return o.default.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.default.createElement("path",{d:"M12 4v16m8-8H4"}))},l=e=>{var t=(0,r.__rest)(e,[]);return o.default.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.default.createElement("path",{d:"M20 12H4"}))};var a=e.i(444755),i=e.i(673706),s=e.i(677955);let c="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",u=o.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:g=!0,disabled:m,onValueChange:p,onChange:f}=e,v=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),h=(0,o.useRef)(null),[b,y]=o.default.useState(!1),k=o.default.useCallback(()=>{y(!0)},[]),$=o.default.useCallback(()=>{y(!1)},[]),[x,C]=o.default.useState(!1),w=o.default.useCallback(()=>{C(!0)},[]),S=o.default.useCallback(()=>{C(!1)},[]);return o.default.createElement(s.default,Object.assign({type:"number",ref:(0,i.mergeRefs)([h,t]),disabled:m,makeInputClassName:(0,i.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=h.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&k(),"ArrowUp"===e.key&&w()},onKeyUp:e=>{"ArrowDown"===e.key&&$(),"ArrowUp"===e.key&&S()},onChange:e=>{m||(null==p||p(parseFloat(e.target.value)),null==f||f(e))},stepper:g?o.default.createElement("div",{className:(0,a.tremorTwMerge)("flex justify-center align-middle")},o.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;m||(null==(e=h.current)||e.stepDown(),null==(t=h.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,a.tremorTwMerge)(!m&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.default.createElement(l,{"data-testid":"step-down",className:(b?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;m||(null==(e=h.current)||e.stepUp(),null==(t=h.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,a.tremorTwMerge)(!m&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.default.createElement(n,{"data-testid":"step-up",className:(x?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},v))});u.displayName="NumberInput",e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:o="Enter a numerical value",min:n,max:l,onChange:a,...i})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:o,min:n,max:l,onChange:a,...i})],435451)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0_vlfpb8phl0v.js b/litellm/proxy/_experimental/out/_next/static/chunks/0_vlfpb8phl0v.js
new file mode 100644
index 00000000000..92081ff8d16
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0_vlfpb8phl0v.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),a=e.i(451512),s=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(a.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:i=0,side:l="bottom",sideOffset:n=4,className:r,...d}){return(0,t.jsx)(a.Menu.Portal,{children:(0,t.jsx)(a.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:i,side:l,sideOffset:n,children:(0,t.jsx)(a.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,s.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",r),...d})})})},"DropdownMenuItem",0,function({className:e,inset:i,variant:l="default",...n}){return(0,t.jsx)(a.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":l,className:(0,s.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...n})},"DropdownMenuSeparator",0,function({className:e,...i}){return(0,t.jsx)(a.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,s.cn)("-mx-1 my-1 h-px bg-border",e),...i})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(a.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},601757,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(16715),i=e.i(519455),l=e.i(304967),n=e.i(599724),r=e.i(629569),d=e.i(994388),o=e.i(389083),c=e.i(677667),m=e.i(898667),u=e.i(130643),x=e.i(808613),g=e.i(311451),h=e.i(199133),p=e.i(592968),f=e.i(827252),j=e.i(702597),b=e.i(355619),y=e.i(602869),v=e.i(727749),_=e.i(435451),T=e.i(860585),w=e.i(500330),N=e.i(678784),C=e.i(118366),M=e.i(464571);let S=({tagId:e,onClose:s,accessToken:i,is_admin:S,editTag:I})=>{let[k]=x.Form.useForm(),[D,B]=(0,a.useState)(null),[L,z]=(0,a.useState)(I),[A,F]=(0,a.useState)([]),[E,O]=(0,a.useState)({}),R=async(e,t)=>{await (0,w.copyToClipboard)(e)&&(O(e=>({...e,[t]:!0})),setTimeout(()=>{O(e=>({...e,[t]:!1}))},2e3))},P=async()=>{if(i)try{let t=(await (0,y.tagInfoCall)(i,[e]))[e];t&&(B(t),I&&k.setFieldsValue({name:t.name,description:t.description,models:t.models,max_budget:t.litellm_budget_table?.max_budget,budget_duration:t.litellm_budget_table?.budget_duration}))}catch(e){console.error("Error fetching tag details:",e),v.default.fromBackend("Error fetching tag details: "+e)}};(0,a.useEffect)(()=>{P()},[e,i]),(0,a.useEffect)(()=>{i&&(0,j.fetchUserModels)("dummy-user","Admin",i,F)},[i]);let H=async e=>{if(i)try{await (0,y.tagUpdateCall)(i,{name:e.name,description:e.description,models:e.models,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,budget_duration:e.budget_duration}),v.default.success("Tag updated successfully"),z(!1),P()}catch(e){console.error("Error updating tag:",e),v.default.fromBackend("Error updating tag: "+e)}};return D?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Button,{onClick:s,className:"mb-4",children:"← Back to Tags"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Tag Name:"}),(0,t.jsx)("span",{className:"font-mono px-2 py-1 bg-gray-100 rounded-sm text-sm border border-gray-200",children:D.name}),(0,t.jsx)(M.Button,{type:"text",size:"small",icon:E["tag-name"]?(0,t.jsx)(N.CheckIcon,{size:12}):(0,t.jsx)(C.CopyIcon,{size:12}),onClick:()=>R(D.name,"tag-name"),className:`transition-all duration-200 ${E["tag-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsx)(n.Text,{className:"text-gray-500",children:D.description||"No description"})]}),S&&!L&&(0,t.jsx)(d.Button,{onClick:()=>z(!0),children:"Edit Tag"})]}),L?(0,t.jsx)(l.Card,{children:(0,t.jsxs)(x.Form,{form:k,onFinish:H,layout:"vertical",initialValues:D,children:[(0,t.jsx)(x.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(g.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(x.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(g.Input.TextArea,{rows:4})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(p.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(f.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select Models",children:A.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,b.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(c.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(m.AccordionHeader,{children:(0,t.jsx)(r.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(u.AccordionBody,{children:[(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(p.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(f.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(p.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(f.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(T.default,{onChange:e=>k.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(d.Button,{onClick:()=>z(!1),children:"Cancel"}),(0,t.jsx)(d.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(r.Title,{children:"Tag Details"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Name"}),(0,t.jsx)(n.Text,{children:D.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(n.Text,{children:D.description||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Allowed Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:D.models&&0!==D.models.length?D.models.map(e=>(0,t.jsx)(o.Badge,{color:"blue",children:(0,t.jsx)(p.Tooltip,{title:`ID: ${e}`,children:D.model_info?.[e]||e})},e)):(0,t.jsx)(o.Badge,{color:"red",children:"All Models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(n.Text,{children:D.created_at?new Date(D.created_at).toLocaleString():"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(n.Text,{children:D.updated_at?new Date(D.updated_at).toLocaleString():"-"})]})]})]}),D.litellm_budget_table&&(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(r.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==D.litellm_budget_table.max_budget&&null!==D.litellm_budget_table.max_budget&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsxs)(n.Text,{children:["$",D.litellm_budget_table.max_budget]})]}),D.litellm_budget_table.budget_duration&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Budget Duration"}),(0,t.jsx)(n.Text,{children:D.litellm_budget_table.budget_duration})]}),void 0!==D.litellm_budget_table.tpm_limit&&null!==D.litellm_budget_table.tpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"TPM Limit"}),(0,t.jsx)(n.Text,{children:D.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==D.litellm_budget_table.rpm_limit&&null!==D.litellm_budget_table.rpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"RPM Limit"}),(0,t.jsx)(n.Text,{children:D.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var I=e.i(332102);e.i(707701);var k=e.i(807235),D=e.i(541071),B=e.i(788699),L=e.i(727612),z=e.i(494862);e.i(622826);var A=e.i(581070),F=e.i(200208),E=e.i(997422),O=e.i(487486),R=e.i(755146),P=e.i(115504);function H({tag:e,onSelectTag:a}){return"This is just a spend tag that was passed dynamically in a request. It does not control any LLM models."===e.description?(0,t.jsx)(A.CellTooltip,{content:"You cannot view the information of a dynamically generated spend tag",trigger:(0,t.jsx)("span",{className:"block max-w-60 truncate font-mono text-xs text-muted-foreground",children:e.name})}):(0,t.jsx)(E.IdentityCell,{title:e.name,titleClassName:"font-mono text-xs font-normal text-primary",className:"max-w-60",onClick:()=>a(e.name)})}function U({tag:e}){let a=e.models??[];return 0===a.length?(0,t.jsx)(O.Badge,{variant:"secondary",children:"All Models"}):(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1",children:a.map(a=>(0,t.jsx)(A.CellTooltip,{content:`ID: ${a}`,trigger:(0,t.jsx)(O.Badge,{variant:"outline",className:"cursor-default",children:e.model_info?.[a]||a})},a))})}function q({tag:e,onEdit:a,onDelete:s}){let l="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models."===e.description;return(0,t.jsxs)(R.DropdownMenu,{children:[(0,t.jsx)(R.DropdownMenuTrigger,{"aria-label":"Open tag actions","data-testid":`tag-actions-${e.name}`,className:(0,P.cn)((0,i.buttonVariants)({variant:"ghost",size:"icon-sm"}),"text-muted-foreground"),children:(0,t.jsx)(D.MoreHorizontal,{className:"size-4"})}),(0,t.jsxs)(R.DropdownMenuContent,{align:"end",className:"w-52",children:[(0,t.jsxs)(R.DropdownMenuItem,{disabled:l,"data-testid":"tag-action-edit",title:l?"Dynamically generated spend tags cannot be edited":void 0,onClick:()=>a(e),children:[(0,t.jsx)(B.Pencil,{}),"Edit"]}),(0,t.jsxs)(R.DropdownMenuItem,{variant:"destructive",disabled:l,"data-testid":"tag-action-delete",title:l?"Dynamically generated spend tags cannot be deleted":void 0,onClick:()=>s(e.name),children:[(0,t.jsx)(L.Trash2,{}),"Delete"]})]})]})}let V=[{id:"created_at",desc:!0}];function K(){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,t.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,t.jsx)(I.Inbox,{className:"size-5 text-muted-foreground"})}),(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:"No tags yet"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Create a tag to start routing and restricting model usage."})]})}let $=({data:e,onEdit:s,onDelete:i,onSelectTag:l,isLoading:n=!1})=>{let[r,d]=(0,a.useState)(V),o=(0,a.useMemo)(()=>(({onSelectTag:e,onEdit:a,onDelete:s})=>[{id:"name",accessorKey:"name",meta:{title:"Tag Name"},header:({column:e})=>(0,t.jsx)(z.DataTableSortHeader,{column:e,title:"Tag Name"}),size:260,enableSorting:!0,cell:({row:a})=>(0,t.jsx)(H,{tag:a.original,onSelectTag:e})},{id:"description",accessorKey:"description",meta:{title:"Description"},header:"Description",size:300,enableSorting:!1,cell:({row:e})=>{let a=e.original.description;return(0,t.jsx)("span",{className:"block max-w-72 truncate text-sm text-muted-foreground",title:a,children:a||"-"})}},{id:"models",meta:{title:"Allowed Models",skeleton:"chips"},header:"Allowed Models",size:240,enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U,{tag:e.original})},{id:"created_at",accessorKey:"created_at",sortingFn:"datetime",meta:{title:"Created"},header:({column:e})=>(0,t.jsx)(z.DataTableSortHeader,{column:e,title:"Created"}),size:150,enableSorting:!0,cell:({row:e})=>(0,t.jsx)(F.DateCell,{value:e.original.created_at,precision:"date"})},{id:"actions",meta:{className:"text-right",headerClassName:"text-right"},header:()=>(0,t.jsx)("span",{className:"sr-only",children:"Actions"}),size:64,enableSorting:!1,enableHiding:!1,cell:({row:e})=>(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(q,{tag:e.original,onEdit:a,onDelete:s})})}])({onSelectTag:l,onEdit:s,onDelete:i}),[l,s,i]);return(0,t.jsx)(k.DataTable,{data:e,columns:o,getRowId:(e,t)=>e.name||String(t),sortingMode:"client",sorting:r,onSortingChange:d,isLoading:n,loadingMessage:"Loading tags…",noDataMessage:(0,t.jsx)(K,{}),size:"compact"})};var G=e.i(127952),Y=e.i(779241),W=e.i(212931);let J=({visible:e,onCancel:a,onSubmit:s,availableModels:i})=>{let[l]=x.Form.useForm();return(0,t.jsx)(W.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{l.resetFields(),a()},children:(0,t.jsxs)(x.Form,{form:l,onFinish:e=>{s(e),l.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(x.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(Y.TextInput,{})}),(0,t.jsx)(x.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(g.Input.TextArea,{rows:4})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(p.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(f.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select Models",children:i.map(e=>(0,t.jsx)(h.Select.Option,{value:e.model_info.id,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:e.model_name}),(0,t.jsxs)("span",{className:"text-gray-400 ml-2",children:["(",e.model_info.id,")"]})]})},e.model_info.id))})}),(0,t.jsxs)(c.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(m.AccordionHeader,{children:(0,t.jsx)(r.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(u.AccordionBody,{children:[(0,t.jsx)(x.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(p.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(f.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(x.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(p.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(f.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(T.default,{onChange:e=>l.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{type:"submit",children:"Create Tag"})})]})})},Q=({accessToken:e,userID:l,userRole:n})=>{let[r,d]=(0,a.useState)([]),[o,c]=(0,a.useState)(!0),[m,u]=(0,a.useState)(!1),[x,g]=(0,a.useState)(null),[h,p]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[b,_]=(0,a.useState)(null),[T,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(""),[M,I]=(0,a.useState)([]),k=async()=>{if(!e)return void c(!1);try{let t=await (0,y.tagListCall)(e);d(Object.values(t))}catch(e){console.error("Error fetching tags:",e),v.default.fromBackend("Error fetching tags: "+e)}finally{c(!1)}},D=async t=>{if(e)try{await (0,y.tagCreateCall)(e,{name:t.tag_name,description:t.description,models:t.allowed_llms,max_budget:t.max_budget,soft_budget:t.soft_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,budget_duration:t.budget_duration}),v.default.success("Tag created successfully"),u(!1),k()}catch(e){console.error("Error creating tag:",e),v.default.fromBackend("Error creating tag: "+e)}},B=async e=>{_(e),j(!0)},L=async()=>{if(e&&b){w(!0);try{await (0,y.tagDeleteCall)(e,b),v.default.success("Tag deleted successfully"),k()}catch(e){console.error("Error deleting tag:",e),v.default.fromBackend("Error deleting tag: "+e)}finally{w(!1),j(!1),_(null)}}};return(0,a.useEffect)(()=>{l&&n&&e&&(async()=>{try{let t=await (0,y.modelInfoCall)(e,l,n);t&&t.data&&I(t.data)}catch(e){console.error("Error fetching models:",e),v.default.fromBackend("Error fetching models: "+e)}})()},[e,l,n]),(0,a.useEffect)(()=>{k()},[e]),(0,t.jsx)("div",{className:"mx-4 h-[75vh]",children:x?(0,t.jsx)(S,{tagId:x,onClose:()=>{g(null),p(!1)},accessToken:e,is_admin:"Admin"===n,editTag:h}):(0,t.jsxs)("div",{className:"mt-2 h-[75vh] w-full gap-2 p-8",children:[(0,t.jsxs)("div",{className:"mt-2 mb-4 flex w-full items-center justify-between",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[N&&(0,t.jsxs)("p",{className:"text-sm",children:["Last Refreshed: ",N]}),(0,t.jsx)(i.Button,{variant:"outline",size:"icon-sm","aria-label":"Refresh tags",onClick:()=>{k(),C(new Date().toLocaleString())},children:(0,t.jsx)(s.RefreshCw,{})})]})]}),(0,t.jsxs)("div",{className:"mb-4 text-sm",children:["Click on a tag name to view and edit its details.",(0,t.jsxs)("p",{children:["You can use tags to restrict the usage of certain LLMs based on tags passed in the request. Read more about tag routing"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/tag_routing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})]}),(0,t.jsx)(i.Button,{className:"mb-4",onClick:()=>u(!0),children:"+ Create New Tag"}),(0,t.jsx)("div",{className:"mt-2 grid h-[75vh] w-full grid-cols-1 gap-2 pt-2 pb-2",children:(0,t.jsx)("div",{children:(0,t.jsx)($,{data:r,isLoading:o,onEdit:e=>{g(e.name),p(!0)},onDelete:B,onSelectTag:g})})}),(0,t.jsx)(J,{visible:m,onCancel:()=>u(!1),onSubmit:D,availableModels:M}),(0,t.jsx)(G.default,{isOpen:f,title:"Delete Tag",message:"Are you sure you want to delete this tag? This action cannot be undone.",resourceInformationTitle:"Tag Information",resourceInformation:[{label:"Tag Name",value:b,code:!0}],onCancel:()=>{j(!1),_(null)},onOk:L,confirmLoading:T})]})})};var X=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userRole:a,userId:s}=(0,X.default)();return(0,t.jsx)(Q,{accessToken:e,userRole:a,userID:s})}],601757)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0a-3zns09ja98.js b/litellm/proxy/_experimental/out/_next/static/chunks/0a-3zns09ja98.js
deleted file mode 100644
index b1ed6dd505b..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0a-3zns09ja98.js
+++ /dev/null
@@ -1,10 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),i=e.i(540143),a=e.i(915823),r=e.i(619273),o=class extends a.Subscribable{#e;#t=void 0;#n;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#r()}mutate(e,t){return this.#i=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#a(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,n,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,n,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,n,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,n,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);e.s(["useMutation",0,function(e,n){let a=(0,l.useQueryClient)(n),[s]=t.useState(()=>new o(a,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let d=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(i.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=t.useCallback((e,t)=>{s.mutate(e,t).catch(r.noop)},[s]);if(d.error&&(0,r.shouldThrowError)(s.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}],954616)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var a=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(a.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["ExclamationCircleOutlined",0,r],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(529681),a=e.i(242064),r=e.i(517455),o=e.i(185793),l=e.i(721369),s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);at.indexOf(i[a])&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n};let d=e=>{var{prefixCls:i,className:r,hoverable:o=!0}=e,l=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("card",i),u=(0,n.default)(`${c}-grid`,r,{[`${c}-grid-hoverable`]:o});return t.createElement("div",Object.assign({},l,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),g=e.i(246422),p=e.i(838378);let b=(0,g.genStyleHooks)("Card",e=>{let t=(0,p.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:a,boxShadowTertiary:r,bodyPadding:o,extraColor:l}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:i,headerPadding:a,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,c.unit)(a)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
- > ${n}-typography,
- > ${n}-typography-edit-content
- `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:a}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
- ${(0,c.unit)(a)} 0 0 0 ${n},
- 0 ${(0,c.unit)(a)} 0 0 ${n},
- ${(0,c.unit)(a)} ${(0,c.unit)(a)} 0 0 ${n},
- ${(0,c.unit)(a)} 0 0 0 ${n} inset,
- 0 ${(0,c.unit)(a)} 0 0 ${n} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:a,colorBorderSecondary:r,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:o,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:i,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:a,lineHeight:(0,c.unit)(e.calc(a).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:i,bodyPadding:a}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(i)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(a)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:i,headerHeightSM:a,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:a,padding:`0 ${(0,c.unit)(i)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var m=e.i(792812),h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);at.indexOf(i[a])&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n};let f=e=>{let{actionClasses:n,actions:i=[],actionStyle:a}=e;return t.createElement("ul",{className:n,style:a},i.map((e,n)=>{let a=`action-${n}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:a},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:g,rootClassName:p,style:y,extra:v,headStyle:x={},bodyStyle:$={},title:O,loading:j,bordered:S,variant:w,size:C,type:E,cover:k,actions:z,tabList:N,children:T,activeTabKey:B,defaultActiveTabKey:M,tabBarExtraContent:P,hoverable:R,tabProps:I={},classNames:L,styles:G}=e,H=h(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:D}=t.useContext(a.ConfigContext),[F]=(0,m.default)("card",w,S),X=e=>{var t;return(0,n.default)(null==(t=null==D?void 0:D.classNames)?void 0:t[e],null==L?void 0:L[e])},K=e=>{var t;return Object.assign(Object.assign({},null==(t=null==D?void 0:D.styles)?void 0:t[e]),null==G?void 0:G[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(T,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[T]),U=W("card",u),[Q,V,_]=b(U),J=t.createElement(o.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},T),Y=void 0!==B,Z=Object.assign(Object.assign({},I),{[Y?"activeKey":"defaultActiveKey"]:Y?B:M,tabBarExtraContent:P}),ee=(0,r.default)(C),et=ee&&"default"!==ee?ee:"large",en=N?t.createElement(l.default,Object.assign({size:et},Z,{className:`${U}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:N.map(e=>{var{tab:t}=e;return Object.assign({label:t},h(e,["tab"]))})})):null;if(O||v||en){let e=(0,n.default)(`${U}-head`,X("header")),i=(0,n.default)(`${U}-head-title`,X("title")),a=(0,n.default)(`${U}-extra`,X("extra")),r=Object.assign(Object.assign({},x),K("header"));c=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${U}-head-wrapper`},O&&t.createElement("div",{className:i,style:K("title")},O),v&&t.createElement("div",{className:a,style:K("extra")},v)),en)}let ei=(0,n.default)(`${U}-cover`,X("cover")),ea=k?t.createElement("div",{className:ei,style:K("cover")},k):null,er=(0,n.default)(`${U}-body`,X("body")),eo=Object.assign(Object.assign({},$),K("body")),el=t.createElement("div",{className:er,style:eo},j?J:T),es=(0,n.default)(`${U}-actions`,X("actions")),ed=(null==z?void 0:z.length)?t.createElement(f,{actionClasses:es,actionStyle:K("actions"),actions:z}):null,ec=(0,i.default)(H,["onTabChange"]),eu=(0,n.default)(U,null==D?void 0:D.className,{[`${U}-loading`]:j,[`${U}-bordered`]:"borderless"!==F,[`${U}-hoverable`]:R,[`${U}-contain-grid`]:q,[`${U}-contain-tabs`]:null==N?void 0:N.length,[`${U}-${ee}`]:ee,[`${U}-type-${E}`]:!!E,[`${U}-rtl`]:"rtl"===A},g,p,V,_),eg=Object.assign(Object.assign({},null==D?void 0:D.style),y);return Q(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:eg}),c,ea,el,ed))});var v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);at.indexOf(i[a])&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n};y.Grid=d,y.Meta=e=>{let{prefixCls:i,className:r,avatar:o,title:l,description:s}=e,d=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("card",i),g=(0,n.default)(`${u}-meta`,r),p=o?t.createElement("div",{className:`${u}-meta-avatar`},o):null,b=l?t.createElement("div",{className:`${u}-meta-title`},l):null,m=s?t.createElement("div",{className:`${u}-meta-description`},s):null,h=b||m?t.createElement("div",{className:`${u}-meta-detail`},b,m):null;return t.createElement("div",Object.assign({},d,{className:g}),p,h)},e.s(["Card",0,y],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(908206),a=e.i(242064),r=e.i(517455),o=e.i(150073);let l={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);at.indexOf(i[a])&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n},u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);at.indexOf(i[a])&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n};let g=e=>{let{itemPrefixCls:i,component:a,span:r,className:o,style:l,labelStyle:d,contentStyle:c,bordered:u,label:g,content:p,colon:b,type:m,styles:h}=e,{classNames:f}=t.useContext(s),y=Object.assign(Object.assign({},d),null==h?void 0:h.label),v=Object.assign(Object.assign({},c),null==h?void 0:h.content);if(u)return t.createElement(a,{colSpan:r,style:l,className:(0,n.default)(o,{[`${i}-item-${m}`]:"label"===m||"content"===m,[null==f?void 0:f.label]:(null==f?void 0:f.label)&&"label"===m,[null==f?void 0:f.content]:(null==f?void 0:f.content)&&"content"===m})},null!=g&&t.createElement("span",{style:y},g),null!=p&&t.createElement("span",{style:v},p));return t.createElement(a,{colSpan:r,style:l,className:(0,n.default)(`${i}-item`,o)},t.createElement("div",{className:`${i}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${i}-item-label`,null==f?void 0:f.label,{[`${i}-item-no-colon`]:!b})},g),null!=p&&t.createElement("span",{style:v,className:(0,n.default)(`${i}-item-content`,null==f?void 0:f.content)},p)))};function p(e,{colon:n,prefixCls:i,bordered:a},{component:r,type:o,showLabel:l,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:p,prefixCls:b=i,className:m,style:h,labelStyle:f,contentStyle:y,span:v=1,key:x,styles:$},O)=>"string"==typeof r?t.createElement(g,{key:`${o}-${x||O}`,className:m,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),null==$?void 0:$.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),y),null==$?void 0:$.content)},span:v,colon:n,component:r,itemPrefixCls:b,bordered:a,label:l?e:null,content:s?p:null,type:o}):[t.createElement(g,{key:`label-${x||O}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),f),null==$?void 0:$.label),span:1,colon:n,component:r[0],itemPrefixCls:b,bordered:a,label:e,type:"label"}),t.createElement(g,{key:`content-${x||O}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),h),y),null==$?void 0:$.content),span:2*v-1,component:r[1],itemPrefixCls:b,bordered:a,content:p,type:"content"})])}let b=e=>{let n=t.useContext(s),{prefixCls:i,vertical:a,row:r,index:o,bordered:l}=e;return a?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${o}`,className:`${i}-row`},p(r,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${o}`,className:`${i}-row`},p(r,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:o,className:`${i}-row`},p(r,e,Object.assign({component:l?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var m=e.i(915654),h=e.i(183293),f=e.i(246422),y=e.i(838378);let v=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:i,itemPaddingEnd:a,colonMarginRight:r,colonMarginLeft:o,titleMarginBottom:l}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.padding)} ${(0,m.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingSM)} ${(0,m.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingXS)} ${(0,m.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:l},[`${t}-title`]:Object.assign(Object.assign({},h.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:i,paddingInlineEnd:a},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,m.unit)(o)} ${(0,m.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var x=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);at.indexOf(i[a])&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n};let $=e=>{let g,{prefixCls:p,title:m,extra:h,column:f,colon:y=!0,bordered:$,layout:O,children:j,className:S,rootClassName:w,style:C,size:E,labelStyle:k,contentStyle:z,styles:N,items:T,classNames:B}=e,M=x(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:R,className:I,style:L,classNames:G,styles:H}=(0,a.useComponentConfig)("descriptions"),W=P("descriptions",p),A=(0,o.default)(),D=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,i.matchScreen)(A,Object.assign(Object.assign({},l),f)))?e:3},[A,f]),F=(g=t.useMemo(()=>T||(0,d.default)(j).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[T,j]),t.useMemo(()=>g.map(e=>{var{span:t}=e,n=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,i.matchScreen)(A,t)})}),[g,A])),X=(0,r.default)(E),K=((e,n)=>{let[i,a]=(0,t.useMemo)(()=>{let t,i,a,r;return t=[],i=[],a=!1,r=0,n.filter(e=>e).forEach(n=>{let{filled:o}=n,l=u(n,["filled"]);if(o){i.push(l),t.push(i),i=[],r=0;return}let s=e-r;(r+=n.span||1)>=e?(r>e?(a=!0,i.push(Object.assign(Object.assign({},l),{span:s}))):i.push(l),t.push(i),i=[],r=0):i.push(l)}),i.length>0&&t.push(i),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:k,contentStyle:z,styles:{content:Object.assign(Object.assign({},H.content),null==N?void 0:N.content),label:Object.assign(Object.assign({},H.label),null==N?void 0:N.label)},classNames:{label:(0,n.default)(G.label,null==B?void 0:B.label),content:(0,n.default)(G.content,null==B?void 0:B.content)}}),[k,z,N,B,G,H]);return q(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,n.default)(W,I,G.root,null==B?void 0:B.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!$,[`${W}-rtl`]:"rtl"===R},S,w,U,Q),style:Object.assign(Object.assign(Object.assign(Object.assign({},L),H.root),null==N?void 0:N.root),C)},M),(m||h)&&t.createElement("div",{className:(0,n.default)(`${W}-header`,G.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},H.header),null==N?void 0:N.header)},m&&t.createElement("div",{className:(0,n.default)(`${W}-title`,G.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},H.title),null==N?void 0:N.title)},m),h&&t.createElement("div",{className:(0,n.default)(`${W}-extra`,G.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},H.extra),null==N?void 0:N.extra)},h)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,K.map((e,n)=>t.createElement(b,{key:n,index:n,colon:y,prefixCls:W,vertical:"vertical"===O,bordered:$,row:e}))))))))};$.Item=({children:e})=>e,e.s(["Descriptions",0,$],869216)},368869,e=>{"use strict";e.i(296059);var t=e.i(868297),n=e.i(732961),i=e.i(289882),a=e.i(170517),r=e.i(628882),o=e.i(320890),l=e.i(104458),s=e.i(722319),d=e.i(8398),c=e.i(279728);e.i(765846);var u=e.i(602716),g=e.i(328052),p=e.i(135551);let b=(e,t)=>new p.FastColor(e).setA(t).toRgbString(),m=(e,t)=>new p.FastColor(e).lighten(t).toHexString(),h=e=>{let t=(0,u.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},f=(e,t)=>{let n=e||"#000",i=t||"#fff";return{colorBgBase:n,colorTextBase:i,colorText:b(i,.85),colorTextSecondary:b(i,.65),colorTextTertiary:b(i,.45),colorTextQuaternary:b(i,.25),colorFill:b(i,.18),colorFillSecondary:b(i,.12),colorFillTertiary:b(i,.08),colorFillQuaternary:b(i,.04),colorBgSolid:b(i,.95),colorBgSolidHover:b(i,1),colorBgSolidActive:b(i,.9),colorBgElevated:m(n,12),colorBgContainer:m(n,8),colorBgLayout:m(n,0),colorBgSpotlight:m(n,26),colorBgBlur:b(i,.04),colorBorder:m(n,26),colorBorderSecondary:m(n,19)}},y={defaultSeed:o.defaultConfig.token,useToken:function(){let[e,t,n]=(0,l.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:s.default,darkAlgorithm:(e,t)=>{let n=Object.keys(a.defaultPresetColors).map(t=>{let n=(0,u.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,i,a)=>(e[`${t}-${a+1}`]=n[a],e[`${t}${a+1}`]=n[a],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),i=null!=t?t:(0,s.default)(e),r=(0,g.default)(e,{generateColorPalettes:h,generateNeutralColorPalettes:f});return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,s.default)(e),i=n.fontSizeSM,a=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,i=n-2;return{sizeXXL:t*(i+10),sizeXL:t*(i+6),sizeLG:t*(i+2),sizeMD:t*(i+2),sizeMS:t*(i+1),size:t*i,sizeSM:t*i,sizeXS:t*(i-1),sizeXXS:t*(i-1)}}(null!=t?t:e)),(0,c.default)(i)),{controlHeight:a}),(0,d.default)(Object.assign(Object.assign({},n),{controlHeight:a})))},getDesignToken:e=>{let o=(null==e?void 0:e.algorithm)?(0,t.createTheme)(e.algorithm):i.default,l=Object.assign(Object.assign({},a.default),null==e?void 0:e.token);return(0,n.getComputedToken)(l,{override:null==e?void 0:e.token},o,r.default)},defaultConfig:o.defaultConfig,_internalContext:o.DesignTokenContext};e.s(["theme",0,y],368869)},127952,e=>{"use strict";var t=e.i(843476),n=e.i(560445),i=e.i(175712),a=e.i(869216),r=e.i(311451),o=e.i(212931),l=e.i(898586),s=e.i(368869),d=e.i(270377),c=e.i(271645);e.s(["default",0,function({isOpen:e,title:u,alertMessage:g,message:p,resourceInformationTitle:b,resourceInformation:m,onCancel:h,onOk:f,confirmLoading:y,requiredConfirmation:v}){let{Title:x,Text:$}=l.Typography,{token:O}=s.theme.useToken(),[j,S]=(0,c.useState)("");return(0,c.useEffect)(()=>{e&&S("")},[e]),(0,t.jsx)(o.Modal,{title:u,open:e,onOk:f,onCancel:h,confirmLoading:y,okText:y?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!v&&j!==v||y},cancelButtonProps:{disabled:y},children:(0,t.jsxs)("div",{className:"space-y-4",children:[g&&(0,t.jsx)(n.Alert,{message:g,type:"warning"}),(0,t.jsx)(i.Card,{title:b,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:O.colorErrorBg,borderColor:O.colorErrorBorder}},style:{backgroundColor:O.colorErrorBg,borderColor:O.colorErrorBorder},children:(0,t.jsx)(a.Descriptions,{column:1,size:"small",children:m&&m.map(({label:e,value:n,...i})=>(0,t.jsx)(a.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)($,{...i,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)($,{children:p})}),v&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)($,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)($,{children:"Type "}),(0,t.jsx)($,{strong:!0,type:"danger",children:v}),(0,t.jsx)($,{children:" to confirm deletion:"})]}),(0,t.jsx)(r.Input,{value:j,onChange:e=>S(e.target.value),placeholder:v,className:"rounded-md",prefix:(0,t.jsx)(d.ExclamationCircleOutlined,{style:{color:O.colorError}}),autoFocus:!0})]})]})})}])},624687,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(115504);let a=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)("textarea",{ref:a,"data-slot":"textarea",className:(0,i.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n}));a.displayName="Textarea",e.s(["Textarea",0,a])},950594,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(115504),a=e.i(519455),r=e.i(793479),o=e.i(624687);let l=(0,i.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),s=(0,i.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=n.forwardRef(({className:e,type:n="button",variant:r="ghost",size:o="xs",...l},d)=>(0,t.jsx)(a.Button,{ref:d,type:n,"data-size":o,variant:r,className:(0,i.cn)(s({size:o}),e),...l}));d.displayName="InputGroupButton";let c=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Input,{ref:a,"data-slot":"input-group-control",className:(0,i.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...n}));c.displayName="InputGroupInput",n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(o.Textarea,{ref:a,"data-slot":"input-group-control",className:(0,i.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...n})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,i.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...n})},"InputGroupAddon",0,function({className:e,align:n="inline-start",...a}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:(0,i.cn)(l({align:n}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...a})},"InputGroupButton",0,d,"InputGroupInput",0,c,"InputGroupText",0,function({className:e,...n}){return(0,t.jsx)("span",{className:(0,i.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...n})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0ak2vacq91c7k.js b/litellm/proxy/_experimental/out/_next/static/chunks/0ak2vacq91c7k.js
new file mode 100644
index 00000000000..e0319eca696
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0ak2vacq91c7k.js
@@ -0,0 +1,89 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,366321,e=>{"use strict";var t=e.i(843476),s=e.i(708347),r=e.i(475254);let l=(0,r.default)("circle-help",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var a=e.i(555436),n=e.i(487486),i=e.i(519455),o=e.i(950594),c=e.i(967489),d=e.i(677572),u=e.i(746798),m=e.i(571303),h=e.i(868499),x=e.i(844444),p=e.i(271645),g=e.i(266027),f=e.i(500727),j=e.i(912598),v=e.i(243652),b=e.i(602869),y=e.i(135214);let _=(0,v.createQueryKeys)("mcpServerHealth");var N=e.i(727749),w=e.i(988846),k=e.i(678784),C=e.i(995926),T=e.i(328196),S=e.i(302202),A=e.i(409797),I=e.i(54131),O=e.i(440987);let P=[{label:"Documentation",fields:[{key:"description",label:"Description",description:"Must have a non-empty description",check:e=>!!e.description?.trim()},{key:"alias",label:"Alias",description:"Must have a display alias",check:e=>!!e.alias?.trim()}]},{label:"Source",fields:[{key:"source_url",label:"GitHub / Source URL",description:"Must link to a source repository",check:e=>!!e.source_url?.trim()}]},{label:"Connection",fields:[{key:"url",label:"Server URL",description:"Must have a URL configured",check:e=>!!e.url?.trim()}]},{label:"Security",fields:[{key:"auth_type",label:"Auth configured",description:"Must use authentication (not 'none')",check:e=>!!e.auth_type&&"none"!==e.auth_type}]}],M=P.flatMap(e=>e.fields),F="mcp_required_fields",E={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending_review:{label:"Pending Review",bg:"bg-yellow-50",text:"text-yellow-700",dot:"bg-yellow-500"},rejected:{label:"Rejected",bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function L({label:e,value:s,color:r}){return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg px-4 py-3",children:[(0,t.jsx)("div",{className:`text-2xl font-bold ${r}`,children:s}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function R({action:e,serverName:s,isCurrentlyActive:r,onConfirm:l,onCancel:a}){let[n,i]=(0,p.useState)(""),o="approve"===e;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-xl p-6 max-w-sm w-full mx-4",children:[(0,t.jsx)("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-4 ${o?"bg-green-100":"bg-red-100"}`,children:o?(0,t.jsx)(k.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(T.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:o?"Approve MCP Server":"Reject MCP Server"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',s,'"']}),"?"," ",o?"This will activate the server. The submitting user will see it in their MCP Servers list once approved.":r?"This server is currently live. Rejecting it will immediately remove it from the proxy runtime.":"This will mark the submission as rejected."]}),!o&&(0,t.jsx)("textarea",{placeholder:"Reason for rejection (optional)",value:n,onChange:e=>i(e.target.value),className:"w-full border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 placeholder-gray-400 focus:outline-hidden focus:ring-1 focus:ring-blue-500 mb-4 resize-none",rows:3}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:a,className:"flex-1 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>l(o?void 0:n||void 0),className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${o?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:o?"Approve":"Reject"})]})]})})}function U({requiredFields:e,onChange:s,onSave:r,isSaving:l}){let[a,n]=(0,p.useState)(!1),i=M.filter(t=>e.includes(t.key));return(0,t.jsxs)("div",{className:"mb-5 border border-gray-200 rounded-lg bg-white overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer select-none",onClick:()=>n(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(O.SettingsIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-800",children:"Submission Rules"}),i.length>0?(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["(",i.length," required field",1!==i.length?"s":"",")"]}):(0,t.jsx)("span",{className:"text-xs text-gray-400 italic",children:"no rules set"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!a&&i.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 max-w-md",children:i.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs bg-blue-50 text-blue-700 border border-blue-200 px-2 py-0.5 rounded-full",children:[(0,t.jsx)(k.CheckIcon,{className:"h-3 w-3"}),e.label]},e.key))}),a?(0,t.jsx)(I.ChevronUpIcon,{className:"h-4 w-4 text-gray-400"}):(0,t.jsx)(A.ChevronDownIcon,{className:"h-4 w-4 text-gray-400"})]})]}),a&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 pt-4 pb-4",children:[(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-4",children:"Select which fields must be filled in before a submission is considered compliant. LiteLLM will show ✓ / ✗ for each rule on every submission card below."}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-5",children:P.map(r=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:r.label}),(0,t.jsx)("div",{className:"space-y-2",children:r.fields.map(r=>{let l=e.includes(r.key);return(0,t.jsxs)("label",{className:"flex items-start gap-2.5 cursor-pointer group",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{var t;return t=r.key,void s(e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-0.5 h-4 w-4 rounded-sm border-gray-300 text-blue-600 focus:ring-blue-500 cursor-pointer"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 group-hover:text-blue-700 transition-colors",children:r.label}),(0,t.jsx)("div",{className:"text-xs text-gray-400",children:r.description})]})]},r.key)})})]},r.label))}),(0,t.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,t.jsx)("button",{type:"button",disabled:l,onClick:async()=>{await r(),n(!1)},className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50 rounded-md transition-colors",children:l?"Saving…":"Save Rules"}),(0,t.jsx)("button",{type:"button",onClick:()=>n(!1),className:"px-4 py-1.5 text-sm font-medium text-gray-600 hover:text-gray-900 border border-gray-200 rounded-md hover:bg-gray-50 transition-colors",children:"Cancel"})]})]})]})}function z({server:e,onApprove:s,onReject:r,requiredFields:l}){let a=e.approval_status??"active",n=E[a]??E.active,i=M.filter(e=>l.includes(e.key)).map(t=>({key:t.key,label:t.label,description:t.description,passed:t.check(e)})),o=i.filter(e=>e.passed).length,c=i.length-o,d=i.length>0&&0===c;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"px-4 pt-4 pb-3",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-1.5",children:(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${n.bg} ${n.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${n.dot}`}),n.label]})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:e.alias??e.server_name??e.server_id}),e.description&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 line-clamp-1",children:e.description}),e.url&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1.5",children:[(0,t.jsx)(S.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.url})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1.5 text-xs text-gray-400",children:[(0,t.jsxs)("span",{children:["Transport: ",(0,t.jsx)("span",{className:"text-gray-600",children:e.transport??"sse"})]}),(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:["Submitted by: ",(0,t.jsx)("span",{className:"text-gray-600",children:e.submitted_by??"—"})]}),(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:function(e){if(!e)return"—";try{let t=new Date(e);return isNaN(t.getTime())?e:t.toISOString().slice(0,10)}catch{return e}}(e.submitted_at)})]}),"rejected"===a&&e.review_notes&&(0,t.jsxs)("p",{className:"text-xs text-red-600 mt-1.5",children:["Rejection reason: ",e.review_notes]})]}),0===i.length&&"rejected"!==a&&(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["active"!==a&&(0,t.jsx)("button",{type:"button",onClick:s,className:"text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-red-300 text-red-600 hover:bg-red-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:"Reject"})]}),0===i.length&&"rejected"===a&&(0,t.jsx)("div",{className:"flex items-center gap-2 shrink-0",children:(0,t.jsx)("button",{type:"button",onClick:s,className:"text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Re-approve"})})]})}),i.length>0&&(0,t.jsxs)("div",{className:"border-t border-gray-200",children:[(0,t.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 ${d?"bg-green-50 border-b border-green-100":"bg-red-50 border-b border-red-100"}`,children:[(0,t.jsx)("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${d?"bg-green-500":"bg-red-500"}`,children:d?(0,t.jsx)(k.CheckIcon,{className:"h-4 w-4 text-white"}):(0,t.jsx)(C.XIcon,{className:"h-4 w-4 text-white"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:`text-sm font-semibold leading-tight ${d?"text-green-800":"text-red-800"}`,children:d?"All checks passed":`${c} check${1!==c?"s":""} failed`}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:[o," passing, ",c," failing"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["active"!==a&&"rejected"!==a&&(0,t.jsx)("button",{type:"button",onClick:s,className:"text-xs bg-green-600 hover:bg-green-700 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Approve"}),"rejected"===a&&(0,t.jsx)("button",{type:"button",onClick:s,className:"text-xs bg-green-600 hover:bg-green-700 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Re-approve"}),"rejected"!==a&&(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-red-300 text-red-600 hover:bg-red-50 bg-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Reject"})]})]}),(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:i.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,t.jsx)("div",{className:`w-5 h-5 rounded-full flex items-center justify-center shrink-0 ${e.passed?"bg-green-100":"bg-red-100"}`,children:e.passed?(0,t.jsx)(k.CheckIcon,{className:"h-3 w-3 text-green-600"}):(0,t.jsx)(C.XIcon,{className:"h-3 w-3 text-red-600"})}),(0,t.jsx)("span",{className:`text-sm flex-1 ${e.passed?"text-gray-700":"text-gray-800"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs ${e.passed?"text-green-600":"text-red-500"}`,children:e.passed?"Passes":"Missing"})]},e.key))})]})]})}function H({accessToken:e}){let[s,r]=(0,p.useState)({total:0,pending_review:0,active:0,rejected:0,items:[]}),[l,a]=(0,p.useState)(""),[n,i]=(0,p.useState)("all"),[o,c]=(0,p.useState)(null),[d,u]=(0,p.useState)(!0),[m,h]=(0,p.useState)(null),[x,g]=(0,p.useState)([]),[f,j]=(0,p.useState)(!1),v=(0,p.useCallback)(async()=>{if(!e)return void u(!1);u(!0),h(null);try{let[t,s]=await Promise.all([(0,b.fetchMCPSubmissions)(e),(0,b.getGeneralSettingsCall)(e).catch(e=>(console.warn("MCPSubmissionsTab: failed to load general settings, compliance rules will be empty:",e),null))]);if(r(t),s?.data&&Array.isArray(s.data)){let e=s.data.find(e=>e.field_name===F);e&&Array.isArray(e.field_value)&&g(e.field_value)}}catch(e){h(e instanceof Error?e.message:"Failed to load submissions")}finally{u(!1)}},[e]);(0,p.useEffect)(()=>{v()},[v]);let y=async()=>{if(e){j(!0);try{await (0,b.updateConfigFieldSetting)(e,F,x),N.default.success("Submission rules saved")}catch{N.default.fromBackend("Failed to save submission rules")}finally{j(!1)}}},_=s.items.filter(e=>{if("all"!==n&&e.approval_status!==n)return!1;if(l.trim()){let t=l.toLowerCase(),s=(e.alias??e.server_name??e.server_id??"").toLowerCase(),r=(e.url??"").toLowerCase();return s.includes(t)||r.includes(t)}return!0});async function k(t,s){if(e)try{await (0,b.approveMCPServer)(e,t),await v(),N.default.success(`MCP server "${s}" approved`)}catch{N.default.fromBackend("Failed to approve MCP server")}finally{c(null)}}async function C(t,s,r){if(e)try{await (0,b.rejectMCPServer)(e,t,r),await v(),N.default.success(`MCP server "${s}" rejected`)}catch{N.default.fromBackend("Failed to reject MCP server")}finally{c(null)}}return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)(U,{requiredFields:x,onChange:g,onSave:y,isSaving:f}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(L,{label:"Total Submitted",value:s.total,color:"text-gray-900"}),(0,t.jsx)(L,{label:"Pending Review",value:s.pending_review,color:"text-yellow-600"}),(0,t.jsx)(L,{label:"Active",value:s.active,color:"text-green-600"}),(0,t.jsx)(L,{label:"Rejected",value:s.rejected,color:"text-red-600"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(w.SearchIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,t.jsx)("input",{type:"text",placeholder:"Search MCP servers...",value:l,onChange:e=>a(e.target.value),className:"w-full pl-9 pr-4 py-2 border border-gray-200 rounded-md text-sm text-gray-700 placeholder-gray-400 focus:outline-hidden focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:n,onChange:e=>i(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-hidden focus:ring-1 focus:ring-blue-500 focus:border-blue-500 bg-white",children:[(0,t.jsx)("option",{value:"all",children:"All Status"}),(0,t.jsx)("option",{value:"pending_review",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[d&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),m&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:m}),!d&&!m&&0===_.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No MCP server submissions match your filters."}),!d&&!m&&_.map(e=>(0,t.jsx)(z,{server:e,requiredFields:x,onApprove:()=>c({serverId:e.server_id,serverName:e.alias??e.server_name??e.server_id,action:"approve"}),onReject:()=>c({serverId:e.server_id,serverName:e.alias??e.server_name??e.server_id,action:"reject",isCurrentlyActive:"active"===e.approval_status})},e.server_id))]}),o&&(0,t.jsx)(R,{action:o.action,serverName:o.serverName,isCurrentlyActive:o.isCurrentlyActive,onConfirm:e=>"approve"===o.action?k(o.serverId,o.serverName):C(o.serverId,o.serverName,e),onCancel:()=>c(null)})]})}var D=e.i(994388),V=e.i(599724),B=e.i(629569),q=e.i(212931),$=e.i(808613),W=e.i(311451),K=e.i(998573),G=e.i(482725),Y=e.i(988297),J=e.i(332102),Q=e.i(699857);e.i(707701);var Z=e.i(807235),X=e.i(174886);let ee=(0,r.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var et=e.i(541071),es=e.i(788699),er=e.i(727612),el=e.i(494862);e.i(622826);var ea=e.i(200208),en=e.i(399536),ei=e.i(997422),eo=e.i(755146),ec=e.i(115504),ed=e.i(500330);function eu(e,t){return e?`${e}-${t}`:t}function em(e){return`${(0,b.getProxyBaseUrl)()}/toolset/${e}/mcp`}function eh({toolset:e,isAdmin:s,onEditClick:r,onDeleteClick:l}){return(0,t.jsxs)(eo.DropdownMenu,{children:[(0,t.jsx)(eo.DropdownMenuTrigger,{"aria-label":"Open toolset actions","data-testid":`toolset-actions-${e.toolset_id}`,className:(0,ec.cn)((0,i.buttonVariants)({variant:"ghost",size:"icon-sm"}),"text-muted-foreground"),children:(0,t.jsx)(et.MoreHorizontal,{className:"size-4"})}),(0,t.jsxs)(eo.DropdownMenuContent,{align:"end",className:"w-52",children:[(0,t.jsxs)(eo.DropdownMenuItem,{"data-testid":"toolset-action-copy-url",onClick:()=>void(0,ed.copyToClipboard)(em(e.toolset_name),"Endpoint URL copied"),children:[(0,t.jsx)(ee,{}),"Copy endpoint URL"]}),(0,t.jsxs)(eo.DropdownMenuItem,{"data-testid":"toolset-action-copy-id",onClick:()=>void(0,ed.copyToClipboard)(e.toolset_id,"Toolset ID copied"),children:[(0,t.jsx)(X.Copy,{}),"Copy toolset ID"]}),s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eo.DropdownMenuSeparator,{}),(0,t.jsxs)(eo.DropdownMenuItem,{"data-testid":"toolset-action-edit",onClick:()=>r(e),children:[(0,t.jsx)(es.Pencil,{}),"Edit"]}),(0,t.jsxs)(eo.DropdownMenuItem,{variant:"destructive","data-testid":"toolset-action-delete",onClick:()=>l(e.toolset_id),children:[(0,t.jsx)(er.Trash2,{}),"Delete"]})]})]})]})}function ex({serverId:e,serverName:s,accessToken:r,selectedTools:l,onToggle:a}){let[n,i]=(0,p.useState)([]),[o,c]=(0,p.useState)(!1),[d,u]=(0,p.useState)(!1),m=new Set(l.filter(t=>t.server_id===e).map(e=>e.tool_name)),h=(0,p.useCallback)(async()=>{if(r&&!(n.length>0)){c(!0);try{let t=await (0,b.listMCPTools)(r,e),s=Array.isArray(t)?t:t?.tools??[];i(s.map(e=>({name:e.name??e.tool_name??e,description:e.description??""})))}catch{i([])}finally{c(!1)}}},[r,e,n.length]);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 transition-colors",onClick:()=>{d||h(),u(!d)},children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500 shrink-0"}),s,m.size>0&&(0,t.jsxs)("span",{className:"ml-1 text-xs text-purple-600 font-semibold",children:[m.size," selected"]})]}),(0,t.jsx)("span",{className:"text-gray-400 text-xs",children:d?"▲":"▼"})]}),d&&(0,t.jsx)("div",{className:"p-2",children:o?(0,t.jsx)("div",{className:"flex justify-center py-3",children:(0,t.jsx)(G.Spin,{size:"small"})}):0===n.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 px-2 py-2",children:"No tools found for this server."}):(0,t.jsx)("div",{className:"flex flex-col gap-1",children:n.map(s=>{let r=m.has(s.name);return(0,t.jsxs)("button",{type:"button",onClick:()=>a({server_id:e,tool_name:s.name}),className:`flex items-start justify-between px-3 py-2 rounded-lg text-left transition-colors ${r?"bg-purple-50 border border-purple-300":"bg-white border border-gray-100 hover:bg-gray-50"}`,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:`text-sm font-medium leading-tight ${r?"text-purple-800":"text-gray-800"}`,children:s.name}),s.description&&(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-0.5 leading-tight line-clamp-2",children:s.description})]}),r&&(0,t.jsx)("span",{className:"text-purple-500 text-xs font-semibold ml-2 shrink-0 mt-0.5",children:"✓"})]},s.name)})})})]})}function ep({open:e,onClose:s,onSave:r,accessToken:l,initialToolset:a}){let[n]=$.Form.useForm(),[i,o]=(0,p.useState)(a?.tools||[]),[c,d]=(0,p.useState)(!1),[u,m]=(0,p.useState)(""),{data:h=[]}=(0,f.useMCPServers)(),x=p.default.useMemo(()=>new Map(h.map(e=>[e.server_id,e.alias||e.server_name||e.server_id])),[h]);p.default.useEffect(()=>{e&&(n.setFieldsValue({toolset_name:a?.toolset_name||"",description:a?.description||""}),o(a?.tools||[]),m(""))},[e,a]);let g=e=>{o(t=>t.some(t=>t.server_id===e.server_id&&t.tool_name===e.tool_name)?t.filter(t=>t.server_id!==e.server_id||t.tool_name!==e.tool_name):[...t,e])},j=async()=>{let e=await n.validateFields();d(!0);try{await r(e.toolset_name,e.description,i),s()}finally{d(!1)}},v=h.filter(e=>{let t=u.toLowerCase();return!t||(e.alias||"").toLowerCase().includes(t)||(e.server_name||"").toLowerCase().includes(t)});return(0,t.jsxs)(q.Modal,{open:e,onCancel:s,title:a?"Edit Toolset":"New Toolset",width:960,footer:null,forceRender:!0,children:[(0,t.jsx)($.Form,{form:n,layout:"vertical",className:"mt-2",children:(0,t.jsxs)("div",{className:"flex gap-4 mb-4",children:[(0,t.jsx)($.Form.Item,{label:"Toolset Name",name:"toolset_name",rules:[{required:!0,message:"Please enter a toolset name"}],className:"flex-1 mb-0",children:(0,t.jsx)(W.Input,{placeholder:"e.g. github-linear-tools"})}),(0,t.jsx)($.Form.Item,{label:"Description",name:"description",className:"flex-1 mb-0",children:(0,t.jsx)(W.Input,{placeholder:"Optional description"})})]})}),(0,t.jsxs)("div",{className:"flex gap-4 mt-2",style:{minHeight:360},children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,t.jsx)(V.Text,{className:"text-sm font-semibold text-gray-700",children:"Available Tools"})}),(0,t.jsx)(W.Input,{placeholder:"Search MCP servers...",value:u,onChange:e=>m(e.target.value),className:"mb-2",allowClear:!0}),(0,t.jsx)("div",{className:"space-y-2 overflow-y-auto",style:{maxHeight:300},children:0===v.length?(0,t.jsx)(V.Text,{className:"text-gray-400 text-sm",children:0===h.length?"No MCP servers configured":"No servers match your search"}):v.map(e=>(0,t.jsx)(ex,{serverId:e.server_id,serverName:e.alias||e.server_name||e.server_id,accessToken:l,selectedTools:i,onToggle:g},e.server_id))})]}),(0,t.jsx)("div",{className:"w-px bg-gray-200 shrink-0"}),(0,t.jsxs)("div",{className:"w-72 shrink-0",children:[(0,t.jsxs)(V.Text,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:["Your Toolset ",(0,t.jsxs)("span",{className:"text-xs font-normal text-gray-400",children:["(",i.length," tools)"]})]}),(0,t.jsx)("div",{className:"space-y-1 overflow-y-auto",style:{maxHeight:340},children:0===i.length?(0,t.jsx)(V.Text,{className:"text-gray-400 text-sm",children:"No tools added yet"}):i.map((e,s)=>(0,t.jsxs)("button",{type:"button",onClick:()=>g(e),className:"w-full flex items-center justify-between px-3 py-1.5 rounded-lg border border-purple-200 bg-purple-50 hover:bg-red-50 hover:border-red-200 group transition-colors",children:[(0,t.jsxs)("div",{className:"min-w-0 text-left",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-purple-800 group-hover:text-red-600 truncate block",children:eu(x.get(e.server_id),e.tool_name)}),(0,t.jsxs)("span",{className:"text-[10px] text-purple-400 truncate block",children:[e.server_id.slice(0,8),"…"]})]}),(0,t.jsx)("span",{className:"ml-2 text-purple-300 group-hover:text-red-400 text-xs shrink-0",children:"✕"})]},s))})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)(D.Button,{variant:"secondary",onClick:s,children:"Cancel"}),(0,t.jsx)(D.Button,{onClick:j,loading:c,children:a?"Save Changes":"Create Toolset"})]})]})}function eg(){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,t.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,t.jsx)(J.Inbox,{className:"size-5 text-muted-foreground"})}),(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:"No toolsets yet"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Create a toolset to give keys and teams a curated set of MCP tools."})]})}function ef(){let[e,s]=(0,p.useState)(!1),r=(0,b.getProxyBaseUrl)(),l=`{
+ "mcpServers": {
+ "my-toolset": {
+ "url": "${r}/toolset//mcp",
+ "headers": { "x-litellm-api-key": "Bearer " }
+ }
+ }
+}`,a=async()=>{try{await navigator.clipboard.writeText(l),s(!0),setTimeout(()=>s(!1),1500)}catch{}};return(0,t.jsxs)("div",{className:"mb-6 rounded-lg border border-gray-200 bg-gray-50 px-5 py-4",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-gray-700 mb-1",children:"How toolsets work"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-3",children:["Create a toolset, assign it to a key via"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"API Keys → Edit Key → MCP Servers"}),", then point your MCP client at the toolset URL. The client only sees the tools you picked."]}),(0,t.jsx)("div",{className:"text-xs text-gray-400 mb-1",children:"Claude Code / Cursor config"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("pre",{className:"bg-white border border-gray-200 rounded-sm px-4 py-3 text-xs font-mono text-gray-700 overflow-x-auto leading-relaxed pr-14",children:l}),(0,t.jsx)("button",{type:"button",onClick:a,className:"absolute top-2 right-2 px-2 py-1 text-xs rounded-sm border bg-white hover:bg-gray-50 text-gray-400 hover:text-gray-600 border-gray-200 transition-colors",children:e?"✓":"copy"})]})]})}function ej({accessToken:e,userRole:s}){let r=(0,j.useQueryClient)(),{data:l=[],isLoading:a}=(0,Q.useMCPToolsets)(),{data:n=[]}=(0,f.useMCPServers)(),[i,o]=(0,p.useState)(!1),[c,d]=(0,p.useState)(null),[u,m]=(0,p.useState)(null),[h,x]=(0,p.useState)(!1),g="Admin"===s||"proxy_admin"===s,v=async(t,s,l)=>{e&&(await (0,b.createMCPToolset)(e,{toolset_name:t,description:s,tools:l}),K.message.success("Toolset created"),r.invalidateQueries({queryKey:["mcpToolsets"]}))},y=async(t,s,l)=>{e&&c&&(await (0,b.updateMCPToolset)(e,{toolset_id:c.toolset_id,toolset_name:t,description:s,tools:l}),K.message.success("Toolset updated"),r.invalidateQueries({queryKey:["mcpToolsets"]}),d(null))},_=async()=>{if(e&&u){x(!0);try{await (0,b.deleteMCPToolset)(e,u),K.message.success("Toolset deleted"),r.invalidateQueries({queryKey:["mcpToolsets"]}),m(null)}finally{x(!1)}}},N=p.default.useMemo(()=>new Map(n.map(e=>[e.server_id,e.alias||e.server_name||e.server_id])),[n]),[w,k]=(0,p.useState)([]),C=p.default.useMemo(()=>(({isAdmin:e,serverPrefixById:s,onEditClick:r,onDeleteClick:l})=>[{id:"toolset_id",accessorKey:"toolset_id",meta:{title:"Toolset ID"},header:"Toolset ID",size:140,enableSorting:!1,cell:({row:e})=>(0,t.jsx)(en.IdCell,{value:e.original.toolset_id})},{id:"toolset_name",accessorKey:"toolset_name",meta:{title:"Name"},header:({column:e})=>(0,t.jsx)(el.DataTableSortHeader,{column:e,title:"Name"}),size:260,enableSorting:!0,sortingFn:"alphanumeric",cell:({row:s})=>(0,t.jsx)(ei.IdentityCell,{title:s.original.toolset_name,subtitle:em(s.original.toolset_name),className:"max-w-80",onClick:e?()=>r(s.original):void 0})},{id:"description",accessorKey:"description",meta:{title:"Description"},header:"Description",size:200,enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"block max-w-72 truncate text-sm text-muted-foreground",title:e.original.description,children:e.original.description||"—"})},{id:"tools",meta:{title:"Tools",skeleton:"chips"},header:"Tools",size:260,enableSorting:!1,cell:({row:e})=>{let r=e.original.tools;return(0,t.jsxs)("div",{className:"flex max-w-xs flex-wrap gap-1",children:[r.slice(0,4).map(e=>(0,t.jsx)("span",{className:"inline-flex items-center rounded-md bg-muted px-1.5 py-0.5 text-xs",children:eu(s.get(e.server_id),e.tool_name)},`${e.server_id}-${e.tool_name}`)),r.length>4&&(0,t.jsxs)("span",{className:"self-center text-xs text-muted-foreground",children:["+",r.length-4," more"]})]})}},{id:"created_at",accessorKey:"created_at",meta:{title:"Created"},header:({column:e})=>(0,t.jsx)(el.DataTableSortHeader,{column:e,title:"Created"}),size:120,enableSorting:!0,cell:({row:e})=>(0,t.jsx)(ea.DateCell,{value:e.original.created_at,precision:"date"})},{id:"actions",meta:{className:"text-right",headerClassName:"text-right"},header:()=>(0,t.jsx)("span",{className:"sr-only",children:"Actions"}),size:64,enableSorting:!1,enableHiding:!1,cell:({row:s})=>(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(eh,{toolset:s.original,isAdmin:e,onEditClick:r,onDeleteClick:l})})}])({isAdmin:g,serverPrefixById:N,onEditClick:d,onDeleteClick:m}),[g,N]);return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B.Title,{children:"MCP Toolsets"}),(0,t.jsx)(V.Text,{className:"text-gray-500 text-sm",children:"Curated collections of tools from one or more MCP servers. Assign toolsets to keys and teams via the MCP permissions dropdown."})]}),g&&(0,t.jsx)(D.Button,{icon:Y.PlusIcon,onClick:()=>o(!0),children:"New Toolset"})]}),(0,t.jsx)(ef,{}),(0,t.jsx)(Z.DataTable,{data:l,columns:C,getRowId:(e,t)=>e.toolset_id||String(t),sortingMode:"client",sorting:w,onSortingChange:k,isLoading:a,loadingMessage:"Loading toolsets…",noDataMessage:(0,t.jsx)(eg,{}),size:"compact"}),(0,t.jsx)(ep,{open:i,onClose:()=>o(!1),onSave:v,accessToken:e}),c&&(0,t.jsx)(ep,{open:!!c,onClose:()=>d(null),onSave:y,accessToken:e,initialToolset:c}),(0,t.jsx)(q.Modal,{open:!!u,onCancel:()=>m(null),onOk:_,okText:"Delete",okButtonProps:{danger:!0,loading:h},title:"Delete Toolset",children:(0,t.jsx)("p",{children:"Are you sure you want to delete this toolset? Keys and teams using it will lose access to the scoped tools."})})]})}var ev=e.i(592968),eb=e.i(199133),ey=e.i(28651),e_=e.i(790848),eN=e.i(362024),ew=e.i(827252),ek=e.i(779241),eC=e.i(909119),eT=e.i(292335);let eS=[{value:"client_secret_basic",label:"Client Secret Basic"},{value:"client_secret_post",label:"Client Secret Post"}],eA=({isEditing:e=!1})=>(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Endpoint Auth Method (optional)",(0,t.jsx)(ev.Tooltip,{title:"How the proxy authenticates to the upstream OAuth token endpoint. Client Secret Basic sends the client credentials in an HTTP Basic Authorization header; leave blank to use the default, Client Secret Post, which sends them in the request body.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","token_endpoint_auth_method"],children:(0,t.jsx)(eb.Select,{allowClear:!0,placeholder:e?"Leave blank to keep existing (default Client Secret Post)":"Default (Client Secret Post)",className:"rounded-lg",size:"large",options:eS})}),eI="rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",eO=({label:e,tooltip:s})=>(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[e,(0,t.jsx)(ev.Tooltip,{title:s,children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),eP=()=>(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Resource Indicator (optional)",tooltip:"RFC 8707 resource indicator sent to the authorization server so it mints a token audienced for this MCP server. Leave blank to send nothing, which is the default and what most providers expect. Use 'auto' to send this server's own URL. Set an exact identifier when the authorization server expects a specific one. Some providers reject this parameter and take the audience from scopes instead; if you see AADSTS901002, leave it blank. If you see invalid_target, the authorization server needs it set."}),name:["credentials","upstream_resource"],children:(0,t.jsx)(ek.TextInput,{placeholder:"auto, or https://mcp.example.com/mcp",className:eI})}),eM=({isM2M:e,isEditing:s=!1,oauthFlow:r,initialFlowType:l,docsUrl:a})=>{let n=s?" (leave blank to keep existing)":"",i=e=>s?[]:[{required:!0,message:e}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"OAuth Flow Type",tooltip:"Choose how the proxy authenticates with this MCP server. M2M is for server-to-server communication using client credentials. Interactive (PKCE) is for user-facing flows that require browser-based authorization."}),name:"oauth_flow_type",...l?{initialValue:l}:{},children:(0,t.jsxs)(eb.Select,{placeholder:"Select OAuth flow",className:"rounded-lg",size:"large",children:[(0,t.jsx)(eb.Select.Option,{value:eT.OAUTH_FLOW.M2M,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Machine-to-Machine (M2M)"}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-2",children:"server-to-server, no user interaction"})]})}),(0,t.jsx)(eb.Select.Option,{value:eT.OAUTH_FLOW.INTERACTIVE,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Interactive (PKCE)"}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-2",children:"browser-based user authorization"})]})})]})}),e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Client ID",tooltip:"OAuth2 client ID for the client_credentials grant."}),name:["credentials","client_id"],rules:i("Client ID is required for M2M OAuth"),children:(0,t.jsx)(ek.TextInput,{type:"password",placeholder:`Enter OAuth client ID${n}`,className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Client Secret",tooltip:"OAuth2 client secret for the client_credentials grant."}),name:["credentials","client_secret"],rules:i("Client Secret is required for M2M OAuth"),children:(0,t.jsx)(ek.TextInput,{type:"password",placeholder:`Enter OAuth client secret${n}`,className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Token URL",tooltip:"Token endpoint URL for the client_credentials grant."}),name:"token_url",rules:i("Token URL is required for M2M OAuth"),children:(0,t.jsx)(ek.TextInput,{placeholder:"https://auth.example.com/oauth/token",className:eI})}),(0,t.jsx)(eA,{isEditing:s}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Scopes (optional)",tooltip:"Optional scopes to request with the client_credentials grant."}),name:["credentials","scopes"],children:(0,t.jsx)(eb.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(eP,{})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)(eO,{label:"Client ID (optional)",tooltip:"Provide only if your MCP server cannot handle dynamic client registration."}),a&&(0,t.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-500 hover:text-blue-700 ml-2 font-normal",onClick:e=>e.stopPropagation(),children:"Create OAuth App →"})]}),name:["credentials","client_id"],children:(0,t.jsx)(ek.TextInput,{type:"password",placeholder:`Enter client ID${n}`,className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Client Secret (optional)",tooltip:"Provide only if your MCP server cannot handle dynamic client registration."}),name:["credentials","client_secret"],children:(0,t.jsx)(ek.TextInput,{type:"password",placeholder:`Enter client secret${n}`,className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Scopes (optional)",tooltip:"Optional scopes requested during token exchange. Separate multiple scopes with enter or commas."}),name:["credentials","scopes"],children:(0,t.jsx)(eb.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(eP,{}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Issuer (optional)",tooltip:"OAuth 2.0 authorization server issuer (RFC 8414). Leave empty to discover endpoints from the upstream resource; set it to pin the trust anchor, which makes this issuer's document the only endpoint source (RFC 8414 §3.3), overriding the Authorization/Token/Registration URLs above and failing closed if its metadata cannot be fetched."}),name:"issuer",children:(0,t.jsx)(ek.TextInput,{placeholder:"https://issuer.example.com",className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Authorization URL (optional)",tooltip:"Optional override for the authorization endpoint."}),name:"authorization_url",children:(0,t.jsx)(ek.TextInput,{placeholder:"https://example.com/oauth/authorize",className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Token URL (optional)",tooltip:"Optional override for the token endpoint."}),name:"token_url",children:(0,t.jsx)(ek.TextInput,{placeholder:"https://example.com/oauth/token",className:eI})}),(0,t.jsx)(eA,{isEditing:s}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Registration URL (optional)",tooltip:"Optional override for the dynamic client registration endpoint."}),name:"registration_url",children:(0,t.jsx)(ek.TextInput,{placeholder:"https://example.com/oauth/register",className:eI})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Token Validation Rules (optional)",tooltip:'JSON object of key-value rules checked against the OAuth token response before storing. Supports dot-notation for nested fields (e.g. {"organization": "my-org", "team.id": "123"}). Tokens that fail validation are rejected with HTTP 403.'}),name:"token_validation_json",rules:[{validator:(e,t)=>{if(!t||""===t.trim())return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject(Error("Must be valid JSON"))}}}],children:(0,t.jsx)(W.Input.TextArea,{placeholder:'{\n "organization": "my-org",\n "team.id": "123"\n}',rows:4,className:"font-mono text-sm rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eO,{label:"Token Storage TTL (seconds, optional)",tooltip:"How long to cache each user's OAuth access token in Redis before evicting it (never longer than the token's own expires_in). Leave blank to derive the TTL from the token's expires_in, or fall back to the 12-hour default."}),name:"token_storage_ttl_seconds",children:(0,t.jsx)(ey.InputNumber,{min:1,placeholder:"e.g. 3600",className:"w-full rounded-lg",style:{width:"100%"}})}),r&&(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(D.Button,{variant:"secondary",onClick:r.startOAuthFlow,disabled:"authorizing"===r.status||"exchanging"===r.status,children:"authorizing"===r.status?"Waiting for authorization...":"exchanging"===r.status?"Exchanging authorization code...":"Authorize & Fetch Token"}),r.error&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:r.error}),"success"===r.status&&r.tokenResponse?.access_token&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",r.tokenResponse.expires_in??"?"," seconds."]})]})]})]})};var eF=e.i(89128),eE=e.i(439573);function eL({authType:e}){return e!==eT.AUTH_TYPE.TRUE_PASSTHROUGH?null:(0,t.jsxs)(eE.Alert,{className:"mb-4",children:[(0,t.jsx)(eF.TriangleAlert,{}),(0,t.jsx)(eE.AlertTitle,{children:"True Passthrough disables LiteLLM authentication for this server"}),(0,t.jsx)(eE.AlertDescription,{children:"Anyone who can reach the gateway can call this server without a LiteLLM key. The caller's Authorization header is forwarded to the upstream verbatim, per-key and per-team rate limits and spend tracking do not apply, and the upstream is fully responsible for authenticating callers. Choose OAuth Delegate instead if callers should still authenticate to LiteLLM."})]})}var eR=e.i(464571),eU=e.i(536916);function ez({authType:e,initialChecked:s}){return(0,eT.isClientForwardedTokenMode)(e)?(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Gateway-hosted sign-in (DCR bridge)",(0,t.jsx)(ev.Tooltip,{title:"Lets OAuth-only clients like Claude Desktop register and sign in through the gateway. Turn off to relay the upstream server's own OAuth metadata instead (for clients pre-registered with the upstream IdP).",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"dcr_bridge",valuePropName:"checked",initialValue:s,children:(0,t.jsx)(e_.Switch,{})}):null}function eH({authType:e,oauthFlow:s,dcrBridgeInitialChecked:r,isEditing:l=!1,savedAuthType:a,removeStoredApp:n=!1,onRemoveStoredAppChange:i,appMayNotMatchUpstream:o=!1}){if(!(0,eT.isClientForwardedTokenMode)(e))return null;let c={authorizing:"Waiting for authorization...",exchanging:"Exchanging authorization code..."}[s.status]??"Authorize & Fetch Tools (browser-only)",d=l&&(0,eT.credentialAuthClass)(a)===(0,eT.credentialAuthClass)(e);return(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2 mb-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Callers bring their own upstream token for this auth type, so LiteLLM never stores tokens. To preview tools and configure the tool allowlist, authorize against the upstream here: the token stays in this browser session only and is never saved to LiteLLM. An OAuth app configured below IS saved with the server, so internal users who authorize from the Tools page go through it."}),o&&(0,t.jsx)("p",{className:"text-sm text-amber-600",children:"You changed the upstream URL or endpoints; the OAuth app entered here was registered for the previous upstream and may not be valid. Update the client ID, or clear it to use dynamic client registration."}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"OAuth Client ID (optional)"}),name:["credentials","client_id"],extra:d?"Set this to make everyone authorize through a specific app; required for upstreams without dynamic client registration (e.g. a pre-registered Slack app).":"Switching the auth type discards the previously saved app; enter a client ID here or leave blank to use dynamic client registration.",children:(0,t.jsx)(W.Input.Password,{placeholder:d?"Leave blank to keep the currently saved app (if any)":"Leave blank to use dynamic client registration",disabled:n,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"OAuth Client Secret (optional)"}),name:["credentials","client_secret"],children:(0,t.jsx)(W.Input.Password,{placeholder:d?"Leave blank to keep the currently saved secret (if any)":"Leave blank for public clients / PKCE",disabled:n,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(ez,{authType:e,initialChecked:r}),l&&i&&(0,t.jsx)(eU.Checkbox,{checked:n,onChange:e=>i(e.target.checked),children:(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Remove the saved OAuth app on save (the server goes back to dynamic client registration)"})}),(0,t.jsx)(eR.Button,{onClick:s.startOAuthFlow,disabled:"authorizing"===s.status||"exchanging"===s.status,children:c}),s.error&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:s.error}),"success"===s.status&&s.tokenResponse?.access_token&&(0,t.jsx)("p",{className:"text-sm text-green-600",children:"Token held for this browser session. Tools can now be previewed and configured; the token was not saved to LiteLLM."})]})}let eD="rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",eV=({label:e,tooltip:s})=>(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[e,(0,t.jsx)(ev.Tooltip,{title:s,children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),eB=({isEditing:e=!1})=>{let s=e?" (leave blank to keep existing)":"";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:"Profile",tooltip:"Token-exchange wire dialect. RFC 8693 is the standard token-exchange grant. Microsoft Entra OBO uses Entra's On-Behalf-Of dialect (the RFC 7523 jwt-bearer grant with requested_token_use=on_behalf_of) and carries the target resource in a scope like api:///.default."}),name:"token_exchange_profile",...e?{}:{initialValue:"rfc8693"},children:(0,t.jsxs)(eb.Select,{className:"rounded-lg",size:"large",children:[(0,t.jsx)(eb.Select.Option,{value:"rfc8693",children:(0,t.jsx)("span",{className:"font-medium",children:"RFC 8693 (standard)"})}),(0,t.jsx)(eb.Select.Option,{value:"entra_obo",children:(0,t.jsx)("span",{className:"font-medium",children:"Microsoft Entra OBO"})})]})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:"Token Exchange Endpoint (optional)",tooltip:"RFC 8693 token endpoint. The proxy exchanges the user's incoming token here for a scoped token used to call the upstream MCP server. Leave blank to auto-discover it from the upstream's protected-resource metadata (RFC 9728 then RFC 8414)."}),name:"token_exchange_endpoint",children:(0,t.jsx)(W.Input,{placeholder:"https://idp.example.com/oauth2/token",className:eD})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:"Client ID",tooltip:"OAuth2 client ID used to authenticate to the token exchange endpoint."}),name:["credentials","client_id"],rules:[{required:!e,message:"Client ID is required for token exchange"}],children:(0,t.jsx)(W.Input.Password,{placeholder:`Enter OAuth client ID${s}`,className:eD})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:"Client Secret",tooltip:"OAuth2 client secret used to authenticate to the token exchange endpoint."}),name:["credentials","client_secret"],rules:[{required:!e,message:"Client Secret is required for token exchange"}],children:(0,t.jsx)(W.Input.Password,{placeholder:`Enter OAuth client secret${s}`,className:eD})}),(0,t.jsx)($.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.token_exchange_profile!==t.token_exchange_profile,children:({getFieldValue:e})=>{let s="entra_obo"===e("token_exchange_profile");return(0,t.jsxs)(t.Fragment,{children:[!s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:"Audience (optional)",tooltip:"Target audience for the exchanged token (RFC 8693 audience). Identifies the upstream MCP server the token is for."}),name:"audience",children:(0,t.jsx)(W.Input,{placeholder:"https://upstream.example.com",className:eD})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:"Subject Token Type (optional)",tooltip:"Type of the user's incoming token (RFC 8693 subject_token_type). Defaults to urn:ietf:params:oauth:token-type:access_token."}),name:"subject_token_type",children:(0,t.jsx)(W.Input,{placeholder:"urn:ietf:params:oauth:token-type:access_token",className:eD})})]}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(eV,{label:s?"Scopes":"Scopes (optional)",tooltip:s?"Microsoft Entra OBO carries the target resource in the scope, so at least one is required (e.g. api:///.default).":"Optional scopes to request during the token exchange."}),name:["credentials","scopes"],rules:s?[{required:!0,message:"Microsoft Entra OBO requires a scope, e.g. api:///.default"}]:[],children:(0,t.jsx)(eb.Select,{mode:"tags",tokenSeparators:[","],placeholder:s?"api:///.default":"Add scopes",className:"rounded-lg",size:"large"})})]})}})]})},eq="rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",e$=({label:e,tooltip:s})=>(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[e,(0,t.jsx)(ev.Tooltip,{title:s,children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),eW=({isEditing:e=!1})=>{let s=e?" (leave blank to keep existing)":"";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Org Token Endpoint (leg 1)",tooltip:"Your IdP org authorization server's token endpoint. LiteLLM exchanges the user's identity assertion here for an ID-JAG assertion (RFC 8693 with requested_token_type=urn:ietf:params:oauth:token-type:id-jag)."}),name:"token_exchange_endpoint",rules:[{required:!e,message:"The org token endpoint is required for ID-JAG"}],children:(0,t.jsx)(W.Input,{placeholder:"https://your-org.okta.com/oauth2/v1/token",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Resource Token Endpoint (leg 2)",tooltip:"The upstream resource authorization server's token endpoint. LiteLLM posts the ID-JAG assertion here as an RFC 7523 jwt-bearer grant to get the access token the MCP server accepts."}),name:["credentials","id_jag_resource_token_endpoint"],rules:[{required:!e,message:"The resource token endpoint is required for ID-JAG"}],children:(0,t.jsx)(W.Input,{placeholder:"https://upstream.example.com/oauth2/token",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Client ID",tooltip:"OAuth2 client ID LiteLLM authenticates as on both legs."}),name:["credentials","client_id"],rules:[{required:!e,message:"Client ID is required for ID-JAG"}],children:(0,t.jsx)(W.Input.Password,{placeholder:`Enter OAuth client ID${s}`,className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Client Secret",tooltip:"Authenticates LiteLLM as the OAuth client via client_secret_post. Leave blank when using a private key instead; a private key takes precedence over this secret."}),name:["credentials","client_secret"],dependencies:[["credentials","client_private_key"]],rules:[({getFieldValue:t})=>({validator:(s,r)=>e||r||t(["credentials","client_private_key"])?Promise.resolve():Promise.reject(Error("Provide either a client secret or a client private key"))})],children:(0,t.jsx)(W.Input.Password,{placeholder:`Enter OAuth client secret${s}`,className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Client Private Key (PEM)",tooltip:"PEM private key signing the RFC 7523 private_key_jwt client assertion. Okta Cross App Access normally requires this. When set it takes precedence over the client secret."}),name:["credentials","client_private_key"],children:(0,t.jsx)(W.Input.TextArea,{rows:3,placeholder:`-----BEGIN PRIVATE KEY-----${s}`,className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Private Key ID (optional)",tooltip:"The kid advertised in the client assertion JWT header, so the IdP can select the right registered key."}),name:["credentials","client_private_key_id"],children:(0,t.jsx)(W.Input,{placeholder:"my-signing-key-1",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Client Assertion Signing Algorithm (optional)",tooltip:"Algorithm signing the client assertion JWT. Defaults to RS256."}),name:["credentials","client_assertion_signing_alg"],children:(0,t.jsx)(W.Input,{placeholder:"RS256",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Audience (optional)",tooltip:"RFC 8693 audience sent on leg 1, identifying the upstream the ID-JAG assertion is minted for."}),name:"audience",children:(0,t.jsx)(W.Input,{placeholder:"https://upstream.example.com",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Resource Indicator (optional)",tooltip:"RFC 8707 resource indicator sent on leg 1. Separate from Audience, which is the RFC 8693 parameter."}),name:["credentials","id_jag_resource"],children:(0,t.jsx)(W.Input,{placeholder:"https://upstream.example.com/mcp",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Subject Token Type (optional)",tooltip:"Type of the identity assertion exchanged on leg 1. Defaults to urn:ietf:params:oauth:token-type:id_token."}),name:"subject_token_type",children:(0,t.jsx)(W.Input,{placeholder:"urn:ietf:params:oauth:token-type:id_token",className:eq})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)(e$,{label:"Scopes (optional)",tooltip:"Scopes requested on leg 1 of the exchange."}),name:["credentials","scopes"],children:(0,t.jsx)(eb.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})})]})};var eK=e.i(952571),eG=e.i(849550),eG=eG,eY=e.i(195116),eJ=e.i(515288),eQ=e.i(204258);let eZ=({value:e,placeholder:s,disabled:r,className:l,onChange:a})=>{let[n,i]=(0,p.useState)(null),c=n??(null==e?"":e.toFixed(4));return(0,t.jsxs)(o.InputGroup,{className:l,children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(o.InputGroupText,{children:"$"})}),(0,t.jsx)(o.InputGroupInput,{type:"text",inputMode:"decimal",placeholder:s,disabled:r,value:c,onFocus:()=>i(null==e?"":String(e)),onBlur:()=>i(null),onChange:e=>{var t;let s;return i(t=e.target.value),s=Number(t),void a(""===t.trim()||Number.isNaN(s)?null:s)}})]})},eX=({value:e={},onChange:s,tools:r=[],disabled:l=!1})=>(0,t.jsx)(u.TooltipProvider,{children:(0,t.jsx)(eJ.Card,{className:"p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,t.jsx)(eG.default,{className:"size-4 text-muted-foreground"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Cost Configuration"}),(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)(eK.Info,{className:"size-4 text-muted-foreground","aria-label":"About cost configuration"})}),(0,t.jsx)(u.TooltipContent,{children:"Configure costs for this MCP server's tool calls. Set a default rate and per-tool overrides."})]})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mb-2 block text-sm font-medium",children:["Default Cost per Query ($)",(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)(eK.Info,{className:"ml-1 inline size-4 text-muted-foreground","aria-label":"About the default cost"})}),(0,t.jsx)(u.TooltipContent,{children:"Default cost charged for each tool call to this server."})]})]}),(0,t.jsx)(eZ,{value:e.default_cost_per_query,placeholder:"0.0000",disabled:l,className:"w-50",onChange:t=>{let r={...e,default_cost_per_query:t};s?.(r)}}),(0,t.jsx)("p",{className:"mt-1 block text-sm text-muted-foreground",children:"Set a default cost for all tool calls to this server"})]}),r.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Tool-Specific Costs ($)",(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)(eK.Info,{className:"ml-1 inline size-4 text-muted-foreground","aria-label":"About per-tool costs"})}),(0,t.jsx)(u.TooltipContent,{children:"Override the default cost for specific tools. Leave blank to use the default rate."})]})]}),(0,t.jsxs)(eQ.Collapsible,{className:"rounded-lg border border-border",children:[(0,t.jsx)(eQ.CollapsibleTrigger,{render:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 p-3 text-left",children:[(0,t.jsx)(eY.Wrench,{className:"size-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium",children:"Available Tools"}),(0,t.jsx)(n.Badge,{variant:"secondary",children:r.length})]})}),(0,t.jsx)(eQ.CollapsibleContent,{children:(0,t.jsx)("div",{className:"max-h-64 space-y-3 overflow-y-auto p-3",children:r.map((r,a)=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg bg-muted p-3",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:r.name}),r.description&&(0,t.jsx)("p",{className:"mt-1 block text-sm text-muted-foreground",children:r.description})]}),(0,t.jsx)("div",{className:"ml-4",children:(0,t.jsx)(eZ,{value:e.tool_name_to_cost_per_query?.[r.name],placeholder:"Use default",disabled:l,className:"w-40",onChange:t=>{var l;let a;return l=r.name,a={...e,tool_name_to_cost_per_query:{...e.tool_name_to_cost_per_query,[l]:t}},void s?.(a)}})})]},a))})})]})]})]}),(e.default_cost_per_query||e.tool_name_to_cost_per_query&&Object.keys(e.tool_name_to_cost_per_query).length>0)&&(0,t.jsxs)("div",{className:"mt-6 rounded-lg border border-border bg-muted p-4",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[e.default_cost_per_query&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["• Default cost: $",e.default_cost_per_query.toFixed(4)," per query"]}),e.tool_name_to_cost_per_query&&Object.entries(e.tool_name_to_cost_per_query).map(([e,s])=>null!=s&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["• ",e,": $",s.toFixed(4)," per query"]},e))]})]})]})})});var e0=e.i(101048),e2=e.i(707621),e1=e.i(16715);let e4=({formValues:e,tools:s,isLoadingTools:r,toolsError:l,toolsErrorStatus:a=null,toolsErrorStackTrace:n,canFetchTools:o,fetchTools:c})=>{let d=403===a;return o||e.url||e.spec_path?(0,t.jsx)(eJ.Card,{className:"p-6",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e0.CircleCheck,{className:"size-4 text-muted-foreground"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Connection Status"})]}),!o&&(e.url||e.spec_path)&&(0,t.jsxs)("div",{className:"rounded-lg border border-dashed py-6 text-center text-muted-foreground",children:[(0,t.jsx)(eY.Wrench,{className:"mx-auto mb-2 size-6"}),(0,t.jsx)("p",{className:"text-sm",children:"Complete required fields to test connection"}),(0,t.jsx)("p",{className:"text-sm",children:"Fill in URL, Transport, and Authentication to test MCP server connection"})]}),o&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:r?"Testing connection to MCP server...":s.length>0?"Connection successful":l?d?"Ready to submit":"Connection failed":"Ready to test connection"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Server: ",e.url||e.spec_path]})]}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(m.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("p",{className:"text-sm",children:"Connecting..."})]}),!r&&!l&&s.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(e0.CircleCheck,{className:"size-4"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Connected"})]}),l&&!d&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-destructive",children:[(0,t.jsx)(e2.CircleAlert,{className:"size-4"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Failed"})]})]}),r&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 py-6",children:[(0,t.jsx)(m.UiLoadingSpinner,{className:"size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm",children:"Testing connection and loading tools..."})]}),l&&d&&(0,t.jsxs)(eE.Alert,{children:[(0,t.jsx)(eK.Info,{}),(0,t.jsx)(eE.AlertTitle,{children:"Tool preview unavailable"}),(0,t.jsx)(eE.AlertDescription,{children:l})]}),l&&!d&&(0,t.jsxs)(eE.Alert,{variant:"destructive",children:[(0,t.jsx)(e2.CircleAlert,{}),(0,t.jsx)(eE.AlertTitle,{children:"Connection Failed"}),(0,t.jsxs)(eE.AlertDescription,{children:[(0,t.jsx)("div",{children:l}),n&&(0,t.jsxs)(eQ.Collapsible,{className:"mt-3",children:[(0,t.jsx)(eQ.CollapsibleTrigger,{render:(0,t.jsx)(i.Button,{variant:"link",size:"sm",className:"h-auto p-0",children:"Stack Trace"})}),(0,t.jsx)(eQ.CollapsibleContent,{children:(0,t.jsx)("pre",{className:"mt-2 max-h-100 overflow-auto rounded-sm bg-muted p-2 font-mono text-xs break-words whitespace-pre-wrap",children:n})})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:c,children:[(0,t.jsx)(e1.RefreshCw,{}),"Retry"]})})]}),!r&&0===s.length&&!l&&(0,t.jsxs)("div",{className:"rounded-lg border border-dashed py-6 text-center",children:[(0,t.jsx)(e0.CircleCheck,{className:"mx-auto mb-2 size-6"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Connection successful!"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No tools found for this MCP server"})]})]})]})}):null};var e5=e.i(257428),e3=e.i(793479),e6=e.i(624687),e7=e.i(531516);let e8=e=>{try{let t=e.indexOf("/mcp/");if(-1===t)return{token:null,baseUrl:e};let s=e.split("/mcp/");if(2!==s.length)return{token:null,baseUrl:e};let r=s[0]+"/mcp/",l=s[1];if(!l)return{token:null,baseUrl:e};return{token:l,baseUrl:r}}catch(t){return console.error("Error parsing MCP URL:",t),{token:null,baseUrl:e}}},e9=e=>{let{token:t}=e8(e);return{maskedUrl:(e=>{let{token:t,baseUrl:s}=e8(e);return t?s+"...":e})(e),hasToken:!!t}},te=e=>e?/^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(e)?Promise.resolve():Promise.reject("Please enter a valid URL (e.g., http://service-name.domain:1234/path or https://example.com)"):Promise.resolve(),tt=e=>e&&(e.includes("-")||e.includes(" "))?Promise.reject("Cannot contain '-' (hyphen) or spaces. Please use '_' (underscore) instead."):Promise.resolve(),ts=/^[a-zA-Z0-9_-]+$/,tr=e=>{if(!Array.isArray(e))return[];let t=new Set,s=[];for(let r of e){if(!r||"object"!=typeof r)continue;let e=String(r.name??"").trim();if(!e||t.has(e)||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))continue;let l="user"===r.scope?"user":"global";s.push({name:e,value:"user"===l?"":String(r.value??""),scope:l,description:r.description||void 0}),t.add(e)}return s},tl=e=>{if(!e)return{};if("string"==typeof e){try{let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return{}}return e},ta=({tool:e,isEnabled:s,isEditExpanded:r,toolNameToDisplayName:l,toolNameToDescription:a,onToggle:o,onToggleExpand:c,onDisplayNameChange:d,onDescriptionChange:u})=>{let m=l[e.name]||"",h=""!==m&&!ts.test(m);return(0,t.jsxs)("div",{className:(0,ec.cn)("rounded-lg border transition-colors",s?"border-primary/40 bg-accent":"border-border bg-muted"),children:[(0,t.jsx)("div",{className:"cursor-pointer p-4",onClick:()=>o(e.name),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(e5.Checkbox,{checked:s,onCheckedChange:()=>o(e.name)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:l[e.name]||e.name}),(0,t.jsx)(n.Badge,{variant:s?"secondary":"outline",children:s?"Enabled":"Disabled"}),l[e.name]&&(0,t.jsx)(n.Badge,{variant:"secondary",children:"Custom name"})]}),(a[e.name]||e.description)&&(0,t.jsx)("p",{className:"mt-1 block text-sm text-muted-foreground",children:a[e.name]||e.description}),(0,t.jsx)("p",{className:"mt-1 block text-xs text-muted-foreground",children:s?"✓ Users can call this tool":"✗ Users cannot call this tool"})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm",onClick:t=>c(e.name,t),title:"Edit display name and description",children:(0,t.jsx)(es.Pencil,{})})]})}),r&&(0,t.jsxs)("div",{className:"space-y-3 rounded-b-lg border-t border-border bg-muted px-4 pt-3 pb-4",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 block text-xs font-medium",children:"Display Name"}),(0,t.jsx)(e3.Input,{placeholder:e.name,value:l[e.name]||"",onChange:t=>d(e.name,t.target.value),"aria-invalid":h||void 0}),h?(0,t.jsx)("p",{className:"mt-1 block text-xs text-destructive",children:"Only letters, digits, underscores, and hyphens are allowed (no spaces)."}):(0,t.jsx)("p",{className:"mt-1 block text-xs text-muted-foreground",children:"Override how this tool's name appears to users. Leave blank to use original."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 block text-xs font-medium",children:"Description"}),(0,t.jsx)(e6.Textarea,{className:"field-sizing-fixed",placeholder:e.description||"No description",value:a[e.name]||"",onChange:t=>u(e.name,t.target.value),rows:2}),(0,t.jsx)("p",{className:"mt-1 block text-xs text-muted-foreground",children:"Override the tool description shown to users. Leave blank to use original."})]})]})]})},tn=({accessToken:e,formValues:s,allowedTools:r,existingAllowedTools:l,onAllowedToolsChange:c,toolNameToDisplayName:d,toolNameToDescription:u,onToolNameToDisplayNameChange:h,onToolNameToDescriptionChange:x,hasToolAllowlistInteraction:g=!1,onToolAllowlistInteraction:f,keyTools:j,externalTools:v,externalIsLoading:b,externalError:y,externalErrorStatus:_=null,externalCanFetch:N,isEditMode:w=!1})=>{let k=(0,p.useRef)([]),[C,T]=(0,p.useState)(""),[S,A]=(0,p.useState)("crud"),I=(0,p.useRef)(!1),O=(0,p.useRef)(""),[P,M]=(0,p.useState)(new Set),F=403===_,E=v??[],L=b??!1,R=y??null,U=N??!1,z=(0,p.useMemo)(()=>{if(!j||0===j.length||0===E.length)return[];let e=new Set,t=[];for(let s of j){let r=s.name.split("_").map(e=>e.toLowerCase()).filter(e=>e.length>1);if(0===r.length)continue;let l=e=>e.toLowerCase().replace(/[-_/]/g," "),a=E.find(t=>{if(e.has(t.name))return!1;let s=l(t.name);return r.every(e=>s.includes(e))});if(!a){let t=r.find(e=>e.length>3)??r[r.length-1];a=E.find(s=>!e.has(s.name)&&l(s.name).includes(t))}a&&(t.push(a),e.add(a.name))}return t},[j,E]),H=(0,p.useMemo)(()=>new Set(z.map(e=>e.name)),[z]),D=(0,p.useMemo)(()=>E.filter(e=>{let t=C.toLowerCase();return e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)}),[E,C]),V=(0,p.useMemo)(()=>D.filter(e=>H.has(e.name)),[D,H]),B=(0,p.useMemo)(()=>D.filter(e=>!H.has(e.name)),[D,H]);(0,p.useEffect)(()=>{let e=E.map(e=>e.name).sort().join(","),t=k.current.map(e=>e.name).sort().join(","),s=z.map(e=>e.name).sort().join(",");if(s!==O.current&&(O.current=s,""!==s&&(I.current=!1)),E.length>0&&e!==t){let e=E.map(e=>e.name);I.current?c(r.filter(t=>e.includes(t))):(I.current=!0,null!==l?c(l.filter(t=>e.includes(t))):w?c(g?r.filter(t=>e.includes(t)):[]):z.length>0?c(z.map(e=>e.name).filter(t=>e.includes(t))):c(e))}k.current=E},[E,r,l,c,z,g,w]);let q=w&&null===l&&0===r.length&&!g,$=(0,p.useMemo)(()=>q?E.map(e=>e.name):r,[r,q,E]),W=(0,p.useMemo)(()=>new Set($),[$]),K=e=>{f?.(),c(e)},G=e=>{W.has(e)?K($.filter(t=>t!==e)):K([...$,e])},Y=(e,t)=>{t.stopPropagation(),M(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},J=(e,t)=>{let s={...d};t?s[e]=t:delete s[e],h(s)},Q=(e,t)=>{let s={...u};t?s[e]=t:delete s[e],x(s)};return U||s.url||s.spec_path?(0,t.jsx)(eJ.Card,{className:"p-6",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eY.Wrench,{className:"size-4 text-muted-foreground"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Tool Configuration"}),E.length>0&&(0,t.jsx)(n.Badge,{variant:"secondary",children:E.length})]}),E.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(i.Button,{size:"sm",variant:"crud"===S?"default":"outline",onClick:()=>A("crud"),children:"Risk Groups"}),(0,t.jsx)(i.Button,{size:"sm",variant:"flat"===S?"default":"outline",onClick:()=>A("flat"),children:"Flat List"})]})]}),(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted p-3",children:(0,t.jsxs)("p",{className:"text-sm",children:[(0,t.jsx)("strong",{children:"Select which tools users can call:"})," Only checked tools will be available for users to invoke. Unchecked tools will be blocked from execution."]})}),L&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 py-6",children:[(0,t.jsx)(m.UiLoadingSpinner,{className:"size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm",children:"Loading tools from spec..."})]}),R&&!L&&F&&(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted p-4",children:(0,t.jsx)("p",{className:"text-sm",children:R})}),R&&!L&&!F&&(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-destructive/40 bg-destructive/5 py-6 text-center",children:[(0,t.jsx)(eY.Wrench,{className:"mx-auto mb-2 size-6 text-destructive"}),(0,t.jsx)("p",{className:"text-sm font-medium text-destructive",children:"Unable to load tools"}),(0,t.jsx)("p",{className:"text-sm text-destructive",children:R})]}),!L&&!R&&0===E.length&&U&&(j&&j.length>0?(0,t.jsxs)("div",{className:"rounded-lg border border-dashed py-4 text-center text-muted-foreground",children:[(0,t.jsx)(eY.Wrench,{className:"mx-auto mb-2 size-6"}),(0,t.jsx)("p",{className:"text-sm",children:"No tools loaded from spec"}),(0,t.jsxs)("p",{className:"mt-1 block text-sm",children:["Expected tools: ",j.map(e=>e.name).join(", ")]})]}):(0,t.jsxs)("div",{className:"rounded-lg border border-dashed py-6 text-center text-muted-foreground",children:[(0,t.jsx)(eY.Wrench,{className:"mx-auto mb-2 size-6"}),(0,t.jsx)("p",{className:"text-sm",children:"No tools available for configuration"}),(0,t.jsx)("p",{className:"text-sm",children:"Connect to an MCP server with tools to configure them"})]})),!U&&(s.url||s.spec_path)&&(0,t.jsxs)("div",{className:"rounded-lg border border-dashed py-6 text-center text-muted-foreground",children:[(0,t.jsx)(eY.Wrench,{className:"mx-auto mb-2 size-6"}),(0,t.jsx)("p",{className:"text-sm",children:"Complete required fields to configure tools"}),(0,t.jsx)("p",{className:"text-sm",children:"Fill in URL, Transport, and Authentication to load available tools"})]}),!L&&!R&&E.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted p-3",children:[(0,t.jsx)(e0.CircleCheck,{className:"size-4"}),(0,t.jsxs)("p",{className:"text-sm font-medium",children:[$.length," of ",E.length," ",1===E.length?"tool":"tools"," enabled for user access"]})]}),(0,t.jsxs)(o.InputGroup,{className:"w-full",children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(a.Search,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(o.InputGroupInput,{placeholder:"Search tools by name or description...",value:C,onChange:e=>T(e.target.value)})]}),"crud"===S&&(0,t.jsx)(e7.default,{tools:E,searchFilter:C,value:q?void 0:r,onChange:K}),"flat"===S&&(0,t.jsx)(t.Fragment,{children:0===D.length?(0,t.jsxs)("div",{className:"rounded-lg border border-dashed py-6 text-center text-muted-foreground",children:[(0,t.jsx)(a.Search,{className:"mx-auto mb-2 size-6"}),(0,t.jsxs)("p",{className:"text-sm",children:['No tools found matching "',C,'"']})]}):(0,t.jsxs)("div",{className:"space-y-2",children:[V.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-1",children:[(0,t.jsx)("p",{className:"text-xs font-semibold tracking-wide text-muted-foreground uppercase",children:"Suggested tools"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:()=>{let e=z.map(e=>e.name).filter(e=>!W.has(e));0!==e.length&&K([...$,...e])},children:"Enable all"}),(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:()=>{K($.filter(e=>!H.has(e)))},children:"Disable all"})]})]}),V.map(e=>(0,t.jsx)(ta,{tool:e,isEnabled:W.has(e.name),isEditExpanded:P.has(e.name),toolNameToDisplayName:d,toolNameToDescription:u,onToggle:G,onToggleExpand:Y,onDisplayNameChange:J,onDescriptionChange:Q},e.name))]}),B.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-1 pt-2",children:[(0,t.jsx)("p",{className:"text-xs font-semibold tracking-wide text-muted-foreground uppercase",children:V.length>0?"All tools":"Tools"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:()=>{let e=E.filter(e=>!H.has(e.name)).map(e=>e.name).filter(e=>!W.has(e));0!==e.length&&K([...$,...e])},children:"Enable all"}),(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:()=>{K($.filter(e=>H.has(e)))},children:"Disable all"})]})]}),B.map(e=>(0,t.jsx)(ta,{tool:e,isEnabled:W.has(e.name),isEditExpanded:P.has(e.name),toolNameToDisplayName:d,toolNameToDescription:u,onToggle:G,onToggleExpand:Y,onDisplayNameChange:J,onDescriptionChange:Q},e.name))]})]})})]})]})}):null},ti=({isVisible:e,required:s=!0})=>e?(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Stdio Configuration (JSON)",(0,t.jsx)(ev.Tooltip,{title:"Paste your stdio MCP server configuration in JSON format. You can use the full mcpServers structure from config.yaml or just the inner server configuration.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"stdio_config",rules:[...s?[{required:!0,message:"Please enter stdio configuration"}]:[],{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Please enter valid JSON")}}}],children:(0,t.jsx)(W.Input.TextArea,{placeholder:`{
+ "mcpServers": {
+ "circleci-mcp-server": {
+ "command": "npx",
+ "args": ["-y", "@circleci/mcp-server-circleci"],
+ "env": {
+ "CIRCLECI_TOKEN": "your-circleci-token",
+ "CIRCLECI_BASE_URL": "https://circleci.com"
+ }
+ }
+ }
+}`,rows:12,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm"})}):null;var to=e.i(560445),tc=e.i(770914),td=e.i(564897),tu=e.i(646563);let{Panel:tm}=eN.Collapse,th=({availableAccessGroups:e,mcpServer:s,searchValue:r,setSearchValue:l,getAccessGroupOptions:a})=>{let n=$.Form.useFormInstance(),i=$.Form.useWatch("auth_type",n),o=i===eT.AUTH_TYPE.OAUTH2,c=i===eT.AUTH_TYPE.NONE||null==i,d=$.Form.useWatch("extra_headers",n),u=Array.isArray(d)&&d.some(e=>"string"==typeof e&&"authorization"===e.toLowerCase()),m=c&&u,h=$.Form.useWatch("delegate_auth_to_upstream",n),x=$.Form.useWatch("available_on_public_internet",n),g=o&&!0===h&&!1===x;return(0,p.useEffect)(()=>{if(s){if(s.static_headers){let e=Object.entries(s.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""}));n.setFieldValue("static_headers",e)}Array.isArray(s.env_vars)&&s.env_vars.length>0&&n.setFieldValue("env_vars",s.env_vars.map(e=>({name:e.name,value:e.value??"",scope:e.scope??"global",description:e.description??""}))),"boolean"==typeof s.allow_all_keys&&n.setFieldValue("allow_all_keys",s.allow_all_keys),"boolean"==typeof s.available_on_public_internet&&n.setFieldValue("available_on_public_internet",s.available_on_public_internet),"boolean"==typeof s.delegate_auth_to_upstream&&n.setFieldValue("delegate_auth_to_upstream",s.delegate_auth_to_upstream),"boolean"==typeof s.oauth_passthrough&&n.setFieldValue("oauth_passthrough",s.oauth_passthrough)}else n.setFieldValue("allow_all_keys",!1),n.setFieldValue("available_on_public_internet",!0),n.setFieldValue("delegate_auth_to_upstream",!1),n.setFieldValue("oauth_passthrough",!1)},[s,n]),(0,p.useEffect)(()=>{o||n.setFieldValue("delegate_auth_to_upstream",!1)},[o,n]),(0,p.useEffect)(()=>{m||n.setFieldValue("oauth_passthrough",!1)},[m,n]),(0,t.jsx)(eN.Collapse,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(tm,{header:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Permission Management / Access Control"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 ml-4",children:"Configure access permissions and security settings (Optional)"})]}),className:"border-0",forceRender:!0,children:(0,t.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Allow All LiteLLM Keys",(0,t.jsx)(ev.Tooltip,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:'Enable if this server should be "public" to all keys.'})]}),(0,t.jsx)($.Form.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:s?.allow_all_keys??!1,className:"mb-0",children:(0,t.jsx)(e_.Switch,{})})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Internal network only",(0,t.jsx)(ev.Tooltip,{title:"When on, only requests from within your internal network are accepted. Turn off to allow external clients (other clusters, ChatGPT, etc). API key authentication is always required regardless of this setting.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:"Turn on to restrict access to callers within your internal network only."})]}),(0,t.jsx)($.Form.Item,{name:"available_on_public_internet",valuePropName:"checked",getValueProps:e=>({checked:!e}),getValueFromEvent:e=>!e,initialValue:!0,className:"mb-0",children:(0,t.jsx)(e_.Switch,{})})]}),o&&(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Delegate auth to upstream (PKCE passthrough)",(0,t.jsx)(ev.Tooltip,{title:"When on, LiteLLM skips its own API key/SSO check for this server and lets the client complete PKCE directly with the upstream MCP server. Only honored when Auth Type is oauth2. No spend tracking or per-key rate limiting will run on this route.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:"Bypass LiteLLM auth so clients authenticate directly with the upstream OAuth MCP server."})]}),(0,t.jsx)($.Form.Item,{name:"delegate_auth_to_upstream",valuePropName:"checked",initialValue:s?.delegate_auth_to_upstream??!1,className:"mb-0",children:(0,t.jsx)(e_.Switch,{})})]}),m&&(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth pass-through",(0,t.jsx)(ev.Tooltip,{title:"When on, this server is treated as an OAuth pass-through: the gateway proxies the upstream /.well-known/oauth-protected-resource metadata, emits spec-compliant 401 challenges when no bearer is supplied, and propagates upstream 401/403 responses. Only honored when Auth Type is None and 'Authorization' is in Extra Headers.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:"Forward upstream OAuth discovery and 401 challenges so clients negotiate OAuth directly with the upstream MCP server."})]}),(0,t.jsx)($.Form.Item,{name:"oauth_passthrough",valuePropName:"checked",initialValue:s?.oauth_passthrough??!1,className:"mb-0",children:(0,t.jsx)(e_.Switch,{})})]}),g&&(0,t.jsx)(to.Alert,{type:"warning",showIcon:!0,className:"mb-2",message:"Internal server with upstream OAuth delegation",description:"This MCP server is configured as internal-only but delegates auth to upstream. Anonymous users will be able to reach the upstream OAuth2 /authorize flow without a LiteLLM session. Ensure your upstream provider and network enforce access controls."}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Access Groups",(0,t.jsx)(ev.Tooltip,{title:"Specify access groups for this MCP server. Users must be in at least one of these groups to access the server.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(eb.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"value",filterOption:(e,t)=>(t?.value??"").toLowerCase().includes(e.toLowerCase()),onSearch:e=>l(e),tokenSeparators:[","],options:a(),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(ev.Tooltip,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})}),s?.extra_headers&&s.extra_headers.length>0&&(0,t.jsxs)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-1 rounded-full",children:[s.extra_headers.length," configured"]})]}),name:"extra_headers",children:(0,t.jsx)(eb.Select,{mode:"tags",placeholder:s?.extra_headers&&s.extra_headers.length>0?`Currently: ${s.extra_headers.join(", ")}`:"Enter header names (e.g., Authorization, X-Custom-Header)",className:"rounded-lg",size:"large",tokenSeparators:[","],allowClear:!0})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(ev.Tooltip,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)($.Form.List,{name:"static_headers",children:(e,{add:s,remove:r})=>(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(tc.Space,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)($.Form.Item,{...l,name:[s,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(W.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)($.Form.Item,{...l,name:[s,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(W.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(td.MinusCircleOutlined,{onClick:()=>r(s),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},e)),(0,t.jsx)(eR.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(tu.PlusOutlined,{}),block:!0,children:"Add Static Header"})]})})})]})},"permissions")})},tx=({accessToken:e,selectedName:s,onSelect:r})=>{let[l,a]=(0,p.useState)([]),[n,i]=(0,p.useState)(!1),[o,c]=(0,p.useState)(new Set);return((0,p.useEffect)(()=>{e&&(i(!0),(0,b.fetchOpenAPIRegistry)(e).then(e=>a(e.apis??[])).catch(()=>a([])).finally(()=>i(!1)))},[e]),n)?(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Popular APIs"}),(0,t.jsx)("div",{className:"flex justify-center py-6",children:(0,t.jsx)(m.UiLoadingSpinner,{className:"size-5 text-muted-foreground"})})]}):0===l.length?null:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"mb-2 block text-sm font-medium",children:"Popular APIs"}),(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:l.map(e=>{let l=s===e.name,a=o.has(e.name);return(0,t.jsxs)("button",{type:"button",title:e.description,onClick:()=>r(e),className:(0,ec.cn)("flex cursor-pointer flex-col items-center gap-1.5 rounded-lg border p-3 transition-all",l?"border-primary bg-accent shadow-xs":"border-border hover:bg-accent"),children:[a?(0,t.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-muted text-sm font-bold text-muted-foreground",children:e.title.charAt(0)}):(0,t.jsx)("img",{src:e.icon_url,alt:e.title,className:"h-7 w-7 object-contain",onError:()=>{var t;return t=e.name,void c(e=>new Set(e).add(t))}}),(0,t.jsx)("span",{className:"text-center text-xs leading-tight font-medium text-muted-foreground",children:e.title})]},e.name)})}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Select an API to pre-fill the spec URL and OAuth 2.0 settings, or enter your own spec URL below."})]})},tp=({form:e,accessToken:s,onValuesChange:r,onKeyToolsChange:l,onLogoUrlChange:a,onOAuthDocsUrlChange:n})=>{let[i,o]=(0,p.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tx,{accessToken:s,selectedName:i,onSelect:t=>{o(t.name),l?.(t.key_tools??[]),a?.(t.icon_url||void 0);let s={spec_path:t.spec_url};t.oauth?(s.auth_type=eT.AUTH_TYPE.OAUTH2,s.oauth_flow_type=eT.OAUTH_FLOW.INTERACTIVE,s.authorization_url=t.oauth.authorization_url,s.token_url=t.oauth.token_url,e.setFieldsValue(s),n?.(t.oauth.docs_url??null)):(e.resetFields(["auth_type","authorization_url","token_url"]),e.setFieldsValue(s),n?.(null)),r(s)}}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OpenAPI Spec URL",(0,t.jsx)(ev.Tooltip,{title:"URL to an OpenAPI specification (JSON or YAML). MCP tools will be automatically generated from the API endpoints defined in the spec.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"spec_path",rules:[{required:!0,message:"Please enter an OpenAPI spec URL"}],children:(0,t.jsx)(W.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>{o(null),l?.([]),n?.(null)}})})]})};var tg=e.i(221345),tf=e.i(174553);let tj={src:e.i(703330).default,width:16,height:16,blurWidth:0,blurHeight:0},tv={src:e.i(924056).default,width:24,height:24,blurWidth:0,blurHeight:0},tb={src:e.i(806471).default,width:24,height:24,blurWidth:0,blurHeight:0},ty={src:e.i(67456).default,width:24,height:24,blurWidth:0,blurHeight:0},t_={src:e.i(459465).default,width:24,height:24,blurWidth:0,blurHeight:0},tN={src:e.i(283873).default,width:24,height:24,blurWidth:0,blurHeight:0},tw={src:e.i(88313).default,width:24,height:24,blurWidth:0,blurHeight:0},tk={src:e.i(243999).default,width:24,height:24,blurWidth:0,blurHeight:0},tC={src:e.i(798962).default,width:24,height:24,blurWidth:0,blurHeight:0},tT={src:e.i(762217).default,width:24,height:24,blurWidth:0,blurHeight:0},tS={src:e.i(758618).default,width:24,height:24,blurWidth:0,blurHeight:0},tA={src:e.i(333191).default,width:24,height:24,blurWidth:0,blurHeight:0},tI={src:e.i(675865).default,width:24,height:24,blurWidth:0,blurHeight:0};var tO=e.i(9774);let tP={src:e.i(301873).default,width:24,height:24,blurWidth:0,blurHeight:0};var tM=e.i(284629),tF=e.i(247044);let tE={src:e.i(72982).default,width:24,height:24,blurWidth:0,blurHeight:0};var tL=e.i(336712);let tR={src:e.i(521442).default,width:24,height:24,blurWidth:0,blurHeight:0},tU="/ui/assets/logos/",tz=[{name:"GitHub",url:`${tU}github.svg`,src:tj.src},{name:"Slack",url:`${tU}slack.svg`,src:tv.src},{name:"Notion",url:`${tU}notion.svg`,src:tb.src},{name:"Linear",url:`${tU}linear.svg`,src:ty.src},{name:"Jira",url:`${tU}jira.svg`,src:t_.src},{name:"Figma",url:`${tU}figma.svg`,src:tN.src},{name:"Gmail",url:`${tU}gmail.svg`,src:tw.src},{name:"Google Drive",url:`${tU}google_drive.svg`,src:tk.src},{name:"Stripe",url:`${tU}stripe.svg`,src:tC.src},{name:"Shopify",url:`${tU}shopify.svg`,src:tT.src},{name:"Salesforce",url:`${tU}salesforce.svg`,src:tS.src},{name:"HubSpot",url:`${tU}hubspot.svg`,src:tA.src},{name:"Twilio",url:`${tU}twilio.svg`,src:tI.src},{name:"Cloudflare",url:`${tU}cloudflare.svg`,src:tO.default.src},{name:"Sentry",url:`${tU}sentry.svg`,src:tP.src},{name:"PostgreSQL",url:`${tU}postgresql.svg`,src:tM.default.src},{name:"Snowflake",url:`${tU}snowflake.svg`,src:tF.default.src},{name:"Zapier",url:`${tU}zapier.svg`,src:tE.src},{name:"Google",url:`${tU}google.svg`,src:tL.default.src},{name:"GitLab",url:`${tU}gitlab.svg`,src:tR.src}],tH=({value:e,onChange:s})=>{let r=tz.find(t=>t.url===e);return(0,t.jsx)(u.TooltipProvider,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Logo"}),(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)(eK.Info,{className:"size-4 cursor-help text-muted-foreground","aria-label":"About the logo"})}),(0,t.jsx)(u.TooltipContent,{children:"Select a well-known logo or paste a URL to any image. The logo is shown on the admin and chat pages."})]})]}),e&&(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-3 rounded-lg border border-border bg-muted p-3",children:[(0,t.jsx)(tf.Logo,{src:r?.src??e,label:"Selected",className:"h-10 w-10 rounded-sm object-contain"}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:e})}),(0,t.jsx)("button",{type:"button",onClick:()=>s?.(void 0),className:"cursor-pointer border-none bg-transparent text-xs text-muted-foreground hover:text-destructive",children:"✕"})]}),(0,t.jsx)("div",{className:"mb-3 grid grid-cols-10 gap-1.5",children:tz.map(r=>{let l=e===r.url;return(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=r.url,void s?.(e===t?void 0:t)},className:(0,ec.cn)("flex size-10 cursor-pointer items-center justify-center rounded-lg border p-2 transition-all",l?"border-primary bg-accent shadow-xs":"border-border hover:bg-accent"),children:(0,t.jsx)("img",{src:r.src,alt:r.name,className:"h-5 w-5 object-contain"})})}),(0,t.jsx)(u.TooltipContent,{children:r.name})]},r.name)})}),(0,t.jsxs)(o.InputGroup,{children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(tg.Link,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(o.InputGroupInput,{placeholder:"Or paste a custom logo URL...",value:e&&!r?e:"",onChange:e=>{let t=e.target.value.trim();s?.(t||void 0)}})]})]})})};var tD=e.i(898586);let{Text:tV}=tD.Typography,tB=[{value:"global",label:"Instance"},{value:"user",label:"Per-user"}],tq=({name:e,restField:s})=>"user"===$.Form.useWatch(["env_vars",e,"scope"])?(0,t.jsx)($.Form.Item,{...s,name:[e,"description"],className:"mb-0",children:(0,t.jsx)(W.Input,{addonBefore:(0,t.jsx)(ev.Tooltip,{title:"Per-user variables have no shared value. This text is only a hint shown to each user when they fill in their own value.",children:(0,t.jsxs)("span",{className:"text-xs text-gray-500 cursor-help whitespace-nowrap",children:[(0,t.jsx)(ew.InfoCircleOutlined,{className:"mr-1"}),"Hint"]})}),placeholder:"e.g. Your DB username",styles:{input:{color:"#9ca3af"}}})}):(0,t.jsx)($.Form.Item,{...s,name:[e,"value"],className:"mb-0",children:(0,t.jsx)(W.Input,{placeholder:"e.g. postgresql",className:"rounded-md font-mono"})}),t$=()=>(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tV,{strong:!0,className:"text-sm",children:"Variables"}),(0,t.jsx)(ev.Tooltip,{title:(0,t.jsxs)(t.Fragment,{children:["Define variables you can interpolate in Static Headers or Authentication using"," ",(0,t.jsx)("code",{children:"${VAR_NAME}"}),". ",(0,t.jsx)("br",{}),(0,t.jsx)("b",{children:"Instance"}),": admin-defined value used for every user.",(0,t.jsx)("br",{}),(0,t.jsx)("b",{children:"Per-user"}),": each user supplies their own value (e.g. personal credentials) via the MCP Gateway dashboard."]}),children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsxs)(tV,{className:"text-xs text-gray-600 block mb-3",children:["Reference these in Static Headers or Authentication as ",(0,t.jsx)("code",{children:"${VAR_NAME}"}),". For example:"," ",(0,t.jsx)("code",{className:"bg-white px-1 rounded-sm border border-gray-200",children:"${DB_PROTOCOL}://${CORP_USERNAME}:${CORP_PASSWORD}@${DB_HOSTNAME}"})]}),(0,t.jsx)($.Form.List,{name:"env_vars",children:(e,{add:s,remove:r})=>(0,t.jsxs)("div",{className:"space-y-2",children:[e.length>0&&(0,t.jsxs)("div",{className:"flex gap-3 px-1 text-xs font-medium text-gray-500 uppercase tracking-wide",children:[(0,t.jsx)("div",{style:{flex:1},children:"Variable Name"}),(0,t.jsx)("div",{style:{flex:1},children:"Value / Description"}),(0,t.jsx)("div",{style:{width:160},children:"Scope"}),(0,t.jsx)("div",{style:{width:24}})]}),e.map(({key:e,name:s,...l})=>(0,t.jsxs)("div",{className:"flex gap-3 items-start",children:[(0,t.jsx)($.Form.Item,{...l,name:[s,"name"],className:"mb-0",style:{flex:1},rules:[{required:!0,message:"Variable name is required"},{pattern:/^[A-Za-z_][A-Za-z0-9_]*$/,message:"Use letters, digits, underscores; cannot start with a digit."}],children:(0,t.jsx)(W.Input,{placeholder:"e.g. DB_PROTOCOL",className:"rounded-md font-mono"})}),(0,t.jsx)("div",{style:{flex:1},children:(0,t.jsx)(tq,{name:s,restField:l})}),(0,t.jsx)($.Form.Item,{...l,name:[s,"scope"],className:"mb-0",initialValue:"global",style:{width:160},children:(0,t.jsx)(eb.Select,{options:tB})}),(0,t.jsx)("div",{style:{width:24,height:32},className:"flex items-center justify-center",children:(0,t.jsx)(td.MinusCircleOutlined,{onClick:()=>r(s),className:"text-gray-500 hover:text-red-500 cursor-pointer"})})]},e)),(0,t.jsx)(eR.Button,{type:"dashed",onClick:()=>s({scope:"global"}),icon:(0,t.jsx)(tu.PlusOutlined,{}),block:!0,children:"Add Variable"})]})})]});var tW=e.i(122520),tK=e.i(165615),tG=e.i(434166);let tY=({accessToken:e,getCredentials:t,getTemporaryPayload:s,onTokenReceived:r,onBeforeRedirect:l,flowSource:a})=>{let[n,i]=(0,p.useState)("idle"),[o,c]=(0,p.useState)(null),[d,u]=(0,p.useState)(null),m=(0,p.useRef)(!1),h=(0,p.useRef)(0),x="litellm-mcp-oauth-flow-state",g="litellm-mcp-oauth-result",f="litellm-mcp-oauth-return-url",j=(e,t)=>{(0,tG.setSecureItem)(e,t)},v=e=>{try{return(0,tG.getSecureItem)(e)}catch(t){return console.warn(`Failed to get storage item ${e}`,t),null}},y=()=>{try{window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(g),window.sessionStorage.removeItem(f),window.localStorage.removeItem(x),window.localStorage.removeItem(g),window.localStorage.removeItem(f)}catch(e){console.warn("Failed to clear OAuth storage",e)}},_=()=>{let e,t,s;return s=((t=(e=window.location.pathname||"").indexOf("/ui"))>=0?e.slice(0,t+3):"").replace(/\/+$/,""),`${window.location.origin}${s}/mcp/oauth/callback`},w=(0,p.useCallback)(async()=>{let r=t()||{};if(!e){c("Missing admin token"),N.default.error("Access token missing. Please re-authenticate and try again.");return}let n=s();if(!n||!n.url||!n.transport){let e="Please complete server URL and transport before starting OAuth.";c(e),N.default.error(e);return}try{i("authorizing"),c(null);let t=await (0,b.cacheTemporaryMcpServer)(e,n),s=t?.server_id?.trim();if(!s)throw Error("Temporary MCP server identifier missing. Please retry.");let o={};if(!n.credentials?.client_id){let t=await (0,b.registerMcpOAuthClient)(e,s,{client_name:n.alias||n.server_name||s,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:n.credentials&&n.credentials.client_secret?"client_secret_post":"none",redirect_uris:[_()]});o={clientId:t?.client_id,clientSecret:t?.client_secret}}let d=(0,tK.generateCodeVerifier)(),u=await (0,tK.generateCodeChallenge)(d),m=crypto.randomUUID(),h=o.clientId||r.client_id,p=Array.isArray(r.scopes)?r.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,g=(0,b.buildMcpOAuthAuthorizeUrl)({serverId:s,clientId:h,redirectUri:_(),state:m,codeChallenge:u,scope:p}),v={state:m,codeVerifier:d,clientId:h,clientSecret:o.clientSecret||r.client_secret,serverId:s,redirectUri:_(),flowSource:a};if(l)try{l()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{j(x,JSON.stringify(v)),j(f,window.location.href)}catch(e){throw Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=g}catch(t){console.error("Failed to start OAuth flow",t),i("error");let e=(0,tW.extractErrorMessage)(t);c(e),N.default.error(e)}},[e,t,s,l]),k=(0,p.useCallback)(async()=>{if(m.current)return;let t=null,s=null;try{let e=v(g);if(!e)return;let r=v(x);if(!r)return;m.current=!0,t=JSON.parse(e),s=JSON.parse(r)}catch(e){y(),m.current=!1,c("Failed to resume OAuth flow. Please retry."),i("error"),N.default.error("Failed to resume OAuth flow. Please retry.");return}if(!t||s?.flowSource!==a){m.current=!1;return}try{window.sessionStorage.removeItem(g),window.localStorage.removeItem(g)}catch(e){}let l=h.current;try{if(!s||!s.state||!s.codeVerifier||!s.serverId)throw Error("OAuth session state was lost. This can happen if you have strict browser privacy settings. Please try again and ensure cookies/storage is enabled.");if(!t.state||t.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(t.error)throw Error(t.error_description||t.error);if(!t.code)throw Error("Authorization code missing in callback.");i("exchanging");let a=await (0,b.exchangeMcpOAuthToken)({serverId:s.serverId,code:t.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri,accessToken:e});if(l!==h.current)return;r(a,{clientId:s.clientId,clientSecret:s.clientSecret}),u(a),i("success"),c(null),N.default.success("OAuth token retrieved successfully")}catch(t){if(l!==h.current)return;let e=(0,tW.extractErrorMessage)(t);c(e),i("error"),N.default.error(e)}finally{l===h.current&&(y(),setTimeout(()=>{m.current=!1},1e3))}},[r]);return(0,p.useEffect)(()=>{k()},[k]),{startOAuthFlow:w,status:n,error:o,tokenResponse:d,reset:(0,p.useCallback)(()=>{h.current+=1,i("idle"),c(null),u(null),m.current=!1},[])}},tJ={src:e.i(756788).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAkklEQVR42lWOOwrEIBRF3XJWkJBAUiRlAtZauAt3oGhp5wIsLATF38wbMh/mFsq7B8576PGJ914pFUK4R3R/zrnrutZ1ZYzlnN8A2vM8p2ma53kYBkopMBRjJIRABWAcx33fj+MAISqlWGuXZQEPMHillL33l6rWyjnHGG/bJoSA9rccorUGZ2vt7ypISskY8wVPejadvQjN/QQAAAAASUVORK5CYII="}.src,tQ=[eT.AUTH_TYPE.API_KEY,eT.AUTH_TYPE.BEARER_TOKEN,eT.AUTH_TYPE.TOKEN,eT.AUTH_TYPE.BASIC],tZ=[...tQ,eT.AUTH_TYPE.OAUTH2,eT.AUTH_TYPE.OAUTH2_TOKEN_EXCHANGE,eT.AUTH_TYPE.OAUTH2_ID_JAG,eT.AUTH_TYPE.AWS_SIGV4,eT.AUTH_TYPE.TRUE_PASSTHROUGH,eT.AUTH_TYPE.OAUTH_DELEGATE],tX="litellm-mcp-oauth-create-state",t0=e=>Array.isArray(e)?e.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=(t?.value??"").trim()),e},{}):{},t2=({userID:e,userRole:r,accessToken:l,onCreateSuccess:a,isModalVisible:n,setModalVisible:i,availableAccessGroups:o,prefillData:c,onBackToDiscovery:d})=>{let[u]=$.Form.useForm(),[m,h]=(0,p.useState)(!1),[x,g]=(0,p.useState)({}),[f,j]=(0,p.useState)({}),[v,y]=(0,p.useState)(null),[_,w]=(0,p.useState)(!1),[k,C]=(0,p.useState)([]),[T,S]=(0,p.useState)(!1),[A,I]=(0,p.useState)({}),[O,P]=(0,p.useState)({}),[M,F]=(0,p.useState)(""),[E,L]=(0,p.useState)([]),[R,U]=(0,p.useState)(""),[z,H]=(0,p.useState)(null),[V,B]=(0,p.useState)(void 0),[K,G]=(0,p.useState)(null),[Y,J]=(0,p.useState)(void 0),Q=p.default.useRef(null),[Z,X]=(0,p.useState)(!1),{tools:ee,isLoadingTools:et,toolsError:es,toolsErrorStatus:er,toolsErrorStackTrace:el,canFetchTools:ea,fetchTools:en,clearTools:ei}=(({accessToken:e,oauthAccessToken:t,formValues:s,enabled:r=!0})=>{let[l,a]=(0,p.useState)([]),[n,i]=(0,p.useState)(!1),[o,c]=(0,p.useState)(null),[d,u]=(0,p.useState)(null),[m,h]=(0,p.useState)(null),[x,g]=(0,p.useState)(!1),f=s.auth_type===eT.AUTH_TYPE.OAUTH2&&s.oauth_flow_type===eT.OAUTH_FLOW.M2M,j=(0,eT.isClientForwardedTokenMode)(s.auth_type),v=s.auth_type===eT.AUTH_TYPE.OAUTH2&&!f||j,y=s.transport===eT.TRANSPORT.OPENAPI,_=y?!!s.spec_path:!!s.url,N=y?!!(_&&e):!!(_&&s.transport&&s.auth_type&&e&&(!v||t)),w=JSON.stringify(s.static_headers??{}),k=JSON.stringify(s.credentials??{}),C=async()=>{if(e&&(s.url||s.spec_path)&&(!v||t||y)){i(!0),c(null),u(null);try{let r=Array.isArray(s.static_headers)?s.static_headers.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value!=null?String(t.value):""),e},{}):!Array.isArray(s.static_headers)&&s.static_headers&&"object"==typeof s.static_headers?Object.entries(s.static_headers).reduce((e,[t,s])=>(t&&(e[t]=null!=s?String(s):""),e),{}):{},l=s.credentials&&"object"==typeof s.credentials?Object.entries(s.credentials).reduce((e,[t,s])=>{if(null==s||""===s)return e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,n=s.transport===eT.TRANSPORT.OPENAPI?"http":s.transport,i={server_id:s.server_id||"",server_name:s.server_name||"",url:s.url,spec_path:s.spec_path,transport:n,auth_type:s.auth_type,authorization_url:s.authorization_url,token_url:s.token_url,registration_url:s.registration_url,mcp_info:s.mcp_info,static_headers:r};l&&Object.keys(l).length>0&&(i.credentials=l);let o=await (0,b.testMCPToolsListRequest)(e,i,t);if(o.tools&&!o.error)a(o.tools),c(null),u(null),h(null),o.tools.length>0&&!x&&g(!0);else{let e=o.message||"Failed to retrieve tools list";c(e),u("number"==typeof o.status?o.status:null),h(403===o.status?null:o.stack_trace||null),a([]),g(!1)}}catch(e){console.error("Tools fetch error:",e),c(e instanceof Error?e.message:String(e)),u(null),h(null),a([]),g(!1)}finally{i(!1)}}},T=(0,p.useCallback)(()=>{a([]),c(null),u(null),h(null),g(!1)},[]);return(0,p.useEffect)(()=>{r&&(N?C():T())},[s.url,s.spec_path,s.transport,s.auth_type,e,r,t,N,w,k]),{tools:l,isLoadingTools:n,toolsError:o,toolsErrorStatus:d,toolsErrorStackTrace:m,hasShownSuccessMessage:x,canFetchTools:N,fetchTools:C,clearTools:T}})({accessToken:l,oauthAccessToken:z,formValues:f,enabled:!0}),eo=f.auth_type,ec=!!eo&&tQ.includes(eo),ed=eo===eT.AUTH_TYPE.OAUTH2,eu=eo===eT.AUTH_TYPE.OAUTH2_TOKEN_EXCHANGE,em=eo===eT.AUTH_TYPE.OAUTH2_ID_JAG,eh=eo===eT.AUTH_TYPE.AWS_SIGV4,ex=ed&&f.oauth_flow_type===eT.OAUTH_FLOW.M2M,{startOAuthFlow:ep,status:eg,error:ef,tokenResponse:ej,reset:eS}=tY({accessToken:l,getCredentials:()=>({...u.getFieldValue("credentials")??{},...Q.current??{}}),getTemporaryPayload:()=>{let e=u.getFieldsValue(!0),t=e.transport||M,s=e.url||(t===eT.TRANSPORT.OPENAPI?e.spec_path:void 0);if(!s||!t)return null;let r=t0(e.static_headers);return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:t===eT.TRANSPORT.OPENAPI?"http":t,auth_type:(0,eT.isClientForwardedTokenMode)(e.auth_type)?e.auth_type:eT.AUTH_TYPE.OAUTH2,credentials:(0,eT.isClientForwardedTokenMode)(e.auth_type)?(0,eT.preservedAdminCredentials)(e.credentials):{...e.credentials??{},...Q.current??{}},issuer:e.issuer,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,mcp_access_groups:e.mcp_access_groups,static_headers:r,command:e.command,args:e.args,env:e.env}},onTokenReceived:(e,t)=>{if(H(e?.access_token??null),!e?.access_token)return;if((0,eT.isClientForwardedTokenMode)(u.getFieldValue("auth_type"))){J((0,eT.getOAuthAuthorizationIdentity)(u.getFieldsValue(!0))),N.default.success("Token held for this browser session. Tools can now be previewed and configured; the token is not saved to LiteLLM.");return}Q.current=t?.clientId?{client_id:t.clientId,...t.clientSecret&&{client_secret:t.clientSecret}}:null;let s=u.getFieldValue("credentials")??{},r={...(0,eT.preservedAdminCredentials)(s)??{},...void 0!==s.scopes&&{scopes:s.scopes},access_token:e.access_token,...e.refresh_token&&{refresh_token:e.refresh_token},...e.expires_in&&{expires_in:e.expires_in},...e.scope&&{scope:e.scope}};u.setFieldValue("credentials",r),J((0,eT.getOAuthAuthorizationIdentity)(u.getFieldsValue(!0))),N.default.success("OAuth authorization successful! Please click 'Create MCP Server' to save the configuration.")},onBeforeRedirect:()=>{try{let e=u.getFieldsValue(!0);(0,tG.setSecureItem)(tX,JSON.stringify({modalVisible:n,formValues:e,transportType:M,costConfig:x,allowedTools:k,hasToolAllowlistInteraction:T,searchValue:R,aliasManuallyEdited:_,logoUrl:V,authorizedIdentity:Y}))}catch(e){console.warn("Failed to persist MCP create state",e)}},flowSource:"create"}),eA=(e={})=>{H(null),ei(),eS(),J(void 0),Q.current=null;let t=(0,eT.preservedAdminCredentials)(u.getFieldValue("credentials"));u.resetFields([...eT.CLEARED_ON_INVALIDATION]),t&&u.setFieldsValue({credentials:t});let s=Object.fromEntries(eT.CLEARED_ON_INVALIDATION.filter(t=>t in e).map(t=>[t,e[t]]));Object.keys(s).length>0&&u.setFieldsValue(s)};p.default.useEffect(()=>{let e=(0,tG.getSecureItem)(tX);if(e)try{let t=JSON.parse(e);t.modalVisible&&i(!0);let s=t.formValues?.transport||t.transportType||"";if(s&&F(s),t.formValues){let e={...t.formValues,credentials:(0,eT.withoutMintedTokenCredentials)(t.formValues.credentials)};y({values:e,transport:s})}"string"==typeof t.authorizedIdentity&&J(t.authorizedIdentity),t.costConfig&&g(t.costConfig),t.allowedTools&&C(t.allowedTools),"boolean"==typeof t.hasToolAllowlistInteraction&&S(t.hasToolAllowlistInteraction),t.searchValue&&U(t.searchValue),"boolean"==typeof t.aliasManuallyEdited&&w(t.aliasManuallyEdited),t.logoUrl&&B(t.logoUrl)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(tX)}},[u,i]),p.default.useEffect(()=>{v&&(M||v.transport,(!v.transport||M)&&(u.setFieldsValue(v.values),j(v.values),y(null)))},[v,u,M]),p.default.useEffect(()=>{if(!n||!c)return;let e=(c.name||"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""),t=c.transport||"";F(t);let s={server_name:e,alias:e,description:c.description||"",transport:t};if("stdio"===t){let e={};if(c.command&&(e.command=c.command),c.args&&c.args.length>0&&(e.args=c.args),c.env_vars&&c.env_vars.length>0){let t={};for(let e of c.env_vars)t[e.name]=e.description?`<${e.description}>`:"";e.env=t}Object.keys(e).length>0&&(s.stdio_config=JSON.stringify(e,null,2))}else c.url&&(s.url=c.url);u.setFieldsValue(s),j(s),w(!1)},[n,c,u]);let eI=async t=>{let s=Object.entries(A).find(([,e])=>e&&!ts.test(e));if(s)return void N.default.fromBackend(`Tool display name "${s[1]}" is invalid. Only letters, digits, underscores, and hyphens are allowed (no spaces).`);h(!0);try{let{static_headers:s,env_vars:r,stdio_config:n,credentials:o,allow_all_keys:c,available_on_public_internet:d,delegate_auth_to_upstream:m,oauth_passthrough:p,dcr_bridge:f,token_validation_json:j,...v}=t,y=v.mcp_access_groups,_=t0(s),I=tr(r),P=o&&"object"==typeof o?Object.entries(o).reduce((e,[t,s])=>{if(null==s||""===s)return e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,F={};if(n&&"stdio"===M)try{let e=JSON.parse(n),t=e;if(e.mcpServers&&"object"==typeof e.mcpServers){let s=Object.keys(e.mcpServers);if(s.length>0){let r=s[0];t=e.mcpServers[r],v.server_name||(v.server_name=r.replace(/-/g,"_"))}}F={command:t.command,args:t.args,env:t.env}}catch(e){N.default.fromBackend("Invalid JSON in stdio configuration");return}v.transport===eT.TRANSPORT.OPENAPI&&(v.transport="http");let E=null;if(j&&""!==j.trim())try{E=JSON.parse(j)}catch{N.default.fromBackend("Invalid JSON in Token Validation Rules"),h(!1);return}let L={...v,...F,stdio_config:void 0,mcp_info:{server_name:v.server_name||v.url,description:v.description,logo_url:V||void 0,mcp_server_cost_info:Object.keys(x).length>0?x:null,tool_allowlist_enforced:T||k.length>0},mcp_access_groups:y,alias:v.alias,allowed_tools:k,tool_name_to_display_name:A,tool_name_to_description:O,allow_all_keys:!!c,available_on_public_internet:!!d,delegate_auth_to_upstream:!!m,oauth_passthrough:!!p,dcr_bridge:!!(0,eT.isClientForwardedTokenMode)(v.auth_type)&&!!(f??!0),...v.auth_type===eT.AUTH_TYPE.OAUTH2?{oauth2_flow:t.oauth_flow_type===eT.OAUTH_FLOW.M2M?eT.MCP_OAUTH2_FLOW_M2M:eT.MCP_OAUTH2_FLOW_INTERACTIVE}:{},static_headers:_,env_vars:I,...null!==E&&{token_validation:E}},R=v.auth_type&&tZ.includes(v.auth_type),U=(0,eT.isClientForwardedTokenMode)(v.auth_type)?(0,eT.preservedAdminCredentials)(P):P;if(R&&U&&Object.keys(U).length>0&&(L.credentials=U),v.auth_type===eT.AUTH_TYPE.OAUTH2&&Q.current&&(L.credentials={...L.credentials??{},...Q.current}),null!=l){let s=eF?await (0,b.createMCPServer)(l,L):await (0,b.registerMCPServer)(l,L);if(ej?.access_token&&s?.server_id){let r=(0,eT.getMcpOAuthMode)({auth_type:v.auth_type,oauth2_flow:t.oauth_flow_type===eT.OAUTH_FLOW.M2M?eT.MCP_OAUTH2_FLOW_M2M:null,delegate_auth_to_upstream:!!m});if("authorization_code"===r){let e=ej.scope,t={access_token:ej.access_token,refresh_token:ej.refresh_token,expires_in:ej.expires_in,scopes:"string"==typeof e&&e?e.split(" "):void 0};await (0,b.storeMCPOAuthUserCredential)(l,s.server_id,t)}else{let t={access_token:ej.access_token,expires_in:ej.expires_in,refresh_token:ej.refresh_token,token_type:ej.token_type};(0,eC.setToken)(s.server_id,t,e)}}N.default.success(eF?"MCP Server created successfully":{message:"MCP Server submitted for admin review",description:"Once an admin approves it, the server will appear in your MCP Servers list."}),u.resetFields(),g({}),ei(),C([]),S(!1),w(!1),B(void 0),i(!1),a(s)}}catch(t){let e=t instanceof Error?t.message:String(t);N.default.fromBackend(eF?`Error creating MCP Server: ${e}`:`Error submitting MCP Server: ${e}`)}finally{h(!1)}},eO=()=>{u.resetFields(),g({}),ei(),C([]),S(!1),w(!1),B(void 0),J(void 0),Q.current=null,X(!1),i(!1)};p.default.useEffect(()=>{if(!_&&f.server_name){let e=f.server_name.replace(/\s+/g,"_");u.setFieldsValue({alias:e}),j(t=>({...t,alias:e}))}},[f.server_name]);let eP=p.default.useRef(n);p.default.useEffect(()=>{let e=eP.current;eP.current=n,!n&&e&&(u.resetFields(),j({}),H(null),ei(),eS(),J(void 0),Q.current=null,X(!1))},[n,u,ei,eS]);let eF=(0,s.isAdminRole)(r),eE=(e,t)=>{if("credentials"in e)X(!1);else{let t=["url","spec_path","issuer","authorization_url","token_url","registration_url"].some(t=>t in e),s=void 0!==(0,eT.preservedDeclaredAppCredentials)(u.getFieldValue("credentials"));t&&s&&X(!0)}if((0,eT.isHeldOAuthTokenStale)(u.getFieldsValue(!0),Y)){eA(e),j(u.getFieldsValue(!0));return}j(t)};return(0,t.jsx)(q.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center pb-4 border-b border-gray-100",style:{gap:12},children:[d&&(0,t.jsx)("button",{onClick:d,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none",style:{flexShrink:0},children:"←"}),(0,t.jsx)("img",{src:tJ,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:eF?"Add New MCP Server":"Submit MCP Server for Review"})]}),open:n,width:1e3,onCancel:eO,footer:null,forceRender:!0,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)($.Form,{form:u,onFinish:eI,onValuesChange:eE,layout:"vertical",className:"space-y-6",children:[!eF&&(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800",children:"Your submission will be sent for admin review. Once approved, the server will appear in your MCP Servers list. The request must be made with a team-scoped API key."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Server Name",(0,t.jsx)(ev.Tooltip,{title:"Best practice: Use a descriptive name that indicates the server's purpose (e.g., 'GitHub_MCP', 'Email_Service'). Cannot contain spaces or hyphens; use underscores instead. Names must comply with SEP-986 and will be rejected if invalid (https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names).",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"server_name",rules:[{required:!1,message:"Please enter a server name"},{validator:(e,t)=>tt(t)}],children:(0,t.jsx)(ek.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(ev.Tooltip,{title:"A short, unique identifier for this server. Defaults to the server name if not provided. Cannot contain spaces or hyphens; use underscores instead.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,t)=>tt(t)}],children:(0,t.jsx)(ek.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>w(!0)})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description"}),name:"description",rules:[{required:!1,message:"Please enter a server description"}],children:(0,t.jsx)(ek.TextInput,{placeholder:"Brief description of what this server does",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(tH,{value:V,onChange:B}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"GitHub / Source URL"}),name:"source_url",children:(0,t.jsx)(ek.TextInput,{placeholder:"https://github.com/org/mcp-server",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Transport Type"}),name:"transport",rules:[{required:!0,message:"Please select a transport type"}],children:(0,t.jsxs)(eb.Select,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{F(e);let t="stdio"===e?{url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0}:e===eT.TRANSPORT.OPENAPI?{url:void 0,command:void 0,args:void 0,env:void 0}:{spec_path:void 0,command:void 0,args:void 0,env:void 0};u.setFieldsValue(t),(0,eT.isHeldOAuthTokenStale)(u.getFieldsValue(!0),Y)&&eA(),j(u.getFieldsValue(!0))},value:M,children:[(0,t.jsx)(eb.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(eb.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(eb.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(eb.Select.Option,{value:eT.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),("http"===M||"sse"===M)&&(0,t.jsx)($.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"MCP Server URL"}),name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>te(t)}],children:(0,t.jsx)(W.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),M===eT.TRANSPORT.OPENAPI&&(0,t.jsx)(tp,{form:u,accessToken:n?l:null,onValuesChange:e=>eE(e,{...u.getFieldsValue(!0),...e}),onKeyToolsChange:L,onLogoUrlChange:B,onOAuthDocsUrlChange:G}),M===eT.TRANSPORT.OPENAPI&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:["BYOK (Bring Your Own Key)",(0,t.jsx)(ev.Tooltip,{title:"When enabled, each user provides their own API key for this service. Keys are stored per-user and never shared.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"is_byok",valuePropName:"checked",children:(0,t.jsx)(e_.Switch,{})}),(0,t.jsx)($.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.is_byok!==t.is_byok||e.auth_type!==t.auth_type,children:({getFieldValue:e})=>e("is_byok")?(0,t.jsxs)(t.Fragment,{children:[e("auth_type")&&"none"!==e("auth_type")&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg text-sm text-blue-700 flex items-start gap-2",children:[(0,t.jsx)(ew.InfoCircleOutlined,{className:"mt-0.5 shrink-0"}),(0,t.jsxs)("span",{children:["User keys will be sent as:"," ",(0,t.jsxs)("code",{className:"font-mono bg-blue-100 px-1 rounded-sm",children:["bearer_token"===e("auth_type")&&"Authorization: Bearer {key}","token"===e("auth_type")&&"Authorization: token {key}","api_key"===e("auth_type")&&"x-api-key: {key}","basic"===e("auth_type")&&"Authorization: Basic {key}","authorization"===e("auth_type")&&"Authorization: {key}"]}),!e("auth_type")&&"Set Authentication Type below to specify the format."]})]}),!e("auth_type")&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-yellow-50 rounded-lg text-sm text-yellow-700 flex items-start gap-2",children:[(0,t.jsx)(ew.InfoCircleOutlined,{className:"mt-0.5 shrink-0"}),(0,t.jsxs)("span",{children:["Set the ",(0,t.jsx)("strong",{children:"Authentication Type"})," below to specify how user keys are sent (e.g., Bearer Token, API Key header)."]})]}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Access Description",(0,t.jsx)(ev.Tooltip,{title:"List of permissions shown to users in the connection modal (e.g. 'Create and manage Jira issues')",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_description",children:(0,t.jsx)(eb.Select,{mode:"tags",placeholder:"Add access description items (press Enter after each)",className:"w-full",tokenSeparators:[","]})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["API Key Help URL",(0,t.jsx)(ev.Tooltip,{title:"Optional link shown to users to help them find their API key",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_api_key_help_url",children:(0,t.jsx)(W.Input,{placeholder:"https://docs.example.com/api-keys"})})]}):null})]}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Max Concurrent Requests (optional)",(0,t.jsx)(ev.Tooltip,{title:"Maximum number of tool calls LiteLLM will run against this server at the same time. Additional calls wait for a free slot. Leave blank for no limit.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"max_concurrent_requests",children:(0,t.jsx)(ey.InputNumber,{min:1,precision:0,placeholder:"e.g. 10",style:{width:"100%"},className:"rounded-lg"})}),"stdio"!==M&&""!==M&&(0,t.jsx)(eN.Collapse,{defaultActiveKey:["auth"],className:"mb-4",items:[{key:"auth",label:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-700",children:"Authentication"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(eb.Select,{placeholder:"Select auth type",className:"rounded-lg",size:"large",virtual:!1,children:[(0,t.jsx)(eb.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(eb.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(eb.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(eb.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(eb.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(eb.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(eb.Select.Option,{value:"oauth2_token_exchange",children:"OAuth Token Exchange (OBO)"}),(0,t.jsx)(eb.Select.Option,{value:"oauth2_id_jag",children:"ID-JAG (Okta Cross App Access)"}),(0,t.jsx)(eb.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"}),(0,t.jsx)(eb.Select.Option,{value:"true_passthrough",children:"True Passthrough (no LiteLLM auth)"}),(0,t.jsx)(eb.Select.Option,{value:"oauth_delegate",children:"OAuth Delegate (client-supplied upstream token)"})]})}),(0,t.jsx)(eL,{authType:eo}),(0,t.jsx)(eH,{authType:eo,dcrBridgeInitialChecked:!0,oauthFlow:{startOAuthFlow:ep,status:eg,error:ef,tokenResponse:ej},appMayNotMatchUpstream:Z}),ec&&(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(ev.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,t)=>t&&"string"==typeof t&&""===t.trim()?Promise.reject(Error("Authentication value cannot be empty whitespace")):Promise.resolve()}],children:(0,t.jsx)(ek.TextInput,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),ed&&(0,t.jsx)(eM,{isM2M:ex,initialFlowType:eT.OAUTH_FLOW.INTERACTIVE,docsUrl:K,oauthFlow:{startOAuthFlow:ep,status:eg,error:ef,tokenResponse:ej}}),eu&&(0,t.jsx)(eB,{}),em&&(0,t.jsx)(eW,{})]})}]}),"stdio"!==M&&""!==M&&eh&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["For MCP servers hosted on AWS Bedrock AgentCore."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/mcp_aws_sigv4",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:"View docs →"})]}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(ev.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[{required:!0,message:"AWS region is required for SigV4 auth"}],children:(0,t.jsx)(W.Input,{placeholder:"us-east-1",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Service Name",(0,t.jsx)(ev.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(W.Input,{placeholder:"bedrock-agentcore",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Access Key ID",(0,t.jsx)(ev.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],dependencies:[["credentials","aws_secret_access_key"]],rules:[({getFieldValue:e})=>({validator:(t,s)=>e(["credentials","aws_secret_access_key"])&&!s?Promise.reject(Error("Access Key ID is required when Secret Access Key is provided")):Promise.resolve()})],children:(0,t.jsx)(W.Input.Password,{placeholder:"AKIA... (optional — uses IAM role if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Secret Access Key",(0,t.jsx)(ev.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],dependencies:[["credentials","aws_access_key_id"]],rules:[({getFieldValue:e})=>({validator:(t,s)=>e(["credentials","aws_access_key_id"])&&!s?Promise.reject(Error("Secret Access Key is required when Access Key ID is provided")):Promise.resolve()})],children:(0,t.jsx)(W.Input.Password,{placeholder:"Enter secret key (optional — uses IAM role if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Token",(0,t.jsx)(ev.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(W.Input.Password,{placeholder:"Enter session token (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Role ARN",(0,t.jsx)(ev.Tooltip,{title:"Optional. IAM role ARN to assume via STS before signing. If set, LiteLLM calls sts:AssumeRole to get temporary credentials. Uses ambient credentials (IAM role, env vars) as the source identity unless explicit keys are also provided.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(W.Input,{placeholder:"arn:aws:iam::123456789012:role/MyRole (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Name",(0,t.jsx)(ev.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(W.Input,{placeholder:"litellm-prod (optional, auto-generated if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsx)(ti,{isVisible:"stdio"===M})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(t$,{})}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(th,{availableAccessGroups:o,mcpServer:null,searchValue:R,setSearchValue:U,getAccessGroupOptions:()=>{let e=o.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return R&&!o.some(e=>e.toLowerCase().includes(R.toLowerCase()))&&e.push({value:R,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:R}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:(0,t.jsx)(e4,{formValues:f,tools:ee,isLoadingTools:et,toolsError:es,toolsErrorStatus:er,toolsErrorStackTrace:el,canFetchTools:ea,fetchTools:en})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(tn,{accessToken:l,formValues:f,allowedTools:k,existingAllowedTools:null,onAllowedToolsChange:C,hasToolAllowlistInteraction:T,onToolAllowlistInteraction:()=>S(!0),toolNameToDisplayName:A,toolNameToDescription:O,onToolNameToDisplayNameChange:I,onToolNameToDescriptionChange:P,keyTools:E,externalTools:ee,externalIsLoading:et,externalError:es,externalErrorStatus:er,externalCanFetch:ea})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eX,{value:x,onChange:g,tools:ee.filter(e=>k.includes(e.name)),disabled:!1})}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(D.Button,{variant:"secondary",onClick:eO,children:"Cancel"}),(0,t.jsx)(D.Button,{variant:"primary",loading:m,children:m?"Creating...":"Add MCP Server"})]})]})})})};var t1=e.i(175712),t4=e.i(404206),t5=e.i(723731),t3=e.i(653824),t6=e.i(881073),t7=e.i(197647),t8=e.i(118366),t9=e.i(758472),se=e.i(868054);let st=(0,r.default)("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"}]]);var ss=e.i(634831),sr=e.i(438100);let sl=(0,r.default)("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"}]]),{Title:sa,Text:sn}=tD.Typography,{Panel:si}=eN.Collapse,so=({icon:e,title:s,description:r,children:l,serverName:a,accessGroups:n=["dev-group"]})=>{let[i,o]=(0,p.useState)(!1);return(0,t.jsxs)(t1.Card,{className:"border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)("span",{className:"p-2 rounded-lg bg-gray-50",children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)(sa,{level:5,className:"mb-0",children:s}),(0,t.jsx)(sn,{className:"text-gray-600",children:r})]})]}),a&&("Implementation Example"===s||"Configuration"===s)&&(0,t.jsxs)($.Form.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(e_.Switch,{size:"small",checked:i,onChange:o}),(0,t.jsxs)(sn,{className:"text-sm",children:["Limit tools to specific MCP servers or MCP groups by passing the ",(0,t.jsx)("code",{children:"x-mcp-servers"})," header"]})]}),i&&(0,t.jsx)(to.Alert,{className:"mt-2",type:"info",showIcon:!0,message:"Two Options",description:(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Get a specific server: ",(0,t.jsxs)("code",{children:['"',a.replace(/\s+/g,"_"),'"']})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Get a group of MCPs: ",(0,t.jsx)("code",{children:'"dev-group"'})]}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["You can also mix both: ",(0,t.jsx)("code",{children:'"Server1,dev-group"'})]})]})})]}),p.default.Children.map(l,e=>{if(p.default.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let t=e.props.code;if(t&&t.includes('"headers":'))return p.default.cloneElement(e,{code:t.replace(/"headers":\s*{[^}]*}/,`"headers": ${JSON.stringify((()=>{let e={"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"};if(i&&a){let t=[a.replace(/\s+/g,"_"),...n].join(",");e["x-mcp-servers"]=t}return e})(),null,8)}`)})}return e})]})},sc=({currentServerAccessGroups:e=[]})=>{let s=(0,b.getProxyBaseUrl)(),[r,l]=(0,p.useState)({}),[a,n]=(0,p.useState)({openai:[],litellm:[],cursor:[],http:[]}),[i]=(0,p.useState)("Zapier_MCP"),o=async(e,t)=>{await (0,ed.copyToClipboard)(e)&&(l(e=>({...e,[t]:!0})),setTimeout(()=>{l(e=>({...e,[t]:!1}))},2e3))},c=({code:e,copyKey:s,title:l,className:a=""})=>(0,t.jsxs)("div",{className:"relative group",children:[l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(t9.Code,{size:16,className:"text-blue-600"}),(0,t.jsx)(sn,{strong:!0,className:"text-gray-700",children:l})]}),(0,t.jsxs)(t1.Card,{className:`bg-gray-50 border border-gray-200 relative ${a}`,children:[(0,t.jsx)(eR.Button,{type:"text",size:"small",icon:r[s]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(t8.CopyIcon,{size:12}),onClick:()=>o(e,s),className:`absolute top-2 right-2 z-10 transition-all duration-200 ${r[s]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`}),(0,t.jsx)("pre",{className:"text-sm overflow-x-auto pr-10 text-gray-800 font-mono leading-relaxed",children:e})]})]}),d=({step:e,title:s,children:r})=>(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)("div",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-semibold",children:e})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(sn,{strong:!0,className:"text-gray-800 block mb-2",children:s}),r]})]});return(0,t.jsx)("div",{children:(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B.Title,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(V.Text,{className:"text-lg text-gray-600",children:"Use tools directly from any MCP client with LiteLLM MCP. Enable your AI assistant to perform real-world tasks through a simple, secure connection."})]}),(0,t.jsxs)(t3.TabGroup,{className:"w-full",children:[(0,t.jsx)(t6.TabList,{className:"flex justify-start mt-8 mb-6",children:(0,t.jsxs)("div",{className:"flex bg-gray-100 p-1 rounded-lg",children:[(0,t.jsx)(t7.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(t9.Code,{size:18}),"OpenAI API"]})}),(0,t.jsx)(t7.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(sl,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(t7.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(se.Terminal,{size:18}),"Cursor"]})}),(0,t.jsx)(t7.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(st,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(t5.TabPanels,{children:[(0,t.jsx)(t4.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-linear-to-r from-blue-50 to-indigo-50 p-6 rounded-lg border border-blue-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(t9.Code,{className:"text-blue-600",size:24}),(0,t.jsx)(sa,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(sn,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(so,{icon:(0,t.jsx)(sr.KeyIcon,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(tc.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(sn,{children:["Get your API key from the"," ",(0,t.jsxs)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 inline-flex items-center gap-1",children:["OpenAI platform ",(0,t.jsx)(ss.ExternalLinkIcon,{size:12})]})]})}),(0,t.jsx)(c,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(so,{icon:(0,t.jsx)(S.ServerIcon,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(c,{title:"Server URL",code:`${s}/mcp`,copyKey:"openai-server-url"})}),(0,t.jsx)(so,{icon:(0,t.jsx)(t9.Code,{className:"text-blue-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the Responses API",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(c,{code:`curl --location 'https://api.openai.com/v1/responses' \\
+--header 'Content-Type: application/json' \\
+--header "Authorization: Bearer $OPENAI_API_KEY" \\
+--data '{
+ "model": "gpt-4.1",
+ "tools": [
+ {
+ "type": "mcp",
+ "server_label": "litellm",
+ "server_url": "${s}/mcp",
+ "require_approval": "never",
+ "headers": {
+ "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY",
+ "x-mcp-servers": "Zapier_MCP,dev-group"
+ }
+ }
+ ],
+ "input": "Run available tools",
+ "tool_choice": "required"
+}'`,copyKey:"openai-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(t4.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-linear-to-r from-emerald-50 to-green-50 p-6 rounded-lg border border-emerald-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(sl,{className:"text-emerald-600",size:24}),(0,t.jsx)(sa,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(sn,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(so,{icon:(0,t.jsx)(sr.KeyIcon,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(tc.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(sn,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(c,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(so,{icon:(0,t.jsx)(S.ServerIcon,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(c,{title:"Server URL",code:`${s}/mcp`,copyKey:"litellm-server-url"})}),(0,t.jsx)(so,{icon:(0,t.jsx)(t9.Code,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:i,accessGroups:["dev-group"],children:(0,t.jsx)(c,{code:`curl --location '${s}/v1/responses' \\
+--header 'Content-Type: application/json' \\
+--header "Authorization: Bearer $LITELLM_VIRTUAL_KEY" \\
+--data '{
+ "model": "gpt-4",
+ "tools": [
+ {
+ "type": "mcp",
+ "server_label": "litellm",
+ "server_url": "litellm_proxy",
+ "require_approval": "never",
+ "headers": {
+ "x-litellm-api-key": "Bearer YOUR_LITELLM_VIRTUAL_KEY",
+ "x-mcp-servers": "Zapier_MCP,dev-group"
+ }
+ }
+ ],
+ "input": "Run available tools",
+ "tool_choice": "required"
+}'`,copyKey:"litellm-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(t4.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-linear-to-r from-purple-50 to-blue-50 p-6 rounded-lg border border-purple-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(se.Terminal,{className:"text-purple-600",size:24}),(0,t.jsx)(sa,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(sn,{className:"text-purple-700",children:"Use tools directly from Cursor IDE with LiteLLM MCP. Enable your AI assistant to perform real-world tasks without leaving your coding environment."})]}),(0,t.jsxs)(t1.Card,{className:"border border-gray-200",children:[(0,t.jsx)(sa,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(d,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(sn,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded-sm",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded-sm",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(d,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(sn,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(d,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(sn,{className:"text-gray-600 mb-3",children:["Copy the JSON configuration below and paste it into Cursor, then save with"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded-sm",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded-sm",children:"Ctrl+S"})]}),(0,t.jsx)(so,{icon:(0,t.jsx)(t9.Code,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(c,{code:`{
+ "mcpServers": {
+ "Zapier_MCP": {
+ "url": "${s}/mcp",
+ "headers": {
+ "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY",
+ "x-mcp-servers": "Zapier_MCP,dev-group"
+ }
+ }
+ }
+}`,copyKey:"cursor-config",className:"text-xs"})})]})]})]})]}),{})}),(0,t.jsx)(t4.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(tc.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-linear-to-r from-green-50 to-teal-50 p-6 rounded-lg border border-green-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(st,{className:"text-green-600",size:24}),(0,t.jsx)(sa,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(sn,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(so,{icon:(0,t.jsx)(st,{className:"text-green-600",size:16}),title:"Universal MCP Connection",description:"Use this URL with any MCP client that supports HTTP transport",children:(0,t.jsxs)(tc.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(sn,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(c,{title:"Server URL",code:`${s}/mcp`,copyKey:"http-server-url"}),(0,t.jsx)(c,{title:"Headers Configuration",code:JSON.stringify({"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"},null,2),copyKey:"http-headers"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(eR.Button,{type:"link",className:"p-0 h-auto text-blue-600 hover:text-blue-700",href:"https://modelcontextprotocol.io/docs/concepts/transports",icon:(0,t.jsx)(ss.ExternalLinkIcon,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})};var sd=e.i(643531),su=e.i(373488),su=su;let sm={healthy:{dot:"bg-green-500"},unhealthy:{dot:"bg-red-500"},unknown:{dot:"bg-gray-300"}},sh=e=>e.stopPropagation(),sx=({status:e,isLoadingHealth:s,isRechecking:r,onRecheck:l,lastCheck:a,error:i,dotClass:o})=>s||r?(0,t.jsxs)(n.Badge,{variant:"outline",className:"text-muted-foreground",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-muted-foreground"}),"Checking"]}):(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsxs)(n.Badge,{variant:"outline",className:l?"cursor-pointer hover:opacity-80":"cursor-default",onClick:l?e=>{e.stopPropagation(),l()}:void 0,children:[(0,t.jsx)("span",{className:(0,ec.cn)("h-1.5 w-1.5 rounded-full",o)}),e.charAt(0).toUpperCase()+e.slice(1)]})}),(0,t.jsxs)(u.TooltipContent,{side:"top",className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"mb-1 font-semibold",children:["Health: ",e]}),a&&(0,t.jsxs)("div",{className:"mb-1 text-xs",children:["Last check: ",new Date(a).toLocaleString()]}),i&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"mb-1 font-medium",children:"Error"}),(0,t.jsx)("div",{className:"wrap-break-word",children:i})]}),!a&&!i&&(0,t.jsx)("div",{className:"text-xs",children:"No health data"}),l&&(0,t.jsx)("div",{className:"mt-1 text-xs",children:"Click to recheck"})]})]}),sp=({connected:e,onConnect:s})=>e?(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"BYOK credential"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)(sd.Check,{})," Connected"]}),s&&(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:e=>{sh(e),s()},children:"Update"})]})]}):(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"BYOK credential"}),s?(0,t.jsx)(i.Button,{size:"sm",onClick:e=>{sh(e),s()},children:"Connect"}):(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})]}),sg=({server:e,missingUserFields:s,isLoadingHealth:r,isRechecking:l,onClick:a,onRecheckHealth:o,onByokConnect:c,onOpenFillFields:d,onDelete:m})=>{let h=e.alias||e.server_name||"",x=e.server_name||h||e.server_id,p=e.mcp_info?.logo_url??void 0,g=e.transport||"http",f=e.spec_path&&"stdio"!==g?"openapi":g,j=e.auth_type||"none",v=e.auth_type===eT.AUTH_TYPE.OAUTH2&&!e.oauth2_flow&&!e.delegate_auth_to_upstream,b=e.status||"unknown",y=sm[b]??sm.unknown,_=e.available_on_public_internet,N=(e.mcp_access_groups??[]).filter(e=>"string"==typeof e),w=s??[],k=w.length>0,C=k?"border-2 border-destructive/40 bg-destructive/5 hover:border-destructive/60 hover:shadow-md":"border border-border bg-card hover:shadow-md",T=e.url||"",{maskedUrl:S}=T?e9(T):{maskedUrl:""},A="",I="";"stdio"===g?I=A=[e.command,...e.args??[]].filter(e=>"string"==typeof e&&e.length>0).join(" "):e.spec_path?(A=e.spec_path,I=e.spec_path):T&&(A=S,I=T);let O=!!o||!!m;return(0,t.jsx)(u.TooltipProvider,{children:(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:a,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),a())},className:(0,ec.cn)("group relative flex h-full cursor-pointer flex-col gap-3 rounded-lg p-4 transition-all duration-150 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",C),children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[p?(0,t.jsx)(tf.Logo,{src:p,label:x,className:"h-10 w-10 shrink-0 rounded-sm object-contain"}):(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-sm bg-muted font-semibold text-muted-foreground",children:(x||"?").slice(0,2).toUpperCase()}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"block w-full truncate text-left font-semibold",title:x,children:x}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-muted-foreground",children:[h&&(0,t.jsx)("span",{className:"truncate",children:h}),h&&(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)("span",{className:"font-mono text-primary",children:e.server_id.slice(0,7)})}),(0,t.jsx)(u.TooltipContent,{children:e.server_id})]})]})]}),O&&(0,t.jsxs)(eo.DropdownMenu,{children:[(0,t.jsx)(eo.DropdownMenuTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:sh,onKeyDown:sh,"aria-label":"Server actions",className:"-mr-1 -mt-1 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:(0,t.jsx)(su.default,{className:"size-5"})})}),(0,t.jsxs)(eo.DropdownMenuContent,{align:"end",children:[o&&(0,t.jsxs)(eo.DropdownMenuItem,{disabled:l,onClick:e=>{sh(e),o()},children:[(0,t.jsx)(sl,{}),"Test Connection"]}),o&&m&&(0,t.jsx)(eo.DropdownMenuSeparator,{}),m&&(0,t.jsxs)(eo.DropdownMenuItem,{variant:"destructive",onClick:e=>{sh(e),m()},children:[(0,t.jsx)(er.Trash2,{}),"Delete"]})]})]})]}),A?(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:A})}),(0,t.jsx)(u.TooltipContent,{children:I})]}):(0,t.jsx)("div",{className:"h-[18px]","aria-hidden":!0}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(sx,{status:b,isLoadingHealth:r,isRechecking:l,onRecheck:o,lastCheck:e.last_health_check,error:e.health_check_error,dotClass:y.dot}),(0,t.jsx)(n.Badge,{variant:"outline",children:f.toUpperCase()}),(0,t.jsx)(n.Badge,{variant:"outline",children:j}),v&&(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)(e2.CircleAlert,{}),"OAuth flow not set"]})}),(0,t.jsx)(u.TooltipContent,{children:"This OAuth server has no flow set (Machine-to-Machine vs Interactive). Open it and choose an OAuth Flow Type so LiteLLM authenticates it as you intend."})]}),(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)("span",{className:(0,ec.cn)("h-1.5 w-1.5 rounded-full",_?"bg-green-500":"bg-orange-500")}),_?"Public":"Internal"]}),N.slice(0,2).map(e=>(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)(n.Badge,{variant:"outline",className:"max-w-[120px] truncate",children:e})}),(0,t.jsx)(u.TooltipContent,{children:e})]},e)),N.length>2&&(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsxs)(n.Badge,{variant:"outline",children:["+",N.length-2]})}),(0,t.jsx)(u.TooltipContent,{children:N.slice(2).join(", ")})]})]}),(e.is_byok||k)&&(0,t.jsxs)("div",{className:"mt-auto flex flex-col gap-2",children:[e.is_byok&&(0,t.jsx)(sp,{connected:!!e.has_user_credential,onConnect:c}),k&&(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs",children:[(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 font-semibold text-destructive",children:[(0,t.jsx)(e2.CircleAlert,{className:"size-3.5"}),w.length," user field",1===w.length?"":"s"," missing"]})}),(0,t.jsxs)(u.TooltipContent,{children:[(0,t.jsx)("div",{className:"mb-1 font-semibold",children:"Missing user fields:"}),(0,t.jsx)("ul",{className:"ml-3",children:w.map(e=>(0,t.jsxs)("li",{children:["• ",e]},e))})]})]}),d&&(0,t.jsx)(i.Button,{variant:"destructive",size:"sm",onClick:e=>{sh(e),d()},children:"Set"})]})]})]})})};var sf=e.i(871689),sj=e.i(286536),sv=e.i(77705),sb=e.i(954616),sy=e.i(555987);function s_(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>sN(e)).filter(e=>void 0!==e);let t=sN(e);return void 0===t?[]:[t]}function sN(e,t){if(!e)return;let s=void 0!==t?t:e.default;if("object"===e.type){let t="object"!=typeof s||null===s||Array.isArray(s)?{}:{...s};return e.properties&&Object.entries(e.properties).forEach(([e,s])=>{t[e]=sN(s,t[e])}),t}if("array"===e.type){if(Array.isArray(s)){let t=e.items;if(!t)return s;if(0===s.length){let e=s_(t);return e.length?e:s}return Array.isArray(t)?s.map((e,s)=>sN(t[s]??t[t.length-1],e)):s.map(e=>sN(t,e))}return void 0!==s?s:s_(e.items)}if(void 0!==s)return s;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let sw=e=>{let t=sN(e);if("object"===e.type||"array"===e.type){let s="array"===e.type?[]:{};return JSON.stringify(t??s,null,2)}return t};function sk({tool:e,onSubmit:s,isLoading:r,result:l,error:a,onClose:n}){let[i]=$.Form.useForm(),[o,c]=p.default.useState("formatted"),[d,u]=p.default.useState(null),[m,h]=p.default.useState(null),x=p.default.useMemo(()=>"string"==typeof e.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:e.inputSchema,[e.inputSchema]),g=p.default.useMemo(()=>x.properties&&x.properties.params&&"object"===x.properties.params.type&&x.properties.params.properties?{type:"object",properties:x.properties.params.properties,required:x.properties.params.required||[]}:x,[x]);p.default.useEffect(()=>{if(i.resetFields(),!g.properties)return;let e={};Object.entries(g.properties).forEach(([t,s])=>{e[t]=sw(s)}),i.setFieldsValue(e)},[i,g,e]),p.default.useEffect(()=>{d&&(l||a)&&h(Date.now()-d)},[l,a,d]);let f=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let s=document.execCommand("copy");if(document.body.removeChild(t),!s)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},j=async()=>{await f(JSON.stringify(l,null,2))?N.default.success("Result copied to clipboard"):N.default.fromBackend("Failed to copy result")},v=async()=>{await f(e.name)?N.default.success("Tool name copied to clipboard"):N.default.fromBackend("Failed to copy tool name")};return(0,t.jsxs)("div",{className:"space-y-4 h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:(0,sy.resolveLogoSrc)(e.mcp_info.logo_url),alt:`${e.mcp_info.server_name} logo`,className:"w-6 h-6 object-contain"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Tool:"}),(0,t.jsxs)("div",{className:"group inline-flex items-center space-x-1 bg-slate-50 hover:bg-slate-100 px-3 py-1 rounded-md cursor-pointer transition-colors border border-slate-200",onClick:v,title:"Click to copy tool name",children:[(0,t.jsx)("span",{className:"font-mono text-slate-700 font-medium text-sm",children:e.name}),(0,t.jsx)("svg",{className:"w-3 h-3 text-slate-400 group-hover:text-slate-600 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]}),(0,t.jsx)("p",{className:"text-xs text-gray-600",children:e.description}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["Provider: ",e.mcp_info.server_name]})]})]}),(0,t.jsx)(D.Button,{onClick:n,variant:"light",size:"sm",className:"text-gray-500 hover:text-gray-700",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 h-full",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Input Parameters"}),(0,t.jsx)(ev.Tooltip,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)($.Form,{form:i,onFinish:e=>{u(Date.now()),h(null);let t={};Object.entries(e).forEach(([e,s])=>{let r=g.properties?.[e],l="string"==typeof s?s.trim():s;if(r&&null!=l&&""!==l)switch(r.type){case"boolean":t[e]="true"===l||!0===l;break;case"number":case"integer":{let s=Number(l);t[e]=Number.isNaN(s)?l:"integer"===r.type?Math.trunc(s):s;break}case"object":case"array":try{let s="string"==typeof l?JSON.parse(l):l,a="object"===r.type&&null!==s&&"object"==typeof s&&!Array.isArray(s),n="array"===r.type&&Array.isArray(s);"object"===r.type&&a||"array"===r.type&&n?t[e]=s:t[e]=l}catch(s){t[e]=l}break;case"string":t[e]=String(l);break;default:t[e]=l}else null!=l&&""!==l&&(t[e]=l)}),s(x.properties&&x.properties.params&&"object"===x.properties.params.type&&x.properties.params.properties?{params:t}:t)},layout:"vertical",className:"space-y-3",children:["string"==typeof e.inputSchema?(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Input ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),name:"input",rules:[{required:!0,message:"Please enter input for this tool"}],className:"mb-3",children:(0,t.jsx)(ek.TextInput,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===g.properties?(0,t.jsx)("div",{className:"text-center py-6 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)("div",{className:"max-w-sm mx-auto",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Parameters Required"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This tool can be called without any input parameters."})]})}):(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(g.properties).map(([s,r])=>{let l=sw(r),a=`${e.name}-${s}`;return(0,t.jsxs)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[s," ",g.required?.includes(s)&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),r.description&&(0,t.jsx)(ev.Tooltip,{title:r.description,children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:s,initialValue:l,rules:[{required:g.required?.includes(s),message:`Please enter ${s}`},..."object"===r.type||"array"===r.type?[{validator:(e,t)=>{if((null==t||""===t)&&!g.required?.includes(s))return Promise.resolve();try{let e="string"==typeof t?JSON.parse(t):t,s="object"===r.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),l="array"===r.type&&Array.isArray(e);if("object"===r.type&&s||"array"===r.type&&l)return Promise.resolve();return Promise.reject(Error("object"===r.type?"Please enter a JSON object":"Please enter a JSON array"))}catch(e){return Promise.reject(Error("Invalid JSON"))}}}]:[]],className:"mb-3",children:["string"===r.type&&r.enum&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-xs focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:l??"",children:[!g.required?.includes(s)&&(0,t.jsxs)("option",{value:"",children:["Select ",s]}),r.enum.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),"string"===r.type&&!r.enum&&(0,t.jsx)(ek.TextInput,{placeholder:r.description||`Enter ${s}`,defaultValue:l??"",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),("number"===r.type||"integer"===r.type)&&(0,t.jsx)("input",{type:"number",step:"integer"===r.type?1:"any",placeholder:r.description||`Enter ${s}`,defaultValue:l??0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-xs focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===r.type&&(0,t.jsxs)(eb.Select,{placeholder:`Select ${s}`,allowClear:!g.required?.includes(s),className:"w-full",children:[(0,t.jsx)(eb.Select.Option,{value:!0,children:"True"}),(0,t.jsx)(eb.Select.Option,{value:!1,children:"False"})]}),("object"===r.type||"array"===r.type)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("textarea",{rows:"object"===r.type?6:4,placeholder:r.description||("object"===r.type?`Enter JSON object for ${s}`:`Enter JSON array for ${s}`),defaultValue:l??("object"===r.type?"{}":"[]"),spellCheck:!1,"data-testid":`textarea-${s}`,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-xs focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm font-mono"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"object"===r.type?"Provide a valid JSON object.":"Provide a valid JSON array."})]})]},a)})}),(0,t.jsx)("div",{className:"pt-3 border-t border-gray-100",children:(0,t.jsx)(D.Button,{type:"button",onClick:()=>i.submit(),disabled:r,variant:"primary",className:"w-full",loading:r,children:r?"Calling Tool...":l||a?"Call Again":"Call Tool"})})]})})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Tool Result"})}),(0,t.jsx)("div",{className:"p-4",children:l||a||r?(0,t.jsxs)("div",{className:"space-y-3",children:[l&&!r&&!a&&(0,t.jsx)("div",{className:"p-2 bg-green-50 border border-green-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("h4",{className:"text-xs font-medium text-green-900",children:"Tool executed successfully"}),null!==m&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(m/1e3).toFixed(2),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsxs)("div",{className:"flex bg-white rounded-sm border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>c("formatted"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"formatted"===o?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>c("json"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"json"===o?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"JSON"})]}),(0,t.jsx)("button",{onClick:j,className:"p-1 hover:bg-green-100 rounded-sm text-green-700",title:"Copy response",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]})]})}),(0,t.jsxs)("div",{className:"max-h-96 overflow-y-auto",children:[r&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-sm font-medium mt-3",children:"Calling tool..."}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Please wait while we process your request"})]}),a&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)("svg",{className:"h-4 w-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-red-900",children:"Tool Call Failed"}),null!==m&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(m/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded-sm p-2 max-h-48 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-xs whitespace-pre-wrap text-red-700 font-mono",children:a.message})})]})]})}),l&&!r&&!a&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===o?l.map((e,s)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:["text"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Text Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-white rounded-sm border border-gray-200 max-h-64 overflow-y-auto",children:(0,t.jsx)("div",{className:"p-3 space-y-2",children:e.text.split("\n\n").map((e,s)=>{if(""===e.trim())return null;if(e.startsWith("##")){let r=e.replace(/^#+\s/,"");return(0,t.jsx)("div",{className:"border-b border-gray-200 pb-1 mb-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:r})},s)}let r=/(https?:\/\/[^\s\)]+)/g;if(r.test(e)){let l=e.split(r);return(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-sm p-2",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap",children:l.map((e,s)=>r.test(e)?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline break-all",children:e},s):e)})},s)}return e.includes("Score:")?(0,t.jsx)("div",{className:"bg-green-50 border-l-4 border-green-400 p-2 rounded-r",children:(0,t.jsx)("p",{className:"text-xs text-green-800 font-medium whitespace-pre-wrap",children:e})},s):(0,t.jsx)("div",{className:"bg-gray-50 rounded-sm p-2 border border-gray-200",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap font-mono",children:e})},s)}).filter(Boolean)})})})]}),"image"===e.type&&e.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Image Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-sm p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded-sm shadow-xs"})})})]}),"embedded_resource"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Embedded Resource"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2 p-3 bg-blue-50 border border-blue-200 rounded-sm",children:[(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-blue-900",children:["Resource Type: ",e.resource_type]}),e.url&&(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-xs text-blue-600 hover:text-blue-800 hover:underline mt-1 transition-colors",children:["View Resource",(0,t.jsxs)("svg",{className:"ml-1 h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,t.jsx)("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),(0,t.jsx)("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]})]})]})]})})]})]},s)):(0,t.jsx)("div",{className:"bg-white rounded-sm border border-gray-200",children:(0,t.jsx)("div",{className:"p-3 overflow-auto max-h-80 bg-gray-50",children:(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all text-gray-800",children:JSON.stringify(l,null,2)})})})})]})]}):(0,t.jsx)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:(0,t.jsxs)("div",{className:"text-center max-w-sm",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"Ready to Call Tool"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:'Configure the input parameters and click "Call Tool" to see the results here.'})]})})})]})]})]})}function sC(e){return e.toLowerCase().trim().replace(/[^a-z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}function sT(e,t){let s=e?sC(e):"";return{[s?`x-mcp-${s}-authorization`:"x-mcp-auth"]:`Bearer ${t}`}}var sS=e.i(779129);let sA="litellm-tools-mcp-oauth-flow-state",sI="litellm-tools-mcp-oauth-result";var sO=e.i(280024),sP=e.i(531245),sM=e.i(181692),sM=sM,sF=e.i(319023);let sE=({serverId:e,accessToken:s,auth_type:r,oauth2_flow:l,delegate_auth_to_upstream:c,dcr_bridge:d,userRole:u,userID:h,serverAlias:x,extraHeaders:f})=>{let[j,v]=(0,p.useState)(null),[y,_]=(0,p.useState)(null),[w,k]=(0,p.useState)(null),[C,T]=(0,p.useState)(""),[S,A]=(0,p.useState)({}),[I,O]=(0,p.useState)(!1),P=(0,eT.getMcpOAuthMode)({auth_type:r,oauth2_flow:l,delegate_auth_to_upstream:c}),M="passthrough"===P||(0,eT.isClientForwardedTokenMode)(r),F="authorization_code"===P,[E,L]=(0,p.useState)(()=>M&&(0,eC.isTokenValid)(e,h)?(0,eC.getToken)(e,h)?.access_token??null:null);(0,p.useEffect)(()=>{M?L((0,eC.isTokenValid)(e,h)?(0,eC.getToken)(e,h)?.access_token??null:null):L(null)},[e,h,M]);let{startOAuthFlow:R,status:U,error:z}=(({accessToken:e,serverId:t,serverAlias:s,userId:r,scopes:l,clientId:a,gatewayMintsClient:n,onSuccess:i})=>{let[o,c]=(0,p.useState)("idle"),[d,u]=(0,p.useState)(null),m=(0,p.useRef)(!1),h=(0,p.useRef)(i);h.current=i;let x=(0,p.useCallback)(async()=>{try{let r;c("authorizing"),u(null);let i=a??void 0,o=(0,sS.buildCallbackUrl)();if(!i&&!n)try{let l=await (0,b.registerMcpOAuthClient)(e,t,{client_name:s||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none",redirect_uris:[o]});i=l?.client_id,r=l?.client_secret}catch(e){}let d=(0,tK.generateCodeVerifier)(),m=await (0,tK.generateCodeChallenge)(d),h=crypto.randomUUID(),x=l?.filter(e=>e.trim()).join(" "),p=(0,b.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:i,redirectUri:o,state:h,codeChallenge:m,scope:x}),g={state:h,codeVerifier:d,serverId:t,redirectUri:o,clientId:i,clientSecret:r,scopes:l};(0,tG.setSecureItem)(sA,JSON.stringify(g)),(0,tG.setSecureItem)("litellm-mcp-oauth-return-url",window.location.href),window.location.href=p}catch(t){let e=(0,tW.extractErrorMessage)(t);u(e),c("error"),N.default.error(e)}},[e,t,s,l,a,n]),g=(0,p.useCallback)(async()=>{if(m.current)return;let s=(0,tG.getSecureItem)(sI);if(!s)return;let l=(0,tG.getSecureItem)(sA);if(!l)return;let a=null;try{if((a=JSON.parse(l)).serverId&&a.serverId!==t)return}catch(e){}m.current=!0,(0,sS.clearStorage)(sI);let n=null,i=null;try{n=JSON.parse(s),i=a}catch(e){u("Failed to resume OAuth flow. Please retry."),c("error"),m.current=!1,(0,sS.clearStorage)(sA);return}try{if(!i?.state||!i.codeVerifier||!i.serverId)throw Error("OAuth session state was lost. Please retry.");if(!n?.state||n.state!==i.state)throw Error("OAuth state mismatch. Please retry.");if(n.error)throw Error(n.error_description||n.error);if(!n.code)throw Error("Authorization code missing in callback.");c("exchanging");let t=await (0,b.exchangeMcpOAuthToken)({serverId:i.serverId,code:n.code,clientId:i.clientId,clientSecret:i.clientSecret,codeVerifier:i.codeVerifier,redirectUri:i.redirectUri,accessToken:e});(0,eC.setToken)(i.serverId,{access_token:t.access_token,expires_in:t.expires_in,refresh_token:t.refresh_token,token_type:t.token_type},r),c("success"),u(null),N.default.success("Connected successfully"),h.current(t.access_token)}catch(t){let e=(0,tW.extractErrorMessage)(t);u(e),c("error"),N.default.error(e)}finally{(0,sS.clearStorage)(sA),setTimeout(()=>{m.current=!1},1e3)}},[e,t,r]);return(0,p.useEffect)(()=>{g()},[g]),{startOAuthFlow:x,status:o,error:d}})({accessToken:s??"",serverId:e,serverAlias:x,userId:h,gatewayMintsClient:(0,eT.gatewayMintsClientFor)({auth_type:r,dcr_bridge:d}),onSuccess:L}),{data:H,isLoading:D,isError:V,refetch:B}=(0,g.useQuery)({queryKey:["mcpOauthUserCredStatus",e,h],queryFn:()=>(0,b.getMCPOAuthUserCredentialStatus)(s??"",e),enabled:!!s&&F,staleTime:3e4}),q=!!H?.has_credential,$=F&&!D&&(V||!!H&&!q),W=F&&D,K=f&&f.length>0,G=()=>{let e={};if(M&&E&&Object.assign(e,sT(x,E)),x&&K){let t=sC(x);t&&Object.entries(S).forEach(([s,r])=>{r&&r.trim()&&(e[`x-mcp-${t}-${s.toLowerCase()}`]=r)})}return Object.keys(e).length>0?e:void 0},{data:Y,isLoading:J,error:Q,refetch:Z}=(0,g.useQuery)({queryKey:["mcpTools",e,S,E],queryFn:async()=>{if(!s)throw Error("Access Token required");let t=await (0,b.listMCPTools)(s,e,G());if(t?.error){let s=t.status;401===s&&(0,eC.removeToken)(e,h);let r=Error(t.message||t.error||"Failed to fetch MCP tools");throw r.status=s,r.statusText=t.statusText,r.details=t.details,r}return t},enabled:!!s&&(M?null!==E:!F||q),staleTime:3e4,retry:(e,t)=>t?.status!==401&&t?.response?.status!==401&&e<2}),X=(0,p.useCallback)(()=>{B(),Z()},[B,Z]),{startOAuthFlow:ee,status:et,error:es}=(0,sO.useUserMcpOAuthFlow)({accessToken:s??"",serverId:e,serverAlias:x,onSuccess:X}),er=(0,p.useCallback)(()=>{try{(0,tG.setSecureItem)(sS.TOOLS_OAUTH_UI_STATE_KEY,JSON.stringify({serverId:e}))}catch(e){}ee()},[e,ee]);(0,p.useEffect)(()=>{401===(Q?.status??Q?.response?.status)&&((0,eC.removeToken)(e,h),L(null))},[Q,e,h]);let{mutate:el,isPending:ea}=(0,sb.useMutation)({mutationFn:async t=>{if(!s)throw Error("Access Token required");try{return await (0,b.callMCPTool)(s,e,t.tool.name,t.arguments,{customHeaders:G()})}catch(e){throw e}},onSuccess:e=>{_(e.content),k(null)},onError:t=>{k(t),_(null),(t?.status===401||t?.response?.status===401)&&((0,eC.removeToken)(e,h),L(null))}}),en=Y?.tools||[],ei=F&&(Q?.status??Q?.response?.status)===401,eo=M&&!E||$||ei,ed=J||W,eu=en.filter(e=>{let t=C.toLowerCase();return e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)||e.mcp_info.server_name&&e.mcp_info.server_name.toLowerCase().includes(t)});return(0,t.jsx)("div",{className:"w-full p-4",children:(0,t.jsx)(eJ.Card,{className:"w-full overflow-hidden rounded-xl shadow-md",children:(0,t.jsxs)("div",{className:"grid h-auto w-full grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{className:"col-span-1 flex flex-col bg-muted p-4",children:[(0,t.jsx)("h2",{className:"mt-2 mb-6 text-xl font-semibold",children:"MCP Tools"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[K&&(0,t.jsxs)("div",{className:"mb-4 rounded-lg border border-border bg-card p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(sM.default,{className:"mr-2 size-4 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Additional Headers"})]}),(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:()=>O(!I),children:I?"Hide":"Configure"})]}),!I&&0===Object.keys(S).length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:'This server requires additional headers. Click "Configure" to provide values.'}),I&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[f?.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"mb-1 block text-xs font-medium",children:e}),(0,t.jsxs)(o.InputGroup,{className:"w-full",children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(sM.default,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(o.InputGroupInput,{placeholder:`Enter ${e}`,value:S[e]||"",onChange:t=>{A({...S,[e]:t.target.value})}})]})]},e)),(0,t.jsx)(i.Button,{size:"sm",onClick:()=>{Z(),O(!1)},disabled:Object.values(S).every(e=>!e||!e.trim()),className:"mt-2 w-full",children:"Load Tools"})]}),!I&&Object.keys(S).length>0&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("p",{className:"flex items-center text-xs text-muted-foreground",children:[(0,t.jsx)("span",{className:"mr-2 inline-block size-2 rounded-full bg-green-500"}),Object.keys(S).length," header(s) configured"]})})]}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)("p",{className:"mb-3 flex items-center text-sm font-medium",children:[(0,t.jsx)(eY.Wrench,{className:"mr-2 size-4"})," Available Tools",en.length>0&&(0,t.jsx)(n.Badge,{variant:"secondary",className:"ml-2",children:en.length})]}),M&&!E&&(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-card p-4 text-center",children:[(0,t.jsx)(sF.Lock,{className:"mx-auto mb-2 size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"mb-1 text-xs font-medium",children:"Authentication required"}),(0,t.jsx)("p",{className:"mb-3 text-xs text-muted-foreground",children:"Authenticate to view available tools"}),(0,t.jsx)(i.Button,{size:"sm",onClick:R,disabled:!s||"authorizing"===U||"exchanging"===U,children:"Authorize"}),z&&(0,t.jsx)("p",{className:"mt-2 text-xs text-destructive",children:z})]}),($||ei)&&(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-card p-4 text-center",children:[(0,t.jsx)(sF.Lock,{className:"mx-auto mb-2 size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"mb-1 text-xs font-medium",children:"Authentication required"}),(0,t.jsx)("p",{className:"mb-3 text-xs text-muted-foreground",children:"Authenticate with the upstream provider to view available tools"}),(0,t.jsx)(i.Button,{size:"sm",onClick:er,disabled:!s||"authorizing"===et||"exchanging"===et,children:"Authorize"}),es&&(0,t.jsx)("p",{className:"mt-2 text-xs text-destructive",children:es})]}),eo?null:(0,t.jsxs)(t.Fragment,{children:[en.length>0&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)(o.InputGroup,{className:"w-full",children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(a.Search,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(o.InputGroupInput,{placeholder:"Search tools...",value:C,onChange:e=>T(e.target.value)})]})}),ed&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-lg border border-border bg-card py-8",children:[(0,t.jsx)(m.UiLoadingSpinner,{className:"mb-3 size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-xs font-medium",children:"Loading tools..."})]}),(Y?.error||Q)&&!ed&&!en.length&&(0,t.jsx)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/5 p-3 text-xs text-destructive",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",Y?.message||Q?.message]})}),!ed&&!Y?.error&&!Q&&(!en||0===en.length)&&(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-card p-4 text-center",children:[(0,t.jsx)("div",{className:"mx-auto mb-2 flex size-8 items-center justify-center rounded-full bg-muted",children:(0,t.jsx)("svg",{className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 8.172V5L8 4z"})})}),(0,t.jsx)("p",{className:"mb-1 text-xs font-medium",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No tools found for this server"})]}),!ed&&!Y?.error&&en.length>0&&(0,t.jsx)(t.Fragment,{children:0===eu.length?(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-card p-4 text-center",children:[(0,t.jsx)(a.Search,{className:"mx-auto mb-2 size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"mb-1 text-xs font-medium",children:"No tools found"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:['No tools match "',C,'"']})]}):(0,t.jsx)("div",{className:"mcp-tools-scrollable max-h-100 min-h-0 flex-1 space-y-2 overflow-y-auto",children:eu.map(e=>(0,t.jsxs)("div",{className:(0,ec.cn)("cursor-pointer rounded-lg border p-3 transition-all hover:shadow-xs",j?.name===e.name?"border-primary bg-accent ring-1 ring-ring":"border-border bg-card"),onClick:()=>{v(e),_(null),k(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:(0,sy.resolveLogoSrc)(e.mcp_info.logo_url),alt:`${e.mcp_info.server_name} logo`,className:"w-4 h-4 object-contain shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,t.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"mt-1 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description})]})]}),j?.name===e.name&&(0,t.jsx)("div",{className:"mt-2 border-t border-border pt-2",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-primary",children:[(0,t.jsx)("svg",{className:"w-3 h-3 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Selected"]})})]},e.name))})})]})]})]})]}),(0,t.jsxs)("div",{className:"col-span-3 flex flex-col",children:[(0,t.jsx)("div",{className:"flex items-center justify-between border-b border-border p-4",children:(0,t.jsx)("h2",{className:"mb-0 text-xl font-semibold",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:j?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(sk,{tool:j,onSubmit:e=>{el({tool:j,arguments:e})},result:y,error:w,isLoading:ea,onClose:()=>v(null)})}):(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-muted-foreground",children:[(0,t.jsx)(sP.Bot,{className:"mb-4 size-12"}),(0,t.jsx)("p",{className:"mb-2 text-lg font-medium",children:"Select a Tool to Test"}),(0,t.jsx)("p",{className:"max-w-md text-center text-sm",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})},sL=[eT.AUTH_TYPE.API_KEY,eT.AUTH_TYPE.BEARER_TOKEN,eT.AUTH_TYPE.TOKEN,eT.AUTH_TYPE.BASIC],sR=[...sL,eT.AUTH_TYPE.OAUTH2,eT.AUTH_TYPE.OAUTH2_TOKEN_EXCHANGE,eT.AUTH_TYPE.OAUTH2_ID_JAG,eT.AUTH_TYPE.AWS_SIGV4,eT.AUTH_TYPE.TRUE_PASSTHROUGH,eT.AUTH_TYPE.OAUTH_DELEGATE],sU="litellm-mcp-oauth-edit-state",sz=({mcpServer:e,accessToken:s,userID:r,onCancel:l,onSuccess:a,availableAccessGroups:n})=>{let[i]=$.Form.useForm(),[o,c]=(0,p.useState)({}),[d,u]=(0,p.useState)([]),[m,h]=(0,p.useState)(!1),[x,g]=(0,p.useState)(null),[f,j]=(0,p.useState)(""),[v,y]=(0,p.useState)(!1),[_,w]=(0,p.useState)(!1),[k,C]=(0,p.useState)(!1),[T,S]=(0,p.useState)([]),[A,I]=(0,p.useState)(!1),[O,P]=(0,p.useState)({}),[M,F]=(0,p.useState)({}),[E,L]=(0,p.useState)(null),[R,U]=(0,p.useState)(e.mcp_info?.logo_url||void 0),z=$.Form.useWatch("auth_type",i),H=$.Form.useWatch("transport",i),V="stdio"===H,B=H===eT.TRANSPORT.OPENAPI,q=!!z&&sL.includes(z),K=z===eT.AUTH_TYPE.OAUTH2,G=z===eT.AUTH_TYPE.OAUTH2_TOKEN_EXCHANGE,Y=z===eT.AUTH_TYPE.OAUTH2_ID_JAG,J=z===eT.AUTH_TYPE.AWS_SIGV4,Q=$.Form.useWatch("oauth_flow_type",i),Z=K&&Q===eT.OAUTH_FLOW.M2M,X=$.Form.useWatch("delegate_auth_to_upstream",i)??!!e.delegate_auth_to_upstream,ee=$.Form.useWatch("url",i),et=$.Form.useWatch("spec_path",i),es=$.Form.useWatch("server_name",i),er=$.Form.useWatch("auth_type",i),el=$.Form.useWatch("static_headers",i),ea=$.Form.useWatch("credentials",i),en=$.Form.useWatch("issuer",i),ei=$.Form.useWatch("authorization_url",i),eo=$.Form.useWatch("token_url",i),ec=$.Form.useWatch("registration_url",i),ed=!!e.mcp_info?.tool_allowlist_enforced||(e.allowed_tools?.length??0)>0,eu=ed?e.allowed_tools??[]:null,em=()=>i.getFieldValue("auth_type")??e.auth_type,eh=p.default.useRef(void 0),{startOAuthFlow:ex,status:ep,error:eg,tokenResponse:ef,reset:ej}=tY({accessToken:s,getCredentials:()=>i.getFieldValue("credentials"),getTemporaryPayload:()=>{let t=i.getFieldsValue(!0),s=t.url||e.url,r=t.transport||e.transport;if(!s||!r)return null;let l=Array.isArray(t.static_headers)?t.static_headers.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=(t?.value??"").trim()),e},{}):{};return{server_id:e.server_id,server_name:t.server_name||e.server_name||e.alias,alias:t.alias||e.alias,description:t.description||e.description,url:s,transport:r,auth_type:(0,eT.isClientForwardedTokenMode)(t.auth_type)?t.auth_type:eT.AUTH_TYPE.OAUTH2,credentials:(0,eT.isClientForwardedTokenMode)(t.auth_type)?(0,eT.preservedAdminCredentials)(t.credentials):t.credentials,mcp_access_groups:t.mcp_access_groups||e.mcp_access_groups,static_headers:l,command:t.command,args:t.args,env:t.env}},onTokenReceived:t=>{if(!t?.access_token)return;if(eh.current=(0,eT.getOAuthAuthorizationIdentity)(i.getFieldsValue(!0)),(0,eT.isClientForwardedTokenMode)(em())){let s={access_token:t.access_token,expires_in:t.expires_in,refresh_token:t.refresh_token,token_type:t.token_type};(0,eC.setToken)(e.server_id,s,r),N.default.success("Token held for this browser session. Tools can now be loaded and configured; the token is not saved to LiteLLM.");return}let s=i.getFieldValue("credentials")??{},l={...(0,eT.preservedAdminCredentials)(s)??{},...void 0!==s.scopes&&{scopes:s.scopes},access_token:t.access_token,...t.refresh_token&&{refresh_token:t.refresh_token},...t.expires_in&&{expires_in:t.expires_in},...t.scope&&{scope:t.scope}};i.setFieldValue("credentials",l),eh.current=(0,eT.getOAuthAuthorizationIdentity)(i.getFieldsValue(!0)),N.default.success("OAuth authorization successful! Please click 'Update MCP Server' to save the credentials.")},onBeforeRedirect:()=>{try{let t=i.getFieldsValue(!0);(0,tG.setSecureItem)(sU,JSON.stringify({serverId:e.server_id,formValues:t,costConfig:o,allowedTools:T,hasToolAllowlistInteraction:A,searchValue:f,aliasManuallyEdited:v}))}catch(e){console.warn("Failed to persist MCP edit state",e)}},flowSource:"edit"}),e_=p.default.useMemo(()=>e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""})):[],[e.static_headers]),eN=p.default.useMemo(()=>Array.isArray(e.env_vars)?e.env_vars.map(e=>({name:e.name,value:e.value??"",scope:"user"===e.scope?"user":"global",description:e.description??""})):[],[e.env_vars]),ek=p.default.useMemo(()=>{let t=e.env??void 0;if(!t||0===Object.keys(t).length)return"";try{return JSON.stringify(t,null,2)}catch{return""}},[e.env]),eS=p.default.useMemo(()=>e.spec_path&&"stdio"!==e.transport?eT.TRANSPORT.OPENAPI:e.transport,[e]),eA=p.default.useMemo(()=>({...e,transport:eS,static_headers:e_,env_vars:eN,extra_headers:e.extra_headers||[],oauth_flow_type:(0,eT.oauth2FlowToFormValue)(e.oauth2_flow),dcr_bridge:!!e.dcr_bridge,token_validation_json:e.token_validation?JSON.stringify(e.token_validation,null,2):void 0}),[e,eS,e_,eN,ek]),eI=p.default.useRef(null);(0,p.useEffect)(()=>{e.server_id&&eI.current!==e.server_id&&(eI.current=e.server_id,i.setFieldsValue(eA),C(!1),w(!1))},[e.server_id,eA,i]),(0,p.useEffect)(()=>{e.mcp_info?.mcp_server_cost_info&&c(e.mcp_info.mcp_server_cost_info)},[e]),(0,p.useEffect)(()=>{I(!1)},[e.server_id]),(0,p.useEffect)(()=>{ed&&S(e.allowed_tools??[]),P(tl(e.tool_name_to_display_name)),F(tl(e.tool_name_to_description))},[e,ed]),(0,p.useEffect)(()=>{let t=(0,tG.getSecureItem)(sU);if(t)try{let s=JSON.parse(t);if(!s||s.serverId!==e.server_id)return;if(s.formValues){let t=(0,eT.withoutMintedTokenCredentials)({...e.credentials??{},...s.formValues.credentials??{}}),r={...e,...s.formValues,credentials:t};L(r)}s.costConfig&&c(s.costConfig),s.allowedTools&&S(s.allowedTools),"boolean"==typeof s.hasToolAllowlistInteraction&&I(s.hasToolAllowlistInteraction),s.searchValue&&j(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&y(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(sU)}},[i,e]),(0,p.useEffect)(()=>{if(!E)return;let t=E.transport||e.transport;t&&t!==i.getFieldValue("transport")?i.setFieldsValue({transport:t}):(i.setFieldsValue(E),L(null))},[E,i,e.transport,H]),(0,p.useEffect)(()=>{if(e.mcp_access_groups){let t=e.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));i.setFieldValue("mcp_access_groups",t)}},[e]),(0,p.useEffect)(()=>{e.server_id&&""!==e.server_id.trim()&&eF()},[e,s,r,ef?.access_token]);let eO=(t={})=>{eh.current=void 0,e.server_id&&(0,eC.removeToken)(e.server_id,r),u([]),ej();let s=(0,eT.preservedAdminCredentials)(i.getFieldValue("credentials"));i.resetFields([...eT.CLEARED_ON_INVALIDATION]),s&&i.setFieldsValue({credentials:s});let l=Object.fromEntries(eT.CLEARED_ON_INVALIDATION.filter(e=>e in t).map(e=>[e,t[e]]));Object.keys(l).length>0&&i.setFieldsValue(l)},eP=async(t,r)=>{let l=t||r||em()!==eT.AUTH_TYPE.OAUTH2?void 0:ef?.access_token;if(!l)return!1;h(!0),g(null);try{let t=i.getFieldsValue(!0),r=t.transport||e.transport,a={server_id:e.server_id,server_name:t.server_name||e.server_name||e.alias,url:t.url||e.url,spec_path:t.spec_path||e.spec_path,transport:r===eT.TRANSPORT.OPENAPI?eT.TRANSPORT.HTTP:r,auth_type:eT.AUTH_TYPE.OAUTH2,oauth2_flow:eT.MCP_OAUTH2_FLOW_INTERACTIVE,issuer:t.issuer,authorization_url:t.authorization_url,token_url:t.token_url,registration_url:t.registration_url},n=await (0,b.testMCPToolsListRequest)(s,a,l);n.tools&&!n.error?u(n.tools):(u([]),g(n.message||"Failed to load tools"))}catch(e){u([]),g(e instanceof Error?e.message:"Failed to load tools")}finally{h(!1)}return!0},eF=async()=>{let t;if(!s||!e.server_id)return;let l="passthrough"===(0,eT.getMcpOAuthMode)({auth_type:e.auth_type,oauth2_flow:e.oauth2_flow,delegate_auth_to_upstream:e.delegate_auth_to_upstream}),a=(0,eT.isClientForwardedTokenMode)(em());if(!await eP(l,a)){if(l||a){let s=ef?.access_token??((0,eC.isTokenValid)(e.server_id,r)?(0,eC.getToken)(e.server_id,r)?.access_token??null:null);if(!s){u([]),g(a?"Authorize with the upstream (browser-only, in the Authentication section) to load and configure this server's tools.":"Authenticate with this server in the Tools tab to load and configure its tools.");return}t=sT(e.alias,s)}h(!0),g(null);try{let r=await (0,b.listMCPTools)(s,e.server_id,t,!0);r.tools&&!r.error?u(r.tools):(u([]),g(r.message||"Failed to load tools"))}catch(e){u([]),g(e instanceof Error?e.message:"Failed to load tools")}finally{h(!1)}}},eE=async t=>{if(!s)return;let l=Object.entries(O).find(([,e])=>e&&!ts.test(e));if(l)return void N.default.fromBackend(`Tool display name "${l[1]}" is invalid. Only letters, digits, underscores, and hyphens are allowed (no spaces).`);try{let l,n,{static_headers:i,env_vars:c,credentials:d,stdio_config:u,env_json:m,command:h,args:x,allow_all_keys:p,available_on_public_internet:g,delegate_auth_to_upstream:f,oauth_passthrough:j,dcr_bridge:v,token_validation_json:y,...w}=t,k=(w.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),S=Array.isArray(i)?i.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=(t?.value??"").trim()),e},{}):{},I=tr(c),P=d&&"object"==typeof d?Object.entries(d).reduce((e,[t,s])=>{if(null==s||""===s)return""===s&&eT.ADMIN_CONFIG_CREDENTIAL_KEYS.includes(t)&&(e[t]=null),e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,F={};if("stdio"===w.transport)if(u)try{let e=JSON.parse(u),t=e;if(e?.mcpServers&&"object"==typeof e.mcpServers){let s=Object.keys(e.mcpServers);s.length>0&&(t=e.mcpServers[s[0]])}let s=Array.isArray(t?.args)?t.args.map(e=>String(e)).filter(e=>""!==e.trim()):[],r=t?.env&&"object"==typeof t.env&&!Array.isArray(t.env)?Object.entries(t.env).reduce((e,[t,s])=>(null==t||""===String(t).trim()||(e[String(t)]=null==s?"":String(s)),e),{}):{};if(!(F={command:t?.command?String(t.command):void 0,args:s,env:r}).command)return void N.default.fromBackend("Stdio configuration must include a command")}catch{N.default.fromBackend("Invalid JSON in stdio configuration");return}else{let e={};if(m)try{let t=JSON.parse(m);t&&"object"==typeof t&&!Array.isArray(t)&&(e=Object.entries(t).reduce((e,[t,s])=>(null==t||""===String(t).trim()||(e[String(t)]=null==s?"":String(s)),e),{}))}catch{N.default.fromBackend("Invalid JSON in stdio env configuration");return}let t=Array.isArray(x)?x.map(e=>String(e)).filter(e=>""!==e.trim()):[],s=h?String(h).trim():"";if(!s)return void N.default.fromBackend("Stdio transport requires a command");F={command:s,args:t,env:e}}w.transport===eT.TRANSPORT.OPENAPI&&(w.transport="http");let E=null;if(y&&""!==y.trim())try{E=JSON.parse(y)}catch{N.default.fromBackend("Invalid JSON in Token Validation Rules");return}let L=w.server_name||w.url||e.server_name||e.url||w.alias||e.alias||"unknown",U=ed||A||T.length>0,z={...w,...F,stdio_config:void 0,env_json:void 0,...e.auth_type===eT.AUTH_TYPE.OAUTH2&&w.auth_type!==eT.AUTH_TYPE.OAUTH2?{issuer:null,authorization_url:null,token_url:null,registration_url:null}:{},...e.auth_type===eT.AUTH_TYPE.OAUTH2_TOKEN_EXCHANGE&&w.auth_type!==eT.AUTH_TYPE.OAUTH2_TOKEN_EXCHANGE?{token_exchange_endpoint:null,audience:null,subject_token_type:null,token_exchange_profile:null}:{},server_id:e.server_id,mcp_info:{...e.mcp_info??{},server_name:L,description:w.description,logo_url:R||void 0,mcp_server_cost_info:Object.keys(o).length>0?o:null,tool_allowlist_enforced:U},mcp_access_groups:k,alias:w.alias,extra_headers:w.extra_headers||[],...U?{allowed_tools:T}:{},tool_name_to_display_name:Object.keys(O).length>0?O:null,tool_name_to_description:Object.keys(M).length>0?M:null,disallowed_tools:w.disallowed_tools||[],static_headers:S,env_vars:I,allow_all_keys:!!(p??e.allow_all_keys),available_on_public_internet:!!(g??e.available_on_public_internet),delegate_auth_to_upstream:w.auth_type===eT.AUTH_TYPE.OAUTH2&&!!(f??e.delegate_auth_to_upstream),oauth_passthrough:(l=w.auth_type===eT.AUTH_TYPE.NONE||null==w.auth_type,n=(Array.isArray(w.extra_headers)?w.extra_headers:[]).some(e=>"string"==typeof e&&"authorization"===e.toLowerCase()),!!l&&!!n&&!!(j??e.oauth_passthrough)),dcr_bridge:!!(0,eT.isClientForwardedTokenMode)(w.auth_type)&&!!(v??e.dcr_bridge),...w.auth_type===eT.AUTH_TYPE.OAUTH2&&w.oauth_flow_type?{oauth2_flow:w.oauth_flow_type===eT.OAUTH_FLOW.M2M?eT.MCP_OAUTH2_FLOW_M2M:eT.MCP_OAUTH2_FLOW_INTERACTIVE}:{},...null!==E||e.token_validation?{token_validation:E}:{}},H=w.auth_type&&sR.includes(w.auth_type),D=(0,eT.isClientForwardedTokenMode)(w.auth_type)?(0,eT.preservedAdminCredentials)(P):P;H&&D&&Object.keys(D).length>0&&(z.credentials=D),_&&(0,eT.isClientForwardedTokenMode)(w.auth_type)&&(z.credentials={client_id:null,client_secret:null});let V=await (0,b.updateMCPServer)(s,z);if(ef?.access_token){let t=(0,eT.getMcpOAuthMode)({auth_type:w.auth_type,oauth2_flow:Z?eT.MCP_OAUTH2_FLOW_M2M:null,delegate_auth_to_upstream:!!(f??e.delegate_auth_to_upstream)});try{if("authorization_code"===t){let t=ef.scope,r={access_token:ef.access_token,refresh_token:ef.refresh_token,expires_in:ef.expires_in,scopes:"string"==typeof t&&t?t.split(" "):void 0};await (0,b.storeMCPOAuthUserCredential)(s,e.server_id,r)}else if("passthrough"===t||(0,eT.isClientForwardedTokenMode)(w.auth_type)){let t={access_token:ef.access_token,expires_in:ef.expires_in,refresh_token:ef.refresh_token,token_type:ef.token_type};(0,eC.setToken)(e.server_id,t,r)}}catch(t){let e=t instanceof Error?t.message:"";N.default.fromBackend("MCP Server updated, but failed to persist OAuth token"+(e?`: ${e}`:""));return}}N.default.success("MCP Server updated successfully"),C(!1),a(V)}catch(e){N.default.fromBackend("Failed to update MCP Server"+(e?.message?`: ${e.message}`:""))}};return(0,t.jsxs)(t3.TabGroup,{children:[(0,t.jsxs)(t6.TabList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(t7.Tab,{children:"Server Configuration"}),(0,t.jsx)(t7.Tab,{children:"Cost Configuration"})]}),(0,t.jsxs)(t5.TabPanels,{className:"mt-6",children:[(0,t.jsx)(t4.TabPanel,{children:(0,t.jsxs)($.Form,{form:i,onFinish:eE,onValuesChange:e=>{if("credentials"in e)C(!1);else{let t=["url","spec_path","issuer","authorization_url","token_url","registration_url"].some(t=>t in e),s=void 0!==(0,eT.preservedDeclaredAppCredentials)(i.getFieldValue("credentials"));t&&s&&C(!0)}(0,eT.isHeldOAuthTokenStale)(i.getFieldsValue(!0),eh.current)&&eO(e)},initialValues:eA,layout:"vertical",children:[(0,t.jsx)($.Form.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,t)=>tt(t)}],children:(0,t.jsx)(W.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:"Alias",name:"alias",rules:[{validator:(e,t)=>tt(t)}],children:(0,t.jsx)(W.Input,{onChange:()=>y(!0),className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(W.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(tH,{value:R,onChange:U}),(0,t.jsx)($.Form.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(eb.Select,{onChange:e=>{"stdio"===e?i.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0,issuer:void 0,authorization_url:void 0,token_url:void 0,registration_url:void 0}):e===eT.TRANSPORT.OPENAPI?i.setFieldsValue({url:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0}):i.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0}),(0,eT.isHeldOAuthTokenStale)(i.getFieldsValue(!0),eh.current)&&eO()},children:[(0,t.jsx)(eb.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(eb.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(eb.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(eb.Select.Option,{value:eT.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),!V&&!B&&(0,t.jsx)($.Form.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>te(t)}],children:(0,t.jsx)(W.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),B&&(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OpenAPI Spec URL",(0,t.jsx)(ev.Tooltip,{title:"URL to an OpenAPI specification (JSON or YAML). MCP tools will be automatically generated from the API endpoints defined in the spec.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"spec_path",rules:[{required:!0,message:"Please enter an OpenAPI spec URL"}],children:(0,t.jsx)(W.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Max Concurrent Requests (optional)",(0,t.jsx)(ev.Tooltip,{title:"Maximum number of tool calls LiteLLM will run against this server at the same time. Additional calls wait for a free slot. Leave blank for no limit.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"max_concurrent_requests",children:(0,t.jsx)(ey.InputNumber,{min:1,precision:0,placeholder:"e.g. 10",style:{width:"100%"},className:"rounded-lg"})}),!V&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Form.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(eb.Select,{virtual:!1,children:[(0,t.jsx)(eb.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(eb.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(eb.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(eb.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(eb.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(eb.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(eb.Select.Option,{value:"oauth2_token_exchange",children:"OAuth Token Exchange (OBO)"}),(0,t.jsx)(eb.Select.Option,{value:"oauth2_id_jag",children:"ID-JAG (Okta Cross App Access)"}),(0,t.jsx)(eb.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"}),(0,t.jsx)(eb.Select.Option,{value:"true_passthrough",children:"True Passthrough (no LiteLLM auth)"}),(0,t.jsx)(eb.Select.Option,{value:"oauth_delegate",children:"OAuth Delegate (client-supplied upstream token)"})]})}),(0,t.jsx)(eL,{authType:z}),(0,t.jsx)(eH,{authType:z,oauthFlow:{startOAuthFlow:ex,status:ep,error:eg,tokenResponse:ef},isEditing:!0,savedAuthType:e.auth_type,removeStoredApp:_,onRemoveStoredAppChange:w,appMayNotMatchUpstream:k})]}),V&&(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 p-4 space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure the stdio transport used to launch the MCP server process. You can either fill in the fields below or paste a JSON configuration."}),(0,t.jsx)($.Form.Item,{label:"Command",name:"command",rules:[{required:!0,message:"Please enter a command for stdio transport"}],children:(0,t.jsx)(W.Input,{placeholder:"e.g., npx",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:"Args",name:"args",children:(0,t.jsx)(eb.Select,{mode:"tags",size:"large",tokenSeparators:[","],placeholder:"Add args (press enter or comma)",className:"rounded-lg"})}),(0,t.jsx)($.Form.Item,{label:"Environment (JSON object)",name:"env_json",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if(e&&"object"==typeof e&&!Array.isArray(e))return Promise.resolve();return Promise.reject(Error("Env must be a JSON object"))}catch{return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(W.Input.TextArea,{rows:6,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm",placeholder:`{
+ "KEY": "value"
+}`})}),(0,t.jsx)(ti,{isVisible:!0,required:!1})]}),!V&&q&&(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(ev.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,t)=>t&&"string"==typeof t&&""===t.trim()?Promise.reject(Error("Authentication value cannot be empty")):Promise.resolve()}],children:(0,t.jsx)(W.Input.Password,{placeholder:"Enter token or secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!V&&K&&(0,t.jsxs)(t.Fragment,{children:[!Q&&!X&&(0,t.jsx)(to.Alert,{type:"warning",showIcon:!0,className:"mb-4 rounded-lg",message:"This server has no OAuth flow set",description:"Choose Machine-to-Machine (M2M) or Interactive (PKCE) so LiteLLM authenticates it the way you intend, then save. Until it is set, LiteLLM falls back to interactive per-user auth and treats a machine-to-machine credential shape conservatively."}),(0,t.jsx)(eM,{isM2M:Z,isEditing:!0,oauthFlow:{startOAuthFlow:ex,status:ep,error:eg,tokenResponse:ef}})]}),!V&&G&&(0,t.jsx)(eB,{isEditing:!0}),!V&&Y&&(0,t.jsx)(eW,{isEditing:!0}),!V&&J&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["For MCP servers hosted on AWS Bedrock AgentCore."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/mcp_aws_sigv4",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:"View docs →"})]}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(ev.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[],children:(0,t.jsx)(W.Input,{placeholder:"us-east-1 (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Service Name",(0,t.jsx)(ev.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(W.Input,{placeholder:"bedrock-agentcore (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Access Key ID",(0,t.jsx)(ev.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],rules:[],children:(0,t.jsx)(W.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Secret Access Key",(0,t.jsx)(ev.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],rules:[],children:(0,t.jsx)(W.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Token",(0,t.jsx)(ev.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(W.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Role ARN",(0,t.jsx)(ev.Tooltip,{title:"Optional. IAM role ARN to assume via STS before signing. If set, LiteLLM calls sts:AssumeRole to get temporary credentials.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(W.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)($.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Name",(0,t.jsx)(ev.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(ew.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(W.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(t$,{})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(th,{availableAccessGroups:n,mcpServer:e,searchValue:f,setSearchValue:j,getAccessGroupOptions:()=>{let e=n.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return f&&!n.some(e=>e.toLowerCase().includes(f.toLowerCase()))&&e.push({value:f,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:f}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(tn,{accessToken:s,formValues:{server_id:e.server_id,server_name:es??e.server_name,url:ee??e.url,spec_path:et??e.spec_path,transport:H??e.transport,auth_type:er??e.auth_type,mcp_info:e.mcp_info,oauth_flow_type:Q??(0,eT.oauth2FlowToFormValue)(e.oauth2_flow)??eT.OAUTH_FLOW.INTERACTIVE,static_headers:el??e.static_headers,credentials:ea,issuer:en??e.issuer,authorization_url:ei??e.authorization_url,token_url:eo??e.token_url,registration_url:ec??e.registration_url},allowedTools:T,existingAllowedTools:eu,hasToolAllowlistInteraction:A,isEditMode:!0,onAllowedToolsChange:S,onToolAllowlistInteraction:()=>I(!0),toolNameToDisplayName:O,toolNameToDescription:M,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:F,externalTools:d,externalIsLoading:m,externalError:x,externalCanFetch:!0})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eR.Button,{onClick:l,children:"Cancel"}),(0,t.jsx)(D.Button,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(t4.TabPanel,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(eX,{value:o,onChange:c,tools:d,disabled:m}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eR.Button,{onClick:l,children:"Cancel"}),(0,t.jsx)(D.Button,{onClick:()=>i.submit(),children:"Save Changes"})]})]})})]})]})},sH=({costConfig:e})=>{let s=e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null,r=e?.tool_name_to_cost_per_query&&Object.keys(e.tool_name_to_cost_per_query).length>0;return s||r?(0,t.jsx)("div",{className:"mt-6 border-t border-border pt-6",children:(0,t.jsxs)("div",{className:"space-y-4",children:[s&&e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"font-mono text-sm",children:["$",e.default_cost_per_query.toFixed(4)]})]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Tool-Specific Costs"}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:Object.entries(e.tool_name_to_cost_per_query).map(([e,s])=>null!=s&&(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg bg-muted p-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:["$",s.toFixed(4)," per query"]})]},e))})]}),(0,t.jsxs)("div",{className:"mt-4 rounded-lg border border-border bg-muted p-4",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[s&&e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["• Default cost: $",e.default_cost_per_query.toFixed(4)," per query"]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["• ",Object.keys(e.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 border-t border-border pt-6",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted p-4",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})},sD=({mcpServer:e,onBack:s,isEditing:r,isProxyAdmin:l,accessToken:a,userRole:o,userID:c,availableAccessGroups:u,initialTabIndex:m=0})=>{let h=function(e,t){if(!e)return!1;let s=(0,tG.getSecureItem)(sU);if(!s)return!1;try{return JSON.parse(s)?.serverId===t}catch{return!1}}(l,e.server_id),[x,g]=(0,p.useState)(r||h),[f,j]=(0,p.useState)(!1),[v,b]=(0,p.useState)({}),[y,_]=(0,p.useState)(h?2:m),N=e.url??"",{maskedUrl:w,hasToken:C}=N?e9(N):{maskedUrl:"—",hasToken:!1},T=(e,t)=>e?C?t?e:w:e:"—",S=async(e,t)=>{await (0,ed.copyToClipboard)(e)&&(b(e=>({...e,[t]:!0})),setTimeout(()=>{b(e=>({...e,[t]:!1}))},2e3))},A=e=>(0,t.jsx)(n.Badge,{variant:"outline",children:e.toUpperCase()}),I=e=>(0,t.jsx)(n.Badge,{variant:"outline",children:e});return(0,t.jsxs)("div",{className:"max-w-full p-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"mb-4",onClick:s,children:[(0,t.jsx)(sf.ArrowLeft,{}),"Back to All Servers"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:e.server_name||e.alias||"Unnamed Server"}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm","aria-label":"Copy server name",onClick:()=>S(e.server_name||e.alias,"mcp-server_name"),children:v["mcp-server_name"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(t8.CopyIcon,{size:12})}),e.alias&&e.server_name&&e.alias!==e.server_name&&(0,t.jsx)(n.Badge,{variant:"secondary",className:"ml-2 font-mono",children:e.alias})]}),(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-1.5",children:[(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:e.server_id}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm","aria-label":"Copy server id",onClick:()=>S(e.server_id,"mcp-server-id"),children:v["mcp-server-id"]?(0,t.jsx)(k.CheckIcon,{size:10}):(0,t.jsx)(t8.CopyIcon,{size:10})})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:e.description})]}),(0,t.jsxs)(d.Tabs,{value:String(y),onValueChange:e=>_(Number(e)),children:[(0,t.jsxs)(d.TabsList,{className:"mb-4",children:[(0,t.jsx)(d.TabsTrigger,{value:"0",className:"flex-none",children:"Overview"}),(0,t.jsx)(d.TabsTrigger,{value:"1",className:"flex-none",children:"MCP Tools"}),l&&(0,t.jsx)(d.TabsTrigger,{value:"2",className:"flex-none",children:"Settings"})]}),(0,t.jsxs)(d.TabsContent,{value:"0",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[(0,t.jsxs)(eJ.Card,{className:"p-4",children:[(0,t.jsx)("p",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:"Transport"}),(0,t.jsx)("div",{className:"mt-3",children:A((0,eT.handleTransport)(e.transport??void 0,e.spec_path??void 0))})]}),(0,t.jsxs)(eJ.Card,{className:"p-4",children:[(0,t.jsx)("p",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:"Authentication"}),(0,t.jsx)("div",{className:"mt-3",children:I((0,eT.handleAuth)(e.auth_type??void 0))})]}),(0,t.jsxs)(eJ.Card,{className:"p-4",children:[(0,t.jsx)("p",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:"Host URL"}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)("p",{className:"overflow-wrap-anywhere font-mono text-sm break-all",children:T(e.url,f)}),C&&l&&(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm","aria-label":f?"Hide full URL":"Show full URL",onClick:()=>j(!f),children:f?(0,t.jsx)(sv.EyeOff,{}):(0,t.jsx)(sj.Eye,{})})]})]})]}),(0,t.jsxs)(eJ.Card,{className:"mt-4 p-4",children:[(0,t.jsx)("p",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:"Cost Configuration"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(sH,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]}),(0,t.jsx)(d.TabsContent,{value:"1",children:(0,t.jsx)(sE,{serverId:e.server_id,accessToken:a,auth_type:e.auth_type,oauth2_flow:e.oauth2_flow,delegate_auth_to_upstream:e.delegate_auth_to_upstream,dcr_bridge:e.dcr_bridge,tokenUrl:e.token_url,userRole:o,userID:c,serverAlias:e.alias,extraHeaders:e.extra_headers})}),(0,t.jsx)(d.TabsContent,{value:"2",children:(0,t.jsxs)(eJ.Card,{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-lg font-medium",children:"MCP Server Settings"}),x?null:(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>g(!0),children:"Edit Settings"})]}),x?(0,t.jsx)(sz,{mcpServer:e,accessToken:a,userID:c,onCancel:()=>g(!1),onSuccess:e=>{g(!1),s()},availableAccessGroups:u}):(0,t.jsxs)("div",{className:"divide-y divide-border",children:[(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Server Name"}),(0,t.jsx)("div",{className:"col-span-2 text-sm",children:e.server_name||(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2 font-mono text-sm",children:e.alias||(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Description"}),(0,t.jsx)("div",{className:"col-span-2 text-sm",children:e.description||(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"URL"}),(0,t.jsxs)("div",{className:"col-span-2 flex items-center gap-2 font-mono text-sm break-all",children:[T(e.url,f),C&&(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm","aria-label":f?"Hide full URL":"Show full URL",onClick:()=>j(!f),children:f?(0,t.jsx)(sv.EyeOff,{}):(0,t.jsx)(sj.Eye,{})})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport"}),(0,t.jsx)("div",{className:"col-span-2",children:A((0,eT.handleTransport)(e.transport,e.spec_path))})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Authentication"}),(0,t.jsx)("div",{className:"col-span-2",children:I((0,eT.handleAuth)(e.auth_type))})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Extra Headers"}),(0,t.jsx)("div",{className:"col-span-2 text-sm",children:e.extra_headers&&e.extra_headers.length>0?e.extra_headers.join(", "):(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Allow All Keys"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allow_all_keys?(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled"]}):(0,t.jsx)(n.Badge,{variant:"outline",children:"Disabled"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Network Access"}),(0,t.jsx)("div",{className:"col-span-2",children:e.available_on_public_internet?(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal only"]})})]}),"oauth2"===(0,eT.handleAuth)(e.auth_type)&&(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Delegate Auth to Upstream"}),(0,t.jsx)("div",{className:"col-span-2",children:e.delegate_auth_to_upstream?(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled (PKCE passthrough)"]}):(0,t.jsx)(n.Badge,{variant:"outline",children:"Disabled"})})]}),"oauth2"!==(0,eT.handleAuth)(e.auth_type)&&Array.isArray(e.extra_headers)&&e.extra_headers.some(e=>"string"==typeof e&&"authorization"===e.toLowerCase())&&(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"OAuth Pass-through"}),(0,t.jsx)("div",{className:"col-span-2",children:e.oauth_passthrough?(0,t.jsxs)(n.Badge,{variant:"outline",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled"]}):(0,t.jsx)(n.Badge,{variant:"outline",children:"Disabled"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Access Groups"}),(0,t.jsx)("div",{className:"col-span-2",children:e.mcp_access_groups&&e.mcp_access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.mcp_access_groups.map((e,s)=>(0,t.jsx)(n.Badge,{variant:"secondary",children:"string"==typeof e?e:e?.name??""},s))}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allowed_tools&&e.allowed_tools.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.allowed_tools.map((e,s)=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"font-mono",children:e},s))}):(0,t.jsx)(n.Badge,{variant:"outline",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 py-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Cost"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsx)(sH,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]})]})})]})]})},sV=(0,v.createQueryKeys)("mcpSemanticFilterSettings"),sB=(0,v.createQueryKeys)("mcpSemanticFilterSettings");var sq=e.i(178654),s$=e.i(621192),sW=e.i(981339),sK=e.i(850627),sG=e.i(750113),sY=e.i(245704),sJ=e.i(987432),sQ=e.i(695411),sZ=e.i(875475),sZ=sZ,sX=e.i(992619);function s0({accessToken:e,testQuery:s,setTestQuery:r,testModel:l,setTestModel:a,isTesting:n,onTest:o,filterEnabled:c,testResult:u,testError:m,curlCommand:h}){let x=s&&l&&c,p=n||!x;return(0,t.jsxs)(eJ.Card,{className:"mb-4",children:[(0,t.jsx)(eJ.CardHeader,{children:(0,t.jsx)(eJ.CardTitle,{children:"Test Configuration"})}),(0,t.jsx)(eJ.CardContent,{children:(0,t.jsxs)(d.Tabs,{defaultValue:"test",children:[(0,t.jsxs)(d.TabsList,{children:[(0,t.jsx)(d.TabsTrigger,{value:"test",className:"flex-none",children:"Test"}),(0,t.jsx)(d.TabsTrigger,{value:"api",className:"flex-none",children:"API Usage"})]}),(0,t.jsx)(d.TabsContent,{value:"test",children:(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2 flex items-center gap-1.5 font-medium",children:[(0,t.jsx)(sZ.default,{className:"size-4"})," Test Query"]}),(0,t.jsx)(e6.Textarea,{className:"field-sizing-fixed",placeholder:"Enter a test query to see which tools would be selected...",value:s,onChange:e=>r(e.target.value),rows:4,disabled:n})]}),(0,t.jsx)("div",{children:(0,t.jsx)(sX.default,{accessToken:e||"",value:l,onChange:a,disabled:n,showLabel:!0,labelText:"Select Model"})}),(0,t.jsxs)(i.Button,{className:"w-full",onClick:o,disabled:p,children:[(0,t.jsx)(sZ.default,{}),"Test Filter"]}),!c&&(0,t.jsxs)(eE.Alert,{children:[(0,t.jsx)(eK.Info,{}),(0,t.jsx)(eE.AlertTitle,{children:"Semantic filtering is disabled"}),(0,t.jsx)(eE.AlertDescription,{children:"Enable semantic filtering and save settings to test the filter."})]}),m&&(0,t.jsxs)(eE.Alert,{variant:"destructive",className:"mb-4",children:[(0,t.jsx)(e2.CircleAlert,{}),(0,t.jsx)(eE.AlertTitle,{children:"Semantic filtering did not run"}),(0,t.jsx)(eE.AlertDescription,{children:m})]}),u&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"mb-2 text-base font-medium",children:"Results"}),(0,t.jsxs)(eE.Alert,{className:"mb-4",children:[(0,t.jsx)(eK.Info,{}),(0,t.jsxs)(eE.AlertTitle,{children:[u.selectedTools," of ",u.totalTools," tools selected"]}),(0,t.jsxs)(eE.AlertDescription,{children:[u.totalTools-u.selectedTools," tools filtered out"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 block font-medium",children:"Selected Tools:"}),(0,t.jsx)("ul",{className:"m-0 list-disc pl-5",children:u.tools.map((e,s)=>(0,t.jsx)("li",{className:"mb-1",children:(0,t.jsx)("span",{children:e})},s))}),u.selectedTools>u.tools.length&&(0,t.jsxs)("p",{className:"mt-2 block text-sm text-muted-foreground",children:["+",u.selectedTools-u.tools.length," more selected tools not shown"]})]})]})]})}),(0,t.jsx)(d.TabsContent,{value:"api",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)(t9.Code,{className:"size-4"}),(0,t.jsx)("p",{className:"font-medium",children:"API Usage"})]}),(0,t.jsx)("p",{className:"mb-2 block text-sm text-muted-foreground",children:"Use this curl command to test the semantic filter with your current configuration."}),(0,t.jsx)("p",{className:"mb-2 block font-medium",children:"Response headers to check:"}),(0,t.jsxs)("ul",{className:"mt-0 mr-0 mb-3 ml-0 list-disc pl-5",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{children:"x-litellm-semantic-filter: shows total tools → selected tools"}),(0,t.jsx)("span",{className:"block text-sm text-muted-foreground",children:"Example: 10→3"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{children:"x-litellm-semantic-filter-tools: CSV of selected tool names"}),(0,t.jsx)("span",{className:"block text-sm text-muted-foreground",children:"Example: wikipedia-fetch,github-search,slack-post"})]})]}),(0,t.jsx)("pre",{className:"m-0 overflow-auto rounded-sm bg-muted p-3 text-xs",children:h})]})})]})})]})}let s2=async({accessToken:e,testModel:t,testQuery:s,setIsTesting:r,setTestResult:l,setTestError:a})=>{if(!s||!t||!e)return void N.default.error("Please enter a query and select a model");r(!0),l(null),a(null);try{let{headers:r}=await (0,b.testMCPSemanticFilter)(e,t,s),a=(e=>{if(!e.filter)return null;let[t,s]=e.filter.split("->").map(Number);return{totalTools:t,selectedTools:s,tools:e.tools?e.tools.split(",").map(e=>e.trim()):[]}})(r);if(!a)return void N.default.warning("Semantic filter is not enabled or no tools were filtered");l(a),N.default.success("Semantic filter test completed successfully")}catch(e){console.error("Test failed:",e),a(e instanceof Error&&e.message?e.message:"Failed to test semantic filter"),N.default.error("Failed to test semantic filter")}finally{r(!1)}};function s1({accessToken:e}){var s;let r,{data:l,isLoading:a,isError:n,error:i}=(()=>{let{accessToken:e}=(0,y.default)();return(0,g.useQuery)({queryKey:sV.list({}),queryFn:async()=>await (0,b.getMCPSemanticFilterSettings)(e),enabled:!!e,staleTime:36e5,gcTime:36e5})})(),{mutate:o,isPending:c,error:d}=(s=e||"",r=(0,j.useQueryClient)(),(0,sb.useMutation)({mutationFn:async e=>{if(!s)throw Error("Access token is required");return(0,b.updateMCPSemanticFilterSettings)(s,e)},onSuccess:()=>{r.invalidateQueries({queryKey:sB.all})}})),[u]=$.Form.useForm(),[m,h]=(0,p.useState)(!1),[x,f]=(0,p.useState)(!1),[v,_]=(0,p.useState)([]),[w,k]=(0,p.useState)(!0),[C,T]=(0,p.useState)(""),[S,A]=(0,p.useState)("gpt-4o"),[I,O]=(0,p.useState)(null),[P,M]=(0,p.useState)(null),[F,E]=(0,p.useState)(!1),L=l?.field_schema,R=l?.values??{};(0,p.useEffect)(()=>{(async()=>{if(e)try{k(!0);let t=(await (0,sQ.fetchAvailableModels)(e)).filter(e=>"embedding"===e.mode);_(t)}catch(e){console.error("Error fetching embedding models:",e)}finally{k(!1)}})()},[e]),(0,p.useEffect)(()=>{R&&(u.setFieldsValue({enabled:R.enabled??!1,embedding_model:R.embedding_model??"text-embedding-3-small",top_k:R.top_k??10,similarity_threshold:R.similarity_threshold??.3}),f(!1))},[R,u]);let U=async()=>{try{let e=await u.validateFields();o(e,{onSuccess:()=>{f(!1),h(!0),setTimeout(()=>h(!1),3e3),N.default.success("Settings updated successfully. Changes will be applied across all pods within 10 seconds.")},onError:e=>{N.default.fromBackend(e)}})}catch(e){console.error("Form validation failed:",e)}},z=async()=>{e&&await s2({accessToken:e,testModel:S,testQuery:C,setIsTesting:E,setTestResult:O,setTestError:M})};return e?(0,t.jsx)("div",{style:{width:"100%"},children:a?(0,t.jsx)(sW.Skeleton,{active:!0}):n?(0,t.jsx)(to.Alert,{type:"error",message:"Could not load MCP Semantic Filter settings",description:i instanceof Error?i.message:void 0,style:{marginBottom:24}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(to.Alert,{type:"info",message:"Semantic Tool Filtering",description:"Filter MCP tools semantically based on query relevance. This reduces context window size and improves tool selection accuracy. Click 'Save Settings' to apply changes across all pods (takes effect within 10 seconds).",showIcon:!0,style:{marginBottom:24}}),m&&(0,t.jsx)(to.Alert,{type:"success",message:"Settings saved successfully",icon:(0,t.jsx)(sY.CheckCircleOutlined,{}),showIcon:!0,closable:!0,style:{marginBottom:16}}),d&&(0,t.jsx)(to.Alert,{type:"error",message:"Could not update settings",description:d instanceof Error?d.message:void 0,style:{marginBottom:16}}),(0,t.jsxs)(s$.Row,{gutter:24,children:[(0,t.jsx)(sq.Col,{xs:24,lg:12,children:(0,t.jsxs)($.Form,{form:u,layout:"vertical",disabled:c,onValuesChange:()=>{f(!0)},children:[(0,t.jsxs)(t1.Card,{style:{marginBottom:16},children:[(0,t.jsx)($.Form.Item,{name:"enabled",label:(0,t.jsxs)(tc.Space,{children:[(0,t.jsx)(tD.Typography.Text,{strong:!0,children:"Enable Semantic Filtering"}),(0,t.jsx)(ev.Tooltip,{title:"When enabled, only the most relevant MCP tools will be included in requests based on semantic similarity",children:(0,t.jsx)(sG.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),valuePropName:"checked",children:(0,t.jsx)(e_.Switch,{disabled:c})}),(0,t.jsx)(tD.Typography.Text,{type:"secondary",style:{display:"block",marginTop:-16,marginBottom:16},children:L?.properties?.enabled?.description})]}),(0,t.jsxs)(t1.Card,{title:"Configuration",style:{marginBottom:16},children:[(0,t.jsx)($.Form.Item,{name:"embedding_model",label:(0,t.jsxs)(tc.Space,{children:[(0,t.jsx)(tD.Typography.Text,{strong:!0,children:"Embedding Model"}),(0,t.jsx)(ev.Tooltip,{title:"The model used to generate embeddings for semantic matching",children:(0,t.jsx)(sG.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(eb.Select,{options:v.map(e=>({label:e.model_group,value:e.model_group})),placeholder:w?"Loading models...":"Select embedding model",showSearch:!0,disabled:c||w,loading:w,notFoundContent:w?"Loading...":"No embedding models available"})}),(0,t.jsx)($.Form.Item,{name:"top_k",label:(0,t.jsxs)(tc.Space,{children:[(0,t.jsx)(tD.Typography.Text,{strong:!0,children:"Top K Results"}),(0,t.jsx)(ev.Tooltip,{title:"Maximum number of tools to return after filtering",children:(0,t.jsx)(sG.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(ey.InputNumber,{min:1,max:100,style:{width:"100%"},disabled:c})}),(0,t.jsx)($.Form.Item,{name:"similarity_threshold",label:(0,t.jsxs)(tc.Space,{children:[(0,t.jsx)(tD.Typography.Text,{strong:!0,children:"Similarity Threshold"}),(0,t.jsx)(ev.Tooltip,{title:"Minimum similarity score (0-1) for a tool to be included",children:(0,t.jsx)(sG.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(sK.Slider,{min:0,max:1,step:.05,marks:{0:"0.0",.3:"0.3",.5:"0.5",.7:"0.7",1:"1.0"},disabled:c})})]}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,t.jsx)(eR.Button,{type:"primary",icon:(0,t.jsx)(sJ.SaveOutlined,{}),onClick:U,loading:c,disabled:!x,children:"Save Settings"})})]})}),(0,t.jsx)(sq.Col,{xs:24,lg:12,children:(0,t.jsx)(s0,{accessToken:e,testQuery:C,setTestQuery:T,testModel:S,setTestModel:A,isTesting:F,onTest:z,filterEnabled:!!R.enabled,testResult:I,testError:P,curlCommand:`curl --location 'http://localhost:4000/v1/responses' \\
+--header 'Content-Type: application/json' \\
+--header 'Authorization: Bearer sk-1234' \\
+--data '{
+ "model": "${S}",
+ "input": [
+ {
+ "role": "user",
+ "content": "${C||"Your query here"}",
+ "type": "message"
+ }
+ ],
+ "tools": [
+ {
+ "type": "mcp",
+ "server_url": "litellm_proxy",
+ "require_approval": "never"
+ }
+ ],
+ "tool_choice": "required"
+}'`})})]})]})}):(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Please log in to configure semantic filter settings."})}var s4=e.i(251854),s4=s4,s5=e.i(107233),s3=e.i(37727),s6=e.i(541202);let s7=({accessToken:e})=>{let s,[r,l]=(0,p.useState)(!0),[a,o]=(0,p.useState)(!1),[c,d]=(0,p.useState)([]),[u,h]=(0,p.useState)(null),[x,g]=(0,p.useState)("");(0,p.useEffect)(()=>{f(),j()},[e]);let f=async()=>{if(e){l(!0);try{for(let t of(await (0,b.getGeneralSettingsCall)(e)))"mcp_internal_ip_ranges"===t.field_name&&t.field_value&&d(t.field_value)}catch(e){console.error("Failed to load MCP network settings:",e)}finally{l(!1)}}},j=async()=>{if(!e)return;let t=await (0,b.fetchMCPClientIp)(e);t&&h(t)},v=async()=>{if(e){o(!0);try{c.length>0?await (0,b.updateConfigFieldSetting)(e,"mcp_internal_ip_ranges",c):await (0,b.deleteConfigFieldSetting)(e,"mcp_internal_ip_ranges")}catch(e){console.error("Failed to save MCP network settings:",e)}finally{o(!1)}}},y=()=>{let e=x.split(",").map(e=>e.trim()).filter(e=>""!==e&&!c.includes(e));e.length>0&&d([...c,...e]),g("")};if(r)return(0,t.jsx)("div",{className:"flex justify-center py-12",children:(0,t.jsx)(m.UiLoadingSpinner,{className:"size-6 text-muted-foreground"})});let _=u?4!==(s=u.split(".")).length?u+"/32":`${s[0]}.${s[1]}.${s[2]}.0/24`:null;return(0,t.jsxs)("div",{className:"space-y-6 p-4",children:[(0,t.jsx)(s6.DeprecationBanner,{featureName:"MCP Network Settings and the internal-network-only flag"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-lg font-semibold",children:"Private IP Ranges"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:'Define which IP ranges are part of your private network. Callers from these IPs can see all MCP servers. Callers from any other IP can only see servers marked "Available on Public Internet".'})]}),(0,t.jsxs)(eJ.Card,{className:"p-6",children:[u&&(0,t.jsxs)("div",{className:"mb-4 rounded-lg bg-muted p-3",children:[(0,t.jsxs)("p",{className:"text-sm",children:["Your current IP: ",(0,t.jsx)("span",{className:"font-mono font-medium",children:u})]}),_&&!c.includes(_)&&(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm",children:"Suggested range: "}),(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",className:"font-mono",onClick:()=>{!c.includes(_)&&d([...c,_])},children:[(0,t.jsx)(s5.Plus,{}),_]})]})]}),(0,t.jsx)("div",{className:"mb-2 flex items-center",children:(0,t.jsx)("p",{className:"text-sm font-medium",children:"Your Private Network Ranges"})}),c.length>0&&(0,t.jsx)("div",{className:"mb-2 flex flex-wrap gap-1.5",children:c.map(e=>(0,t.jsxs)(n.Badge,{variant:"secondary",className:"font-mono",children:[e,(0,t.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>d(c.filter(t=>t!==e)),className:"ml-1 cursor-pointer",children:(0,t.jsx)(s3.X,{className:"size-3"})})]},e))}),(0,t.jsx)(e3.Input,{value:x,placeholder:"Leave empty to use defaults: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8",onChange:e=>g(e.target.value),onBlur:y,onKeyDown:e=>{("Enter"===e.key||","===e.key)&&(e.preventDefault(),y())}}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Enter CIDR ranges (e.g., 10.0.0.0/8). When empty, standard private IP ranges are used."})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(i.Button,{onClick:v,disabled:a,children:[(0,t.jsx)(s4.default,{}),"Save"]})})]})};var s8=e.i(776639),s9=e.i(302747);let re=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-red-500","bg-violet-500","bg-pink-500","bg-cyan-500","bg-lime-500"],rt=({isVisible:e,onClose:s,onSelectServer:r,onCustomServer:l,accessToken:n})=>{let[c,d]=(0,p.useState)([]),[u,m]=(0,p.useState)([]),[h,x]=(0,p.useState)(!1),[g,f]=(0,p.useState)(null),[j,v]=(0,p.useState)(""),[y,_]=(0,p.useState)("All");(0,p.useEffect)(()=>{e&&n&&(x(!0),f(null),(0,b.fetchDiscoverableMCPServers)(n).then(e=>{d(e.servers||[]),m(e.categories||[])}).catch(e=>{f(e.message||"Failed to load MCP servers")}).finally(()=>{x(!1)}))},[e,n]),(0,p.useEffect)(()=>{e&&(v(""),_("All"))},[e]);let N=(0,p.useMemo)(()=>{let e=c;if("All"!==y&&(e=e.filter(e=>e.category===y)),j.trim()){let t=j.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.title.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[c,y,j]),w=(0,p.useMemo)(()=>{let e={};for(let t of N){let s=t.category||"Other";e[s]||(e[s]=[]),e[s].push(t)}return e},[N]);return(0,t.jsx)(s8.Dialog,{open:e,onOpenChange:e=>!e&&s(),children:(0,t.jsxs)(s8.DialogContent,{className:"sm:max-w-[1000px]",children:[(0,t.jsx)(s8.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border pb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("img",{src:(0,sy.resolveLogoSrc)(tJ),alt:"MCP Logo",className:"mr-2 size-5 object-contain"}),(0,t.jsx)(s8.DialogTitle,{className:"text-xl font-semibold",children:"Add MCP Server"})]}),(0,t.jsx)(i.Button,{variant:"link",size:"sm",className:"mr-8",onClick:l,children:"+ Custom Server"})]})}),(0,t.jsxs)("div",{className:"max-h-[70vh] overflow-y-auto",children:[(0,t.jsx)("div",{className:"mb-3 flex flex-wrap gap-1.5",children:["All",...u].map(e=>{let s=y===e;return(0,t.jsx)(i.Button,{size:"sm",variant:s?"default":"outline",onClick:()=>_(e),children:e},e)})}),(0,t.jsxs)(o.InputGroup,{className:"mb-4 w-full",children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(a.Search,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(o.InputGroupInput,{placeholder:"Search servers...",value:j,onChange:e=>v(e.target.value)})]}),h&&(0,t.jsx)("div",{className:"flex flex-col gap-1",children:Array.from({length:8}).map((e,s)=>(0,t.jsx)(s9.Skeleton,{className:"h-9 rounded-md"},s))}),g&&(0,t.jsx)("div",{className:"py-8 text-center text-muted-foreground",children:(0,t.jsxs)("p",{className:"text-sm",children:["Failed to load servers: ",g]})}),!h&&!g&&0===N.length&&(0,t.jsx)("div",{className:"py-8 text-center text-muted-foreground",children:(0,t.jsxs)("p",{className:"text-sm",children:["No servers found."," ",(0,t.jsx)(i.Button,{variant:"link",size:"sm",onClick:l,children:"Add a custom server"})]})}),!h&&!g&&Object.entries(w).map(([e,s])=>(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("div",{className:"mb-1 border-b border-border py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:e}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-x-4",children:s.map(e=>{var s;let l,a,n=(l=(s=e.title||e.name).charAt(0).toUpperCase(),a=s.split("").reduce((e,t)=>e+t.charCodeAt(0),0)%re.length,{initial:l,backgroundClass:re[a]});return(0,t.jsxs)("div",{onClick:()=>r(e),className:"flex cursor-pointer items-center rounded-md px-2.5 py-2 transition-colors hover:bg-accent",children:[e.icon_url?(0,t.jsx)("img",{src:(0,sy.resolveLogoSrc)(e.icon_url),alt:e.title,className:"mr-3 size-5 shrink-0 object-contain",onError:e=>{let t=e.currentTarget;t.style.display="none";let s=t.nextElementSibling;s&&(s.style.display="flex")}}):null,(0,t.jsx)("div",{className:(0,ec.cn)("mr-3 size-5 shrink-0 items-center justify-center rounded-sm text-[11px] font-semibold text-white",n.backgroundClass,e.icon_url?"hidden":"flex"),children:n.initial}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm",children:e.title||e.name}),(0,t.jsx)("span",{className:"ml-2 shrink-0 text-sm text-muted-foreground",children:"›"})]},e.name)})})]},e))]})]})})};var rs=e.i(611052),rr=e.i(262218);let{Text:rl,Title:ra}=tD.Typography,rn=({server:e,open:s,accessToken:r,onClose:l,onSaved:a})=>{let[n]=$.Form.useForm(),{data:i,isLoading:o,isError:c}=(0,g.useQuery)({queryKey:["mcpUserEnvVars",e?.server_id],queryFn:()=>(0,b.getMCPUserEnvVars)(r,e.server_id),enabled:s&&!!e&&!!r}),d=(0,sb.useMutation)({mutationFn:t=>(0,b.storeMCPUserEnvVars)(r,e.server_id,t),onSuccess:e=>{N.default.success("Credentials saved"),a?.(e),l()},onError:e=>{N.default.fromBackend(`Failed to save env vars: ${e instanceof Error?e.message:String(e)}`)}}),u=e?.server_name||e?.alias||e?.server_id||"MCP Server",m=i?.required??[],h=d.isPending;return(0,t.jsx)(q.Modal,{open:s,onCancel:l,footer:null,width:520,destroyOnHidden:!0,afterOpenChange:e=>{e&&n.resetFields()},title:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ra,{level:5,style:{margin:0},children:"Set your credentials"}),(0,t.jsx)(rr.Tag,{color:"blue",children:"Per-user"})]}),(0,t.jsx)(rl,{type:"secondary",className:"text-xs",children:u})]}),children:(0,t.jsx)("div",{className:"space-y-4 mt-2",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,t.jsx)(G.Spin,{})}):c?(0,t.jsx)(to.Alert,{type:"error",showIcon:!0,message:"Failed to load env vars"}):0===m.length?(0,t.jsx)(to.Alert,{type:"info",showIcon:!0,message:"No per-user fields configured for this server."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(rl,{className:"text-sm text-gray-600 block",children:"These values are private to you. Your admin configured this MCP server to require these per-user credentials. Saved values are never shown back; leave an already-set field blank to keep it, or enter a value to set or change it."}),(0,t.jsxs)($.Form,{form:n,layout:"vertical",onFinish:t=>{if(!e||!r)return;let s={};for(let[e,r]of Object.entries(t))s[e]=(r??"").trim();d.mutate(s)},disabled:h,children:[m.map(e=>(0,t.jsx)($.Form.Item,{name:e.name,label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-semibold",children:e.name}),e.is_set&&(0,t.jsx)(rr.Tag,{color:"green",children:"Set"})]}),extra:e.description||void 0,rules:e.is_set?void 0:[{required:!0,message:`${e.name} is required`}],children:(0,t.jsx)(W.Input.Password,{placeholder:e.is_set?"Enter a new value to overwrite":e.description||`Enter your ${e.name}`,visibilityToggle:!0})},e.name)),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-2 border-t border-gray-100",children:[(0,t.jsx)(eR.Button,{onClick:l,disabled:h,children:"Cancel"}),(0,t.jsx)(eR.Button,{type:"primary",htmlType:"submit",loading:h,children:"Save Credentials"})]})]})]})})})},ri=[{value:"created_desc",label:"Recently created"},{value:"updated_desc",label:"Recently updated"},{value:"name_asc",label:"Name (A→Z)"},{value:"health",label:"Health (unhealthy first)"}],ro={unhealthy:0,unknown:1,healthy:2},rc=()=>{try{let e=(0,tG.getSecureItem)(sS.TOOLS_OAUTH_UI_STATE_KEY);if(!e)return null;return JSON.parse(e)?.serverId??null}catch{return null}},rd=({accessToken:e,userRole:r,userID:v})=>{let{data:w,isLoading:k,refetch:C}=(0,f.useMCPServers)(),{data:T,isLoading:S,recheckServerHealth:A,recheckingServerIds:I}=(()=>{let{accessToken:e}=(0,y.default)(),t=(0,j.useQueryClient)(),[s,r]=(0,p.useState)(new Set),l=(0,g.useQuery)({queryKey:_.lists(),queryFn:async()=>await (0,b.fetchMCPServerHealth)(e),enabled:!!e,refetchInterval:3e4}),a=(0,p.useCallback)(async s=>{if(e){r(e=>new Set(e).add(s));try{let r=await (0,b.fetchMCPServerHealth)(e,[s]);t.setQueriesData({queryKey:_.lists()},e=>e?e.map(e=>r.find(t=>t.server_id===e.server_id)??e):r)}finally{r(e=>{let t=new Set(e);return t.delete(s),t})}}},[e,t]);return{...l,recheckServerHealth:a,recheckingServerIds:s}})(),O=(0,p.useMemo)(()=>{if(!w)return[];if(!T)return w;let e=new Map(T.map(e=>[e.server_id,e.status]));return w.map(t=>{let s=e.get(t.server_id);return{...t,status:s||t.status}})},[w,T]),[P,M]=(0,p.useState)(null),[F,E]=(0,p.useState)(!1),[L,R]=(0,p.useState)(rc),[U,z]=(0,p.useState)(L),[D,V]=(0,p.useState)(!1),[B,q]=(0,p.useState)("all"),[$,W]=(0,p.useState)("all"),[K,G]=(0,p.useState)([]),[Y,J]=(0,p.useState)(!1),[Q,Z]=(0,p.useState)(!1),[X,ee]=(0,p.useState)(null),[et,es]=(0,p.useState)(!1),[er,el]=(0,p.useState)(null),[ea,en]=(0,p.useState)(null),[ei,eo]=(0,p.useState)(()=>new URLSearchParams(window.location.search).get("fill_env_vars")),[ec,ed]=(0,p.useState)(""),[eu,em]=(0,p.useState)("created_desc"),eh="Internal User"===r,{data:ex,refetch:ep}=(0,g.useQuery)({queryKey:["mcpUserEnvVarStatus"],queryFn:()=>(0,b.listMCPUserEnvVarStatus)(e),enabled:!!e}),eg=(0,p.useMemo)(()=>{let e={};for(let t of ex??[])e[t.server_id]=(t.required??[]).filter(e=>!e.is_set).map(e=>e.name);return e},[ex]);(0,p.useEffect)(()=>{if(!ei)return;let e=new URLSearchParams(window.location.search);if(!e.has("fill_env_vars"))return;e.delete("fill_env_vars");let t=e.toString(),s=window.location.pathname+(t?`?${t}`:"")+window.location.hash;window.history.replaceState({},"",s)},[ei]);let ef=(0,p.useMemo)(()=>ei?O.find(e=>e.server_id===ei)??null:null,[ei,O]),ev=ea??ef;(0,p.useEffect)(()=>{try{let e=(0,tG.getSecureItem)("litellm-mcp-oauth-edit-state");if(!e)return;let t=JSON.parse(e);t?.serverId&&(z(t.serverId),V(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]),(0,p.useEffect)(()=>{try{window.sessionStorage.removeItem(sS.TOOLS_OAUTH_UI_STATE_KEY)}catch{}},[]);let eb=p.default.useMemo(()=>{if(!O)return[];let e=new Set,t=[];return O.forEach(s=>{s.teams&&s.teams.forEach(s=>{let r=s.team_id;e.has(r)||(e.add(r),t.push(s))})}),t},[O]),ey=p.default.useMemo(()=>({all:eh?"All Available Servers":"All Servers",personal:"Personal",...Object.fromEntries(eb.map(e=>[e.team_id,e.team_alias||e.team_id]))}),[eh,eb]),e_=p.default.useMemo(()=>O?Array.from(new Set(O.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[O]),eN=p.default.useMemo(()=>({all:"All Access Groups",...Object.fromEntries(e_.map(e=>[e,e]))}),[e_]),ew=(0,p.useCallback)((e,t)=>{if(!O)return G([]);let s=O;"personal"===e?G([]):("all"!==e&&(s=s.filter(t=>t.teams?.some(t=>t.team_id===e))),"all"!==t&&(s=s.filter(e=>e.mcp_access_groups?.some(e=>"string"==typeof e?e===t:e&&e.name===t))),G([...s].sort((e,t)=>e.created_at||t.created_at?e.created_at?t.created_at?new Date(t.created_at).getTime()-new Date(e.created_at).getTime():-1:1:0)))},[O]);(0,p.useEffect)(()=>{ew(B,$)},[O,B,$,ew]);let ek=(0,p.useMemo)(()=>{let e=ec.trim().toLowerCase();return[...e?K.filter(t=>{let s=(t.server_name||"").toLowerCase(),r=(t.alias||"").toLowerCase(),l=(t.url||"").toLowerCase(),a=t.server_id.toLowerCase();return s.includes(e)||r.includes(e)||l.includes(e)||a.includes(e)}):K].sort((e,t)=>((e,t,s)=>{switch(s){case"name_asc":{let s=(e.server_name||e.alias||e.server_id).toLowerCase(),r=(t.server_name||t.alias||t.server_id).toLowerCase();return s.localeCompare(r)}case"updated_desc":{let s=e.updated_at?new Date(e.updated_at).getTime():0;return(t.updated_at?new Date(t.updated_at).getTime():0)-s}case"health":{let s=ro[e.status??"unknown"]??1,r=ro[t.status??"unknown"]??1;if(s!==r)return s-r;let l=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-l}default:{let s=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-s}}})(e,t,eu))},[K,ec,eu]),eC=async()=>{if(null!=P&&null!=e)try{es(!0),await (0,b.deleteMCPServer)(e,P),N.default.success("Deleted MCP Server successfully"),U===P&&(V(!1),z(null)),C()}catch(e){console.error("Error deleting the mcp server:",e)}finally{es(!1),E(!1),M(null)}},eT=P?(w||[]).find(e=>e.server_id===P):null,eS=p.default.useMemo(()=>K.find(e=>e.server_id===U)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[K,U]),eA=p.default.useCallback(()=>{V(!1),z(null),R(null),C()},[C]);return e&&r&&v?(0,t.jsx)(u.TooltipProvider,{children:(0,t.jsxs)("div",{className:"h-full w-full p-6",children:[(0,t.jsx)(h.AlertDialog,{open:F,onOpenChange:e=>!e&&void(E(!1),M(null)),children:(0,t.jsxs)(h.AlertDialogContent,{children:[(0,t.jsx)(h.AlertDialogHeader,{children:(0,t.jsx)(h.AlertDialogTitle,{children:"Delete MCP Server?"})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"This action is permanent and cannot be undone. All associated configurations will be removed."}),eT&&(0,t.jsxs)("dl",{className:"mt-3 space-y-1 rounded-lg border border-border bg-muted p-4",children:[eT.server_name&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("dt",{className:"text-sm text-muted-foreground",children:"Name"}),(0,t.jsx)("dd",{className:"text-sm font-semibold",children:eT.server_name})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("dt",{className:"text-sm text-muted-foreground",children:"ID"}),(0,t.jsx)("dd",{className:"font-mono text-xs",children:eT.server_id})]}),eT.url&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("dt",{className:"text-sm text-muted-foreground",children:"URL"}),(0,t.jsx)("dd",{className:"font-mono text-xs break-all",children:eT.url})]})]})]}),(0,t.jsxs)(h.AlertDialogFooter,{children:[(0,t.jsx)(h.AlertDialogCancel,{disabled:et,children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"destructive",disabled:et,onClick:eC,children:et?"Deleting...":"Delete"})]})]})}),(0,t.jsx)(t2,{userRole:r,userID:v,accessToken:e,onCreateSuccess:e=>{G(t=>[...t,e]),J(!1),C()},isModalVisible:Y,setModalVisible:J,availableAccessGroups:e_,prefillData:X,onBackToDiscovery:()=>{J(!1),ee(null),Z(!0)}}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"MCP Servers"}),K.length>0&&(0,t.jsx)(n.Badge,{variant:"secondary",children:K.length})]}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Configure and manage your MCP servers"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.isAdminRole)(r)&&(0,t.jsx)(i.Button,{className:"shrink-0",onClick:()=>Z(!0),children:"+ Add New MCP Server"}),!(0,s.isAdminRole)(r)&&(0,t.jsx)(i.Button,{className:"shrink-0",onClick:()=>{ee(null),J(!0)},variant:"secondary",children:"+ Submit MCP Server"})]})]}),(0,t.jsx)(rt,{isVisible:Q,onClose:()=>Z(!1),onSelectServer:e=>{ee(e),Z(!1),J(!0)},onCustomServer:()=>{ee(null),Z(!1),J(!0)},accessToken:e}),(0,t.jsxs)(d.Tabs,{defaultValue:"servers",className:"mt-2 w-full",children:[(0,t.jsxs)(d.TabsList,{variant:"line",className:"h-auto w-full justify-start rounded-none border-b p-0",children:[(0,t.jsx)(d.TabsTrigger,{value:"servers",className:"flex-none rounded-none px-4 py-2",children:"All Servers"}),(0,t.jsx)(d.TabsTrigger,{value:"toolsets",className:"flex-none rounded-none px-4 py-2",children:"Toolsets"}),(0,t.jsx)(d.TabsTrigger,{value:"connect",className:"flex-none rounded-none px-4 py-2",children:"Connect"}),(0,s.isAdminRole)(r)&&(0,t.jsx)(d.TabsTrigger,{value:"semantic-filter",className:"flex-none rounded-none px-4 py-2",children:"Semantic Filter"}),(0,s.isAdminRole)(r)&&(0,t.jsx)(d.TabsTrigger,{value:"network-settings",className:"flex-none rounded-none px-4 py-2",children:"Network Settings"}),(0,s.isAdminRole)(r)&&(0,t.jsxs)(d.TabsTrigger,{value:"submitted",className:"flex-none gap-2 rounded-none px-4 py-2",children:["Submitted MCPs ",(0,t.jsx)(x.default,{})]})]}),(0,t.jsx)(d.TabsContent,{value:"servers",children:U?(0,t.jsx)(sD,{mcpServer:eS,onBack:eA,isProxyAdmin:(0,s.isAdminRole)(r),isEditing:D,accessToken:e,userID:v,userRole:r,availableAccessGroups:e_,initialTabIndex:+(U===L)},U):(0,t.jsxs)("div",{className:"w-full h-full",children:[(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-6 rounded-lg border border-border bg-card px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium whitespace-nowrap text-muted-foreground",children:"Team"}),(0,t.jsxs)(c.Select,{items:ey,value:B,onValueChange:e=>{var t;q(t=e??"all"),ew(t,$)},children:[(0,t.jsx)(c.SelectTrigger,{className:"w-55",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsxs)(c.SelectContent,{children:[(0,t.jsx)(c.SelectItem,{value:"all",children:eh?"All Available Servers":"All Servers"}),(0,t.jsx)(c.SelectItem,{value:"personal",children:"Personal"}),eb.map(e=>(0,t.jsx)(c.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))]})]})]}),(0,t.jsx)("div",{className:"h-6 w-px bg-border"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("p",{className:"flex items-center text-sm font-medium whitespace-nowrap text-muted-foreground",children:["Access Group",(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)(l,{className:"ml-1 size-3.5 text-muted-foreground","aria-label":"About access groups"})}),(0,t.jsx)(u.TooltipContent,{children:"An MCP Access Group is a set of users or teams that have permission to access specific MCP servers. Use access groups to control and organize who can connect to which servers."})]})]}),(0,t.jsxs)(c.Select,{items:eN,value:$,onValueChange:e=>{var t;W(t=e??"all"),ew(B,t)},children:[(0,t.jsx)(c.SelectTrigger,{className:"w-55",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsxs)(c.SelectContent,{children:[(0,t.jsx)(c.SelectItem,{value:"all",children:"All Access Groups"}),e_.map(e=>(0,t.jsx)(c.SelectItem,{value:e,children:e},e))]})]})]})]})})}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(o.InputGroup,{className:"max-w-80",children:[(0,t.jsx)(o.InputGroupAddon,{children:(0,t.jsx)(a.Search,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(o.InputGroupInput,{placeholder:"Search by name, alias, URL, or ID",value:ec,onChange:e=>ed(e.target.value)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium whitespace-nowrap text-muted-foreground",children:"Sort"}),(0,t.jsxs)(c.Select,{items:ri,value:eu,onValueChange:e=>em(e??"created_desc"),children:[(0,t.jsx)(c.SelectTrigger,{className:"w-55",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:ri.map(e=>(0,t.jsx)(c.SelectItem,{value:e.value,children:e.label},e.value))})]})]}),(0,t.jsxs)("div",{className:"ml-auto text-xs text-muted-foreground",children:[ek.length," of ",K.length," servers"]})]}),(0,t.jsx)("div",{className:"mt-4 w-full",children:k?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-card p-12",children:[(0,t.jsx)(m.UiLoadingSpinner,{className:"size-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading MCP servers..."})]}):0===ek.length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed border-border bg-card p-12 text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:0===K.length?"No MCP servers configured. Click '+ Add New MCP Server' to get started.":"No servers match the current filters or search."})}):(0,t.jsx)("div",{"data-testid":"mcp-servers-grid",className:"grid auto-rows-fr grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:ek.map(e=>(0,t.jsx)(sg,{server:e,missingUserFields:eg[e.server_id],isLoadingHealth:S,isRechecking:I?.has(e.server_id),onClick:()=>{z(e.server_id),V(!0)},onRecheckHealth:A?()=>A(e.server_id):void 0,onByokConnect:e.is_byok?()=>el(e):void 0,onOpenFillFields:()=>en(e),onDelete:(0,s.isAdminRole)(r)?()=>{M(e.server_id),E(!0)}:void 0},e.server_id))})})]})}),(0,t.jsx)(d.TabsContent,{value:"toolsets",children:(0,t.jsx)(ej,{accessToken:e,userRole:r})}),(0,t.jsx)(d.TabsContent,{value:"connect",children:(0,t.jsx)(sc,{})}),(0,s.isAdminRole)(r)&&(0,t.jsx)(d.TabsContent,{value:"semantic-filter",children:(0,t.jsx)(s1,{accessToken:e})}),(0,s.isAdminRole)(r)&&(0,t.jsx)(d.TabsContent,{value:"network-settings",children:(0,t.jsx)(s7,{accessToken:e})}),(0,s.isAdminRole)(r)&&(0,t.jsx)(d.TabsContent,{value:"submitted",children:(0,t.jsx)(H,{accessToken:e})})]}),er&&(0,t.jsx)(rs.ByokCredentialModal,{server:er,open:!!er,onClose:()=>el(null),onSuccess:e=>{C(),el(null)}}),(0,t.jsx)(rn,{server:ev,open:!!ev,accessToken:e,onClose:()=>{en(null),eo(null)},onSaved:()=>{ep()}})]})}):(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."})};e.s(["default",0,function(){let{accessToken:e,userRole:s,userId:r}=(0,y.default)();return(0,t.jsx)(rd,{accessToken:e,userRole:s,userID:r})}],366321)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0ald9tfsbz2e-.js b/litellm/proxy/_experimental/out/_next/static/chunks/0ald9tfsbz2e-.js
deleted file mode 100644
index cbcda11e682..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0ald9tfsbz2e-.js
+++ /dev/null
@@ -1,7 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196361,e=>{e.q("/litellm-asset-prefix/_next/static/media/arize.2q0zcoh7v2j00.png")},614148,e=>{e.q("/litellm-asset-prefix/_next/static/media/aws.2vuu_29f0wx7g.svg")},858236,e=>{e.q("/litellm-asset-prefix/_next/static/media/braintrust.1qnhppdggfxdj.png")},508296,e=>{e.q("/litellm-asset-prefix/_next/static/media/datadog.20j6djly_hrsx.png")},324755,e=>{e.q("/litellm-asset-prefix/_next/static/media/galileo.1jnyj81fv75mp.ico")},475151,e=>{e.q("/litellm-asset-prefix/_next/static/media/lago.146vobxeazdxy.svg")},274286,e=>{e.q("/litellm-asset-prefix/_next/static/media/langfuse.1y39530irujaj.png")},436494,e=>{e.q("/litellm-asset-prefix/_next/static/media/langsmith.0cuekyutow5l_.png")},204086,e=>{e.q("/litellm-asset-prefix/_next/static/media/openmeter.1wzo3xv7qwtb8.png")},531150,e=>{e.q("/litellm-asset-prefix/_next/static/media/otel.1dei3v2u03nit.png")},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),l=e.i(673706),i=e.i(271645);let o=i.default.forwardRef((e,o)=>{let{color:n,children:s,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:o,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",n?(0,l.getColorClassNames)(n,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),s)});o.displayName="Title",e.s(["Title",0,o],629569)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),i=e.i(444755),o=e.i(673706);let n=(0,o.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:c="",decorationColor:d,children:u,className:f}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,i.tremorTwMerge)(n("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,o.getColorClassNames)(d,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),f)},m),u)});s.displayName="Card",e.s(["Card",0,s],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),l=e.i(392221),i=e.i(703923),o=e.i(343794),n=e.i(914949),s=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,s.forwardRef)(function(e,d){var u=e.prefixCls,f=void 0===u?"rc-checkbox":u,m=e.className,p=e.style,h=e.checked,b=e.disabled,v=e.defaultChecked,g=e.type,x=void 0===g?"checkbox":g,y=e.title,C=e.onChange,k=(0,i.default)(e,c),w=(0,s.useRef)(null),S=(0,s.useRef)(null),E=(0,n.default)(void 0!==v&&v,{value:h}),_=(0,l.default)(E,2),N=_[0],j=_[1];(0,s.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=w.current)||t.focus(e)},blur:function(){var e;null==(e=w.current)||e.blur()},input:w.current,nativeElement:S.current}});var $=(0,o.default)(f,m,(0,a.default)((0,a.default)({},"".concat(f,"-checked"),N),"".concat(f,"-disabled"),b));return s.createElement("span",{className:$,title:y,style:p,ref:S},s.createElement("input",(0,t.default)({},k,{className:"".concat(f,"-input"),ref:w,onChange:function(t){b||("checked"in e||j(t.target.checked),null==C||C({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:b,checked:!!N,type:x})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,d],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=s.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),l=e.i(611935),i=e.i(121872),o=e.i(26905),n=e.i(242064),s=e.i(937328),c=e.i(321883),d=e.i(62139);let u=t.default.createContext(null);e.i(296059);var f=e.i(915654),m=e.i(183293),p=e.i(246422),h=e.i(838378);function b(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,m.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,f.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
- ${r}:not(${r}-disabled),
- ${t}:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
- ${r}-checked:not(${r}-disabled),
- ${t}-checked:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,h.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let v=(0,p.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[b(t,e)]);e.s(["default",0,v,"getStyle",0,b],236836);var g=e.i(681216),x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.forwardRef((e,f)=>{var m;let{prefixCls:p,className:h,rootClassName:b,children:y,indeterminate:C=!1,style:k,onMouseEnter:w,onMouseLeave:S,skipGroup:E=!1,disabled:_}=e,N=x(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:j,direction:$,checkbox:P}=t.useContext(n.ConfigContext),O=t.useContext(u),{isFormItemInput:R}=t.useContext(d.FormItemInputContext),M=t.useContext(s.default),L=null!=(m=(null==O?void 0:O.disabled)||_)?m:M,T=t.useRef(N.value),I=t.useRef(null),z=(0,l.composeRef)(f,I);t.useEffect(()=>{null==O||O.registerValue(N.value)},[]),t.useEffect(()=>{if(!E)return N.value!==T.current&&(null==O||O.cancelValue(T.current),null==O||O.registerValue(N.value),T.current=N.value),()=>null==O?void 0:O.cancelValue(N.value)},[N.value]),t.useEffect(()=>{var e;(null==(e=I.current)?void 0:e.input)&&(I.current.input.indeterminate=C)},[C]);let A=j("checkbox",p),q=(0,c.default)(A),[B,V,D]=v(A,q),G=Object.assign({},N);O&&!E&&(G.onChange=(...e)=>{N.onChange&&N.onChange.apply(N,e),O.toggleOption&&O.toggleOption({label:y,value:N.value})},G.name=O.name,G.checked=O.value.includes(N.value));let H=(0,r.default)(`${A}-wrapper`,{[`${A}-rtl`]:"rtl"===$,[`${A}-wrapper-checked`]:G.checked,[`${A}-wrapper-disabled`]:L,[`${A}-wrapper-in-form-item`]:R},null==P?void 0:P.className,h,b,D,q,V),W=(0,r.default)({[`${A}-indeterminate`]:C},o.TARGET_CLS,V),[X,F]=(0,g.default)(G.onClick);return B(t.createElement(i.default,{component:"Checkbox",disabled:L},t.createElement("label",{className:H,style:Object.assign(Object.assign({},null==P?void 0:P.style),k),onMouseEnter:w,onMouseLeave:S,onClick:X},t.createElement(a.default,Object.assign({},G,{onClick:F,prefixCls:A,className:W,disabled:L,ref:z})),null!=y&&t.createElement("span",{className:`${A}-label`},y))))});var C=e.i(8211),k=e.i(529681),w=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let S=t.forwardRef((e,a)=>{let{defaultValue:l,children:i,options:o=[],prefixCls:s,className:d,rootClassName:f,style:m,onChange:p}=e,h=w(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:b,direction:g}=t.useContext(n.ConfigContext),[x,S]=t.useState(h.value||l||[]),[E,_]=t.useState([]);t.useEffect(()=>{"value"in h&&S(h.value||[])},[h.value]);let N=t.useMemo(()=>o.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[o]),j=e=>{_(t=>t.filter(t=>t!==e))},$=e=>{_(t=>[].concat((0,C.default)(t),[e]))},P=e=>{let t=x.indexOf(e.value),r=(0,C.default)(x);-1===t?r.push(e.value):r.splice(t,1),"value"in h||S(r),null==p||p(r.filter(e=>E.includes(e)).sort((e,t)=>N.findIndex(t=>t.value===e)-N.findIndex(e=>e.value===t)))},O=b("checkbox",s),R=`${O}-group`,M=(0,c.default)(O),[L,T,I]=v(O,M),z=(0,k.default)(h,["value","disabled"]),A=o.length?N.map(e=>t.createElement(y,{prefixCls:O,key:e.value.toString(),disabled:"disabled"in e?e.disabled:h.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${R}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):i,q=t.useMemo(()=>({toggleOption:P,value:x,disabled:h.disabled,name:h.name,registerValue:$,cancelValue:j}),[P,x,h.disabled,h.name,$,j]),B=(0,r.default)(R,{[`${R}-rtl`]:"rtl"===g},d,f,I,M,T);return L(t.createElement("div",Object.assign({className:B,style:m},z,{ref:a}),t.createElement(u.Provider,{value:q},A)))});y.Group=S,y.__ANT_CHECKBOX=!0,e.s(["default",0,y],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:a}=r.Select;e.s(["default",0,({value:e,onChange:l,className:i="",style:o={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...o},value:e||void 0,onChange:l,className:i,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(a,{value:"1h",children:"hourly"}),(0,t.jsx)(a,{value:"24h",children:"daily"}),(0,t.jsx)(a,{value:"7d",children:"weekly"}),(0,t.jsx)(a,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var l=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["UserAddOutlined",0,i],213205)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:o,accessToken:n,placeholder:s="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,l.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:s,onChange:e,value:i,loading:f,className:o,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},500727,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(135214);let i=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,a.fetchMCPServers)(r,e),enabled:!!r})}])},699857,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(135214);let i=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,a.fetchMCPToolsets)(e),enabled:!!e})}])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),l=e.i(602869),i=e.i(135214);let o=(0,a.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),s=e.i(699857),c=e.i(199133),d=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:a,className:f,accessToken:m,placeholder:p="Select MCP servers",disabled:h=!1,teamId:b,allowNoMcpServers:v=!1,allowAllProxyMcpServers:g=!1})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(b),{data:C=[],isLoading:k}=(()=>{let{accessToken:e}=(0,i.default)();return(0,r.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:w=[],isLoading:S}=(0,s.useMCPToolsets)(),E=new Set(C),_=[...C.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...w.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},j={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},$=[...a?.servers||[],...a?.accessGroups||[],...(a?.toolsets||[]).map(e=>`${u}${e}`)],P=v&&$.includes(d.NO_MCP_SERVERS_SENTINEL),O=$.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(c.Select,{mode:"multiple",placeholder:p,onChange:t=>{if(g&&t.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[d.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(v&&t.includes(d.NO_MCP_SERVERS_SENTINEL))return void e({servers:[d.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),a=t.filter(e=>!e.startsWith(u));e({servers:a.filter(e=>!E.has(e)),accessGroups:a.filter(e=>E.has(e)),toolsets:r})},value:$,loading:y||k||S,className:f,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:h,filterOption:(e,t)=>t?.value===d.NO_MCP_SERVERS_SENTINEL||t?.value===d.ALL_PROXY_MCP_SERVERS_SENTINEL||(_.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(g||O)&&(0,t.jsx)(c.Select.Option,{value:d.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},d.ALL_PROXY_MCP_SERVERS_SENTINEL),v&&(0,t.jsx)(c.Select.Option,{value:d.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},d.NO_MCP_SERVERS_SENTINEL),_.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,disabled:P||O,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:j[e.type]})]})},e.value))]})})}],75921)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["RobotOutlined",0,i],983561)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(779241),l=e.i(599724),i=e.i(199133),o=e.i(983561),n=e.i(343488),s=e.i(695411);e.s(["default",0,({accessToken:e,value:c,placeholder:d="Select a Model",onChange:u,disabled:f=!1,style:m,className:p,showLabel:h=!0,labelText:b="Select Model"})=>{let[v,g]=(0,r.useState)(c),[x,y]=(0,r.useState)(!1),[C,k]=(0,r.useState)([]);(0,r.useEffect)(()=>{g(c)},[c]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,s.fetchAvailableModels)(e);t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]);let w=(0,n.useDebouncedCallback)(e=>{g(e),u?.(e)},{wait:500});return(0,t.jsxs)("div",{children:[h&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o.RobotOutlined,{className:"mr-2"})," ",b]}),(0,t.jsx)(i.Select,{value:v,placeholder:d,onChange:e=>{"custom"===e?(y(!0),g(void 0)):(y(!1),g(e),u&&u(e))},options:[...Array.from(new Set(C.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...m},showSearch:!0,className:`rounded-md ${p||""}`,disabled:f}),x&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:w,disabled:f})]})}])},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,a){let l=(0,t.useDebouncer)(e,a).maybeExecute;return(0,r.useCallback)((...e)=>l(...e),[l])}])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},531516,696609,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(536916),l=e.i(599724),i=e.i(409797),o=e.i(233565);let n=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,s=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,c=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,d=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function u(e,t=""){let r=e.toLowerCase();if(d.test(r))return"read";if(n.test(r))return"delete";if(c.test(r))return"update";if(s.test(r))return"create";if(t){let e=t.toLowerCase();if(d.test(e))return"read";if(n.test(e))return"delete";if(c.test(e))return"update";if(s.test(e))return"create"}return"unknown"}function f(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[u(r.name,r.description)].push(r);return t}let m={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,m,"classifyToolOp",0,u,"groupToolsByCrud",0,f],696609);let p=["read","create","update","delete","unknown"],h={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},b={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},v={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:n,onChange:s,readOnly:c=!1,searchFilter:d=""})=>{let[u,g]=(0,r.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),x=(0,r.useMemo)(()=>f(e),[e]),y=(0,r.useMemo)(()=>new Set(void 0===n?e.map(e=>e.name):n),[n,e]),C=e=>{if(c)return;let t=new Set(y);t.has(e)?t.delete(e):t.add(e),s(Array.from(t))};return 0===e.length?null:(0,t.jsx)("div",{className:"space-y-3",children:p.map(e=>{let r,n=x[e];if(0===n.length)return null;if(d){let e=d.toLowerCase();if(!n.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let f=m[e],p=(r=x[e]).length>0&&r.every(e=>y.has(e.name)),k=(e=>{let t=x[e];if(0===t.length)return!1;let r=t.filter(e=>y.has(e.name)).length;return r>0&&r{g(t=>({...t,[e]:!t[e]}))},children:[w?(0,t.jsx)(o.ChevronRightIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}):(0,t.jsx)(i.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:f.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${h[f.risk]}`,children:"high"===f.risk?"High Risk":"medium"===f.risk?"Medium Risk":"low"===f.risk?"Safe":"Unclassified"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[n.filter(e=>y.has(e.name)).length,"/",n.length," allowed"]})]}),!c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,t.jsx)(l.Text,{className:"text-xs text-gray-500",children:p?"All on":k?"Partial":"All off"}),(0,t.jsx)(a.Checkbox,{checked:p,indeterminate:k,onChange:t=>((e,t)=>{if(c)return;let r=new Set(y);for(let a of x[e])t?r.add(a.name):r.delete(a.name);s(Array.from(r))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!w&&(0,t.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:f.description}),!w&&(0,t.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:n.filter(e=>!d||e.name.toLowerCase().includes(d.toLowerCase())||(e.description??"").toLowerCase().includes(d.toLowerCase())).map(e=>{let r,i=(r=e.name,y.has(r));return(0,t.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!c?"cursor-pointer":""} ${i?"":"opacity-60"}`,onClick:()=>C(e.name),children:[(0,t.jsx)(a.Checkbox,{checked:i,onChange:()=>C(e.name),disabled:c,onClick:e=>e.stopPropagation()}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)(l.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,t.jsx)(l.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,t.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded shrink-0 ${i?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:i?"on":"off"})]},e.name)})})]},e)})})}],531516)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0am68mi9t9cb6.js b/litellm/proxy/_experimental/out/_next/static/chunks/0am68mi9t9cb6.js
deleted file mode 100644
index 003a4b6ad48..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0am68mi9t9cb6.js
+++ /dev/null
@@ -1,7 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196361,e=>{e.q("/litellm-asset-prefix/_next/static/media/arize.2q0zcoh7v2j00.png")},614148,e=>{e.q("/litellm-asset-prefix/_next/static/media/aws.2vuu_29f0wx7g.svg")},858236,e=>{e.q("/litellm-asset-prefix/_next/static/media/braintrust.1qnhppdggfxdj.png")},508296,e=>{e.q("/litellm-asset-prefix/_next/static/media/datadog.20j6djly_hrsx.png")},324755,e=>{e.q("/litellm-asset-prefix/_next/static/media/galileo.1jnyj81fv75mp.ico")},475151,e=>{e.q("/litellm-asset-prefix/_next/static/media/lago.146vobxeazdxy.svg")},274286,e=>{e.q("/litellm-asset-prefix/_next/static/media/langfuse.1y39530irujaj.png")},436494,e=>{e.q("/litellm-asset-prefix/_next/static/media/langsmith.0cuekyutow5l_.png")},204086,e=>{e.q("/litellm-asset-prefix/_next/static/media/openmeter.1wzo3xv7qwtb8.png")},531150,e=>{e.q("/litellm-asset-prefix/_next/static/media/otel.1dei3v2u03nit.png")},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),l=e.i(444755),a=e.i(673706),s=e.i(271645);let n=s.default.forwardRef((e,n)=>{let{color:o,children:i,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:n,className:(0,l.tremorTwMerge)("font-medium text-tremor-title",o?(0,a.getColorClassNames)(o,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),i)});n.displayName="Title",e.s(["Title",0,n],629569)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(480731),a=e.i(95779),s=e.i(444755),n=e.i(673706);let o=(0,n.makeClassName)("Card"),i=r.default.forwardRef((e,i)=>{let{decoration:c="",decorationColor:d,children:u,className:m}=e,p=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,s.tremorTwMerge)(o("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,n.getColorClassNames)(d,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case l.HorizontalPositions.Left:return"border-l-4";case l.VerticalPositions.Top:return"border-t-4";case l.HorizontalPositions.Right:return"border-r-4";case l.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),m)},p),u)});i.displayName="Card",e.s(["Card",0,i],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),l=e.i(211577),a=e.i(392221),s=e.i(703923),n=e.i(343794),o=e.i(914949),i=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,i.forwardRef)(function(e,d){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,p=e.className,g=e.style,f=e.checked,h=e.disabled,x=e.defaultChecked,b=e.type,v=void 0===b?"checkbox":b,y=e.title,w=e.onChange,k=(0,s.default)(e,c),C=(0,i.useRef)(null),j=(0,i.useRef)(null),N=(0,o.default)(void 0!==x&&x,{value:f}),S=(0,a.default)(N,2),_=S[0],E=S[1];(0,i.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=C.current)||t.focus(e)},blur:function(){var e;null==(e=C.current)||e.blur()},input:C.current,nativeElement:j.current}});var M=(0,n.default)(m,p,(0,l.default)((0,l.default)({},"".concat(m,"-checked"),_),"".concat(m,"-disabled"),h));return i.createElement("span",{className:M,title:y,style:g,ref:j},i.createElement("input",(0,t.default)({},k,{className:"".concat(m,"-input"),ref:C,onChange:function(t){h||("checked"in e||E(t.target.checked),null==w||w({target:(0,r.default)((0,r.default)({},e),{},{type:v,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:h,checked:!!_,type:v})),i.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,d],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=i.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},l=>{t.current&&(l.stopPropagation(),r()),null==e||e(l)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),l=e.i(91874),a=e.i(611935),s=e.i(121872),n=e.i(26905),o=e.i(242064),i=e.i(937328),c=e.i(321883),d=e.i(62139);let u=t.default.createContext(null);e.i(296059);var m=e.i(915654),p=e.i(183293),g=e.i(246422),f=e.i(838378);function h(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,p.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,m.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
- ${r}:not(${r}-disabled),
- ${t}:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
- ${r}-checked:not(${r}-disabled),
- ${t}-checked:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,f.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let x=(0,g.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[h(t,e)]);e.s(["default",0,x,"getStyle",0,h],236836);var b=e.i(681216),v=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]]);return r};let y=t.forwardRef((e,m)=>{var p;let{prefixCls:g,className:f,rootClassName:h,children:y,indeterminate:w=!1,style:k,onMouseEnter:C,onMouseLeave:j,skipGroup:N=!1,disabled:S}=e,_=v(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:E,direction:M,checkbox:$}=t.useContext(o.ConfigContext),O=t.useContext(u),{isFormItemInput:R}=t.useContext(d.FormItemInputContext),P=t.useContext(i.default),T=null!=(p=(null==O?void 0:O.disabled)||S)?p:P,L=t.useRef(_.value),I=t.useRef(null),A=(0,a.composeRef)(m,I);t.useEffect(()=>{null==O||O.registerValue(_.value)},[]),t.useEffect(()=>{if(!N)return _.value!==L.current&&(null==O||O.cancelValue(L.current),null==O||O.registerValue(_.value),L.current=_.value),()=>null==O?void 0:O.cancelValue(_.value)},[_.value]),t.useEffect(()=>{var e;(null==(e=I.current)?void 0:e.input)&&(I.current.input.indeterminate=w)},[w]);let D=E("checkbox",g),z=(0,c.default)(D),[q,V,B]=x(D,z),F=Object.assign({},_);O&&!N&&(F.onChange=(...e)=>{_.onChange&&_.onChange.apply(_,e),O.toggleOption&&O.toggleOption({label:y,value:_.value})},F.name=O.name,F.checked=O.value.includes(_.value));let G=(0,r.default)(`${D}-wrapper`,{[`${D}-rtl`]:"rtl"===M,[`${D}-wrapper-checked`]:F.checked,[`${D}-wrapper-disabled`]:T,[`${D}-wrapper-in-form-item`]:R},null==$?void 0:$.className,f,h,B,z,V),H=(0,r.default)({[`${D}-indeterminate`]:w},n.TARGET_CLS,V),[K,W]=(0,b.default)(F.onClick);return q(t.createElement(s.default,{component:"Checkbox",disabled:T},t.createElement("label",{className:G,style:Object.assign(Object.assign({},null==$?void 0:$.style),k),onMouseEnter:C,onMouseLeave:j,onClick:K},t.createElement(l.default,Object.assign({},F,{onClick:W,prefixCls:D,className:H,disabled:T,ref:A})),null!=y&&t.createElement("span",{className:`${D}-label`},y))))});var w=e.i(8211),k=e.i(529681),C=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]]);return r};let j=t.forwardRef((e,l)=>{let{defaultValue:a,children:s,options:n=[],prefixCls:i,className:d,rootClassName:m,style:p,onChange:g}=e,f=C(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:h,direction:b}=t.useContext(o.ConfigContext),[v,j]=t.useState(f.value||a||[]),[N,S]=t.useState([]);t.useEffect(()=>{"value"in f&&j(f.value||[])},[f.value]);let _=t.useMemo(()=>n.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[n]),E=e=>{S(t=>t.filter(t=>t!==e))},M=e=>{S(t=>[].concat((0,w.default)(t),[e]))},$=e=>{let t=v.indexOf(e.value),r=(0,w.default)(v);-1===t?r.push(e.value):r.splice(t,1),"value"in f||j(r),null==g||g(r.filter(e=>N.includes(e)).sort((e,t)=>_.findIndex(t=>t.value===e)-_.findIndex(e=>e.value===t)))},O=h("checkbox",i),R=`${O}-group`,P=(0,c.default)(O),[T,L,I]=x(O,P),A=(0,k.default)(f,["value","disabled"]),D=n.length?_.map(e=>t.createElement(y,{prefixCls:O,key:e.value.toString(),disabled:"disabled"in e?e.disabled:f.disabled,value:e.value,checked:v.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${R}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):s,z=t.useMemo(()=>({toggleOption:$,value:v,disabled:f.disabled,name:f.name,registerValue:M,cancelValue:E}),[$,v,f.disabled,f.name,M,E]),q=(0,r.default)(R,{[`${R}-rtl`]:"rtl"===b},d,m,I,P,L);return T(t.createElement("div",Object.assign({className:q,style:p},A,{ref:l}),t.createElement(u.Provider,{value:z},D)))});y.Group=j,y.__ANT_CHECKBOX=!0,e.s(["default",0,y],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},63209,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircle",()=>t.default])},158392,e=>{"use strict";var t=e.i(843476),r=e.i(311451);let l={ttl:3600,lowest_latency_buffer:0},a=({routingStrategyArgs:e})=>{let a={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||l).map(([e,l])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:a[e]||""}),(0,t.jsx)(r.Input,{name:e,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:l})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e&&"retry_policy"!=e&&"model_group_retry_policy"!=e&&"routing_groups"!=e).map(([e,a])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:l[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l[e]?.field_description||""}),(0,t.jsx)(r.Input,{name:e,defaultValue:null==a||"null"===a?"":"object"==typeof a?JSON.stringify(a,null,2):a?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var n=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:l,routerFieldsMetadata:a,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:a.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:a.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(n.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(n.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),l[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:l[e]})]})},e))})})]});var i=e.i(790848);let c=({enabled:e,routerFieldsMetadata:r,onToggle:l})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(i.Switch,{checked:e,onChange:l,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:l,availableRoutingStrategies:n,routingStrategyDescriptions:i})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),n.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:n,routingStrategyDescriptions:i,routerFieldsMetadata:l,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:l,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(a,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:l})]})],158392)},425063,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,t],425063)},419470,334115,e=>{"use strict";var t=e.i(843476),r=e.i(994388),l=e.i(653496),a=e.i(107233),s=e.i(271645),n=e.i(888259),o=e.i(199133),i=e.i(592968),c=e.i(63209),d=e.i(425063),u=e.i(37727);function m({group:e,onChange:r,availableModels:l,maxFallbacks:a,disablePrimaryModel:s=!1}){let n=l.filter(t=>t!==e.primaryModel),p=e.fallbackModels.length{let l=[...e.fallbackModels];l.includes(t)&&(l=l.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:l})},disabled:s,showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e}))}),!s&&!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded-sm",children:[(0,t.jsx)(c.AlertCircle,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-xs",children:[(0,t.jsx)(d.ArrowDown,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",a," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(o.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:p?"Select fallback models to add...":`Maximum ${a} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let l=t.slice(0,a);r({...e,fallbackModels:l})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:n.map(e=>({label:e,value:e})),optionRender:(r,l)=>{let a=e.fallbackModels.includes(r.value),s=a?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded-sm bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(i.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:p?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${a} used)`:`Maximum ${a} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((l,a)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-xs transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-sm bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:a+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:l})})]}),(0,t.jsx)("button",{type:"button","data-testid":`remove-fallback-${l}`,onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==a),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(u.X,{className:"w-4 h-4"})})]},`${l}-${a}`))})]})]})]})}e.s(["FallbackGroupConfig",0,m],334115),e.s(["FallbackSelectionForm",0,function({groups:e,onGroupsChange:o,availableModels:i,maxFallbacks:c=10,maxGroups:d=5}){let[u,p]=(0,s.useState)(e.length>0?e[0].id:"1");(0,s.useEffect)(()=>{e.length>0?e.some(e=>e.id===u)||p(e[0].id):p("1")},[e]);let g=()=>{if(e.length>=d)return;let t=Date.now().toString();o([...e,{id:t,primaryModel:null,fallbackModels:[]}]),p(t)},f=t=>{o(e.map(e=>e.id===t.id?t:e))},h=e.map((r,l)=>{let a=r.primaryModel?r.primaryModel:`Group ${l+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(m,{group:r,onChange:f,availableModels:i,maxFallbacks:c})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(r.Button,{variant:"primary",onClick:g,icon:()=>(0,t.jsx)(a.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(l.Tabs,{type:"editable-card",activeKey:u,onChange:p,onEdit:(t,r)=>{"add"===r?g():"remove"===r&&e.length>1&&(t=>{if(1===e.length)return n.default.warning("At least one group is required");let r=e.filter(e=>e.id!==t);o(r),u===t&&r.length>0&&p(r[r.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=d})}],419470)},435451,e=>{"use strict";var t=e.i(843476),r=e.i(290571),l=e.i(271645);let a=e=>{var t=(0,r.__rest)(e,[]);return l.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),l.default.createElement("path",{d:"M12 4v16m8-8H4"}))},s=e=>{var t=(0,r.__rest)(e,[]);return l.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),l.default.createElement("path",{d:"M20 12H4"}))};var n=e.i(444755),o=e.i(673706),i=e.i(677955);let c="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",u=l.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:f}=e,h=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),x=(0,l.useRef)(null),[b,v]=l.default.useState(!1),y=l.default.useCallback(()=>{v(!0)},[]),w=l.default.useCallback(()=>{v(!1)},[]),[k,C]=l.default.useState(!1),j=l.default.useCallback(()=>{C(!0)},[]),N=l.default.useCallback(()=>{C(!1)},[]);return l.default.createElement(i.default,Object.assign({type:"number",ref:(0,o.mergeRefs)([x,t]),disabled:p,makeInputClassName:(0,o.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=x.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&y(),"ArrowUp"===e.key&&j()},onKeyUp:e=>{"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&N()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==f||f(e))},stepper:m?l.default.createElement("div",{className:(0,n.tremorTwMerge)("flex justify-center align-middle")},l.default.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=x.current)||e.stepDown(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,n.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},l.default.createElement(s,{"data-testid":"step-down",className:(b?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),l.default.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=x.current)||e.stepUp(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,n.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},l.default.createElement(a,{"data-testid":"step-up",className:(k?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},h))});u.displayName="NumberInput",e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:l="Enter a numerical value",min:a,max:s,onChange:n,...o})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:l,min:a,max:s,onChange:n,...o})],435451)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:l}=r.Select;e.s(["default",0,({value:e,onChange:a,className:s="",style:n={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...n},value:e||void 0,onChange:a,className:s,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(l,{value:"1h",children:"hourly"}),(0,t.jsx)(l,{value:"24h",children:"daily"}),(0,t.jsx)(l,{value:"7d",children:"weekly"}),(0,t.jsx)(l,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["UserAddOutlined",0,s],213205)},500727,e=>{"use strict";var t=e.i(266027),r=e.i(243652),l=e.i(602869),a=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,a.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,l.fetchMCPServers)(r,e),enabled:!!r})}])},699857,e=>{"use strict";var t=e.i(266027),r=e.i(243652),l=e.i(602869),a=e.i(135214);let s=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,a.default)();return(0,t.useQuery)({queryKey:s.list(),queryFn:async()=>await (0,l.fetchMCPToolsets)(e),enabled:!!e})}])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(199133),a=e.i(602869);e.s(["default",0,({onChange:e,value:s,className:n,accessToken:o,placeholder:i="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){p(!0);try{let e=await (0,a.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(l.Select,{mode:"multiple",placeholder:i,onChange:e,value:s,loading:m,className:n,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let n=(0,l.createQueryKeys)("mcpAccessGroups");var o=e.i(500727),i=e.i(699857),c=e.i(199133),d=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:l,className:m,accessToken:p,placeholder:g="Select MCP servers",disabled:f=!1,teamId:h,allowNoMcpServers:x=!1,allowAllProxyMcpServers:b=!1})=>{let{data:v=[],isLoading:y}=(0,o.useMCPServers)(h),{data:w=[],isLoading:k}=(()=>{let{accessToken:e}=(0,s.default)();return(0,r.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:C=[],isLoading:j}=(0,i.useMCPToolsets)(),N=new Set(w),S=[...w.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...v.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...C.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],_={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},E={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},M=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${u}${e}`)],$=x&&M.includes(d.NO_MCP_SERVERS_SENTINEL),O=M.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(c.Select,{mode:"multiple",placeholder:g,onChange:t=>{if(b&&t.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[d.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(x&&t.includes(d.NO_MCP_SERVERS_SENTINEL))return void e({servers:[d.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),l=t.filter(e=>!e.startsWith(u));e({servers:l.filter(e=>!N.has(e)),accessGroups:l.filter(e=>N.has(e)),toolsets:r})},value:M,loading:y||k||j,className:m,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:f,filterOption:(e,t)=>t?.value===d.NO_MCP_SERVERS_SENTINEL||t?.value===d.ALL_PROXY_MCP_SERVERS_SENTINEL||(S.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(b||O)&&(0,t.jsx)(c.Select.Option,{value:d.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},d.ALL_PROXY_MCP_SERVERS_SENTINEL),x&&(0,t.jsx)(c.Select.Option,{value:d.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},d.NO_MCP_SERVERS_SENTINEL),S.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,disabled:$||O,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:_[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:_[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:E[e.type]})]})},e.value))]})})}],75921)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,l){let a=(0,t.useDebouncer)(e,l).maybeExecute;return(0,r.useCallback)((...e)=>a(...e),[a])}])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},531516,696609,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(536916),a=e.i(599724),s=e.i(409797),n=e.i(233565);let o=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,i=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,c=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,d=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function u(e,t=""){let r=e.toLowerCase();if(d.test(r))return"read";if(o.test(r))return"delete";if(c.test(r))return"update";if(i.test(r))return"create";if(t){let e=t.toLowerCase();if(d.test(e))return"read";if(o.test(e))return"delete";if(c.test(e))return"update";if(i.test(e))return"create"}return"unknown"}function m(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[u(r.name,r.description)].push(r);return t}let p={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,p,"classifyToolOp",0,u,"groupToolsByCrud",0,m],696609);let g=["read","create","update","delete","unknown"],f={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},h={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},x={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:o,onChange:i,readOnly:c=!1,searchFilter:d=""})=>{let[u,b]=(0,r.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),v=(0,r.useMemo)(()=>m(e),[e]),y=(0,r.useMemo)(()=>new Set(void 0===o?e.map(e=>e.name):o),[o,e]),w=e=>{if(c)return;let t=new Set(y);t.has(e)?t.delete(e):t.add(e),i(Array.from(t))};return 0===e.length?null:(0,t.jsx)("div",{className:"space-y-3",children:g.map(e=>{let r,o=v[e];if(0===o.length)return null;if(d){let e=d.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let m=p[e],g=(r=v[e]).length>0&&r.every(e=>y.has(e.name)),k=(e=>{let t=v[e];if(0===t.length)return!1;let r=t.filter(e=>y.has(e.name)).length;return r>0&&r{b(t=>({...t,[e]:!t[e]}))},children:[C?(0,t.jsx)(n.ChevronRightIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}):(0,t.jsx)(s.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:m.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${f[m.risk]}`,children:"high"===m.risk?"High Risk":"medium"===m.risk?"Medium Risk":"low"===m.risk?"Safe":"Unclassified"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>y.has(e.name)).length,"/",o.length," allowed"]})]}),!c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:g?"All on":k?"Partial":"All off"}),(0,t.jsx)(l.Checkbox,{checked:g,indeterminate:k,onChange:t=>((e,t)=>{if(c)return;let r=new Set(y);for(let l of v[e])t?r.add(l.name):r.delete(l.name);i(Array.from(r))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!C&&(0,t.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:m.description}),!C&&(0,t.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!d||e.name.toLowerCase().includes(d.toLowerCase())||(e.description??"").toLowerCase().includes(d.toLowerCase())).map(e=>{let r,s=(r=e.name,y.has(r));return(0,t.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!c?"cursor-pointer":""} ${s?"":"opacity-60"}`,onClick:()=>w(e.name),children:[(0,t.jsx)(l.Checkbox,{checked:s,onChange:()=>w(e.name),disabled:c,onClick:e=>e.stopPropagation()}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,t.jsx)(a.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,t.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded shrink-0 ${s?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:s?"on":"off"})]},e.name)})})]},e)})})}],531516)},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),l=e.i(673706),a=e.i(271645);let s={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"},n={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"},o={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"},i={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,s,"gridColsLg",0,i,"gridColsMd",0,o,"gridColsSm",0,n],46757);let c=(0,l.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=a.default.forwardRef((e,l)=>{let{numItems:u=1,numItemsSm:m,numItemsMd:p,numItemsLg:g,children:f,className:h}=e,x=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=d(u,s),v=d(m,n),y=d(p,o),w=d(g,i),k=(0,r.tremorTwMerge)(b,v,y,w);return a.default.createElement("div",Object.assign({ref:l,className:(0,r.tremorTwMerge)(c("root"),"grid",k,h)},x),f)});u.displayName="Grid",e.s(["Grid",0,u],350967)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["UploadOutlined",0,s],519756)},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},695411,e=>{"use strict";var t=e.i(602869);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["RobotOutlined",0,s],983561)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(779241),a=e.i(599724),s=e.i(199133),n=e.i(983561),o=e.i(343488),i=e.i(695411);e.s(["default",0,({accessToken:e,value:c,placeholder:d="Select a Model",onChange:u,disabled:m=!1,style:p,className:g,showLabel:f=!0,labelText:h="Select Model"})=>{let[x,b]=(0,r.useState)(c),[v,y]=(0,r.useState)(!1),[w,k]=(0,r.useState)([]);(0,r.useEffect)(()=>{b(c)},[c]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,i.fetchAvailableModels)(e);t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]);let C=(0,o.useDebouncedCallback)(e=>{b(e),u?.(e)},{wait:500});return(0,t.jsxs)("div",{children:[f&&(0,t.jsxs)(a.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(n.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(s.Select,{value:x,placeholder:d,onChange:e=>{"custom"===e?(y(!0),b(void 0)):(y(!1),b(e),u&&u(e))},options:[...Array.from(new Set(w.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...p},showSearch:!0,className:`rounded-md ${g||""}`,disabled:m}),v&&(0,t.jsx)(l.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:C,disabled:m})]})}])},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3fqu7hpcrtg67.js b/litellm/proxy/_experimental/out/_next/static/chunks/0b4c0ak_j76h0.js
similarity index 96%
rename from litellm/proxy/_experimental/out/_next/static/chunks/3fqu7hpcrtg67.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0b4c0ak_j76h0.js
index 6bde292693f..688fde3f0bc 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3fqu7hpcrtg67.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0b4c0ak_j76h0.js
@@ -1 +1 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let A=(0,i.normalizeRootPath)(l);return A&&(e===A||e.startsWith(`${A}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let A={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,A],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let d={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,d],434339);let o={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let A={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let d={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,d],837957);let o={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,o],227247);let u={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,u],708889);let h={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,h],859320);let n={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],586455);let c={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,c],921117);let g={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],21296);let f={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,f],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let A={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let d={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let A={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let d={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,d],768493);let o={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,o],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),A=e.i(901539),s=e.i(434339),d=e.i(857152),o=e.i(922158),u=e.i(896614),h=e.i(9774),n=e.i(503119),c=e.i(272896),g=e.i(144923),f=e.i(562171),m=e.i(533881),p=e.i(837957),b=e.i(227247),x=e.i(708889),I=e.i(859320),E=e.i(586455),C=e.i(921117),w=e.i(21296),O=e.i(579967),_=e.i(336712),v=e.i(770752),R=e.i(383963),L=e.i(862493),k=e.i(902860),B=e.i(901372),T=e.i(206258),H=e.i(176228),M=e.i(728685),U=e.i(39182),S=e.i(272967),D=e.i(551726),q=e.i(399495),y=e.i(740876),N=e.i(709103),W=e.i(277207),z=e.i(836473),P=e.i(768493),Q=e.i(297720),G=e.i(980385);let F={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},V={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},K={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},Y={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},j={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},X={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},Z={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},eA={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},ed={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},eo={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},eu={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},eh={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var en=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let ec={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eg=new Set(["bedrock_mantle"]),ef={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":G.default.src,Anthropic:A.default.src,"Anthropic Text":A.default.src,AssemblyAI:s.default.src,Azure:U.default.src,"Azure AI Foundry (Studio)":U.default.src,"Azure Text":U.default.src,Baseten:d.default.src,"Amazon Bedrock":o.default.src,"Amazon Bedrock Mantle":o.default.src,"AWS SageMaker":o.default.src,Cerebras:u.default.src,Cloudflare:h.default.src,Codestral:D.default.src,Cohere:n.default.src,"Cohere Chat":n.default.src,Cometapi:c.default.src,Cursor:g.default.src,"Databricks (Qwen API)":f.default.src,Dashscope:Y.src,Deepseek:b.default.src,Deepgram:m.default.src,DeepInfra:p.default.src,ElevenLabs:x.default.src,"Fal AI":I.default.src,"Featherless Ai":E.default.src,"Fireworks AI":C.default.src,Friendliai:w.default.src,"Github Copilot":O.default.src,"Google AI Studio":_.default.src,Groq:v.default.src,vllm:eA.src,Huggingface:R.default.src,Hyperbolic:L.default.src,Infinity:k.default.src,"Jina AI":B.default.src,"Lambda Ai":T.default.src,"Lm Studio":H.default.src,"Meta Llama":M.default.src,MiniMax:S.default.src,"Mistral AI":D.default.src,Moonshot:q.default.src,Morph:y.default.src,Nebius:N.default.src,Novita:W.default.src,"Nvidia Nim":z.default.src,Ollama:Q.default.src,"Ollama Chat":Q.default.src,Oobabooga:G.default.src,OpenAI:G.default.src,"Openai Like":G.default.src,"OpenAI Text Completion":G.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":G.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":G.default.src,Openrouter:F.src,"Oracle Cloud Infrastructure (OCI)":V.src,Perplexity:K.src,Recraft:j.src,Replicate:J.src,RunwayML:X.src,Sagemaker:o.default.src,Sambanova:Z.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":D.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:P.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":_.default.src,"Vertex Ai Beta":_.default.src,Vllm:eA.src,VolcEngine:es.src,"Voyage AI":ed.src,Watsonx:eo.src,"Watsonx Text":eo.src,xAI:eu.src,Xinference:eh.src};e.s(["Providers",()=>en,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(ef[e])??"",displayName:e}}let t=Object.keys(ec).find(t=>ec[t].toLowerCase()===e.toLowerCase())??Object.keys(ec).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=en[t];return{logo:(0,i.resolveLogoSrc)(ef[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=ec[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eg.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,ef,"provider_map",0,ec],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),l=e.i(555987);e.s(["Logo",0,({provider:e,src:r,label:A,className:s="w-4 h-4"})=>{let[d,o]=(0,i.useState)(null),u=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,l.resolveLogoSrc)(r)??"",h=A??e??"";return d!==u&&u?(0,t.jsx)("img",{src:u,alt:`${h||"-"} logo`,className:s,onError:()=>{console.warn(`Logo failed to load: ${u}`),o(u)}}):(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:h.charAt(0)||"-"})}])},695411,e=>{"use strict";var t=e.i(602869);let i=async e=>{try{let i=await (0,t.modelHubCall)(e);if(i?.data.length>0){let e=i.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,i])},389083,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(829087),l=e.i(480731),r=e.i(95779),A=e.i(444755),s=e.i(673706);let d={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"}},o={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"}},u=(0,s.makeClassName)("Badge"),h=i.default.forwardRef((e,h)=>{let{color:n,icon:c,size:g=l.Sizes.SM,tooltip:f,className:m,children:p}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),x=c||null,{tooltipProps:I,getReferenceProps:E}=(0,a.useTooltip)();return i.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([h,I.refs.setReference]),className:(0,A.tremorTwMerge)(u("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",n?(0,A.tremorTwMerge)((0,s.getColorClassNames)(n,r.colorPalette.background).bgColor,(0,s.getColorClassNames)(n,r.colorPalette.iconText).textColor,(0,s.getColorClassNames)(n,r.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,A.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),d[g].paddingX,d[g].paddingY,d[g].fontSize,m)},E,b),i.default.createElement(a.default,Object.assign({text:f},I)),x?i.default.createElement(x,{className:(0,A.tremorTwMerge)(u("icon"),"shrink-0 -ml-1 mr-1.5",o[g].height,o[g].width)}):null,i.default.createElement("span",{className:(0,A.tremorTwMerge)(u("text"),"whitespace-nowrap")},p))});h.displayName="Badge",e.s(["Badge",0,h],389083)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["default",0,r],597440)},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["default",0,r],184163)},530212,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,i],530212)}]);
\ No newline at end of file
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let A=(0,i.normalizeRootPath)(l);return A&&(e===A||e.startsWith(`${A}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let A={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,A],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let d={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,d],434339);let o={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let A={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let d={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,d],837957);let o={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,o],227247);let u={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,u],708889);let h={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,h],859320);let n={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],586455);let c={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,c],921117);let g={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],21296);let f={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,f],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let A={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let d={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let A={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let d={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,d],768493);let o={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,o],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),A=e.i(901539),s=e.i(434339),d=e.i(857152),o=e.i(922158),u=e.i(896614),h=e.i(9774),n=e.i(503119),c=e.i(272896),g=e.i(144923),f=e.i(562171),m=e.i(533881),p=e.i(837957),b=e.i(227247),x=e.i(708889),I=e.i(859320),E=e.i(586455),C=e.i(921117),w=e.i(21296),O=e.i(579967),_=e.i(336712),v=e.i(770752),R=e.i(383963),L=e.i(862493),k=e.i(902860),B=e.i(901372),T=e.i(206258),H=e.i(176228),M=e.i(728685),U=e.i(39182),S=e.i(272967),D=e.i(551726),q=e.i(399495),y=e.i(740876),N=e.i(709103),W=e.i(277207),z=e.i(836473),P=e.i(768493),Q=e.i(297720),G=e.i(980385);let F={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},V={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},K={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},Y={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},j={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},X={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},Z={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},eA={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},ed={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},eo={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},eu={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},eh={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var en=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let ec={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eg=new Set(["bedrock_mantle"]),ef={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":G.default.src,Anthropic:A.default.src,"Anthropic Text":A.default.src,AssemblyAI:s.default.src,Azure:U.default.src,"Azure AI Foundry (Studio)":U.default.src,"Azure Text":U.default.src,Baseten:d.default.src,"Amazon Bedrock":o.default.src,"Amazon Bedrock Mantle":o.default.src,"AWS SageMaker":o.default.src,Cerebras:u.default.src,Cloudflare:h.default.src,Codestral:D.default.src,Cohere:n.default.src,"Cohere Chat":n.default.src,Cometapi:c.default.src,Cursor:g.default.src,"Databricks (Qwen API)":f.default.src,Dashscope:Y.src,Deepseek:b.default.src,Deepgram:m.default.src,DeepInfra:p.default.src,ElevenLabs:x.default.src,"Fal AI":I.default.src,"Featherless Ai":E.default.src,"Fireworks AI":C.default.src,Friendliai:w.default.src,"Github Copilot":O.default.src,"Google AI Studio":_.default.src,Groq:v.default.src,vllm:eA.src,Huggingface:R.default.src,Hyperbolic:L.default.src,Infinity:k.default.src,"Jina AI":B.default.src,"Lambda Ai":T.default.src,"Lm Studio":H.default.src,"Meta Llama":M.default.src,MiniMax:S.default.src,"Mistral AI":D.default.src,Moonshot:q.default.src,Morph:y.default.src,Nebius:N.default.src,Novita:W.default.src,"Nvidia Nim":z.default.src,Ollama:Q.default.src,"Ollama Chat":Q.default.src,Oobabooga:G.default.src,OpenAI:G.default.src,"Openai Like":G.default.src,"OpenAI Text Completion":G.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":G.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":G.default.src,Openrouter:F.src,"Oracle Cloud Infrastructure (OCI)":V.src,Perplexity:K.src,Recraft:j.src,Replicate:J.src,RunwayML:X.src,Sagemaker:o.default.src,Sambanova:Z.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":D.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:P.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":_.default.src,"Vertex Ai Beta":_.default.src,Vllm:eA.src,VolcEngine:es.src,"Voyage AI":ed.src,Watsonx:eo.src,"Watsonx Text":eo.src,xAI:eu.src,Xinference:eh.src};e.s(["Providers",()=>en,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(ef[e])??"",displayName:e}}let t=Object.keys(ec).find(t=>ec[t].toLowerCase()===e.toLowerCase())??Object.keys(ec).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=en[t];return{logo:(0,i.resolveLogoSrc)(ef[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=ec[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eg.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,ef,"provider_map",0,ec],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),l=e.i(555987);e.s(["Logo",0,({provider:e,src:r,label:A,className:s="w-4 h-4"})=>{let[d,o]=(0,i.useState)(null),u=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,l.resolveLogoSrc)(r)??"",h=A??e??"";return d!==u&&u?(0,t.jsx)("img",{src:u,alt:`${h||"-"} logo`,className:s,onError:()=>{console.warn(`Logo failed to load: ${u}`),o(u)}}):(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:h.charAt(0)||"-"})}])},695411,e=>{"use strict";var t=e.i(602869);let i=async e=>{try{let i=await (0,t.modelHubCall)(e);if(i?.data.length>0){let e=i.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,i])},389083,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(829087),l=e.i(480731),r=e.i(95779),A=e.i(444755),s=e.i(673706);let d={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"}},o={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"}},u=(0,s.makeClassName)("Badge"),h=i.default.forwardRef((e,h)=>{let{color:n,icon:c,size:g=l.Sizes.SM,tooltip:f,className:m,children:p}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),x=c||null,{tooltipProps:I,getReferenceProps:E}=(0,a.useTooltip)();return i.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([h,I.refs.setReference]),className:(0,A.tremorTwMerge)(u("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",n?(0,A.tremorTwMerge)((0,s.getColorClassNames)(n,r.colorPalette.background).bgColor,(0,s.getColorClassNames)(n,r.colorPalette.iconText).textColor,(0,s.getColorClassNames)(n,r.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,A.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),d[g].paddingX,d[g].paddingY,d[g].fontSize,m)},E,b),i.default.createElement(a.default,Object.assign({text:f},I)),x?i.default.createElement(x,{className:(0,A.tremorTwMerge)(u("icon"),"shrink-0 -ml-1 mr-1.5",o[g].height,o[g].width)}):null,i.default.createElement("span",{className:(0,A.tremorTwMerge)(u("text"),"whitespace-nowrap")},p))});h.displayName="Badge",e.s(["Badge",0,h],389083)},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["default",0,r],184163)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["default",0,r],597440)},530212,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,i],530212)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0bzsgiuwi1q0e.js b/litellm/proxy/_experimental/out/_next/static/chunks/0bzsgiuwi1q0e.js
deleted file mode 100644
index 841c4509688..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0bzsgiuwi1q0e.js
+++ /dev/null
@@ -1,7 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,r=t.serverRootPath)=>{let l;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let o=(0,i.normalizeRootPath)(r);return o&&(e===o||e.startsWith(`${o}/`))?e:(l=(0,i.normalizeRootPath)(r),`${l}${e.startsWith("/")?e:`/${e}`}`)}],555987);let r={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,r],938137);let l={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,l],301035);let o={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,o],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let n={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,n],434339);let d={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],857152)},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let r={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],272896);let l={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],144923);let o={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let n={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,n],837957);let d={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,d],227247);let c={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,c],708889);let u={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,u],859320);let A={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],586455);let h={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],921117);let g={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],21296);let f={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,f],579967)},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let r={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,r],902860);let l={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,l],901372);let o={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let n={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],728685)},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let r={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],740876);let l={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],709103);let o={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let n={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,n],768493);let d={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,d],297720)},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),r=e.i(301035),l=e.i(470524),o=e.i(901539),s=e.i(434339),n=e.i(857152),d=e.i(922158),c=e.i(896614),u=e.i(9774),A=e.i(503119),h=e.i(272896),g=e.i(144923),f=e.i(562171),m=e.i(533881),p=e.i(837957),b=e.i(227247),x=e.i(708889),v=e.i(859320),C=e.i(586455),E=e.i(921117),I=e.i(21296),w=e.i(579967),O=e.i(336712),k=e.i(770752),y=e.i(383963),S=e.i(862493),R=e.i(902860),_=e.i(901372),L=e.i(206258),T=e.i(176228),B=e.i(728685),M=e.i(39182),z=e.i(272967),D=e.i(551726),N=e.i(399495),H=e.i(740876),q=e.i(709103),P=e.i(277207),U=e.i(836473),W=e.i(768493),G=e.i(297720),Q=e.i(980385);let $={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},F={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},V={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},j={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},K={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},Y={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},X={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},J={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},Z={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},eo={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},en={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},ed={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},ec={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},eu={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eA=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eh={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eg=new Set(["bedrock_mantle"]),ef={"A2A Agent":a.default.src,Ai21:r.default.src,"Ai21 Chat":r.default.src,"AI/ML API":l.default.src,"Aiohttp Openai":Q.default.src,Anthropic:o.default.src,"Anthropic Text":o.default.src,AssemblyAI:s.default.src,Azure:M.default.src,"Azure AI Foundry (Studio)":M.default.src,"Azure Text":M.default.src,Baseten:n.default.src,"Amazon Bedrock":d.default.src,"Amazon Bedrock Mantle":d.default.src,"AWS SageMaker":d.default.src,Cerebras:c.default.src,Cloudflare:u.default.src,Codestral:D.default.src,Cohere:A.default.src,"Cohere Chat":A.default.src,Cometapi:h.default.src,Cursor:g.default.src,"Databricks (Qwen API)":f.default.src,Dashscope:j.src,Deepseek:b.default.src,Deepgram:m.default.src,DeepInfra:p.default.src,ElevenLabs:x.default.src,"Fal AI":v.default.src,"Featherless Ai":C.default.src,"Fireworks AI":E.default.src,Friendliai:I.default.src,"Github Copilot":w.default.src,"Google AI Studio":O.default.src,Groq:k.default.src,vllm:eo.src,Huggingface:y.default.src,Hyperbolic:S.default.src,Infinity:R.default.src,"Jina AI":_.default.src,"Lambda Ai":L.default.src,"Lm Studio":T.default.src,"Meta Llama":B.default.src,MiniMax:z.default.src,"Mistral AI":D.default.src,Moonshot:N.default.src,Morph:H.default.src,Nebius:q.default.src,Novita:P.default.src,"Nvidia Nim":U.default.src,Ollama:G.default.src,"Ollama Chat":G.default.src,Oobabooga:Q.default.src,OpenAI:Q.default.src,"Openai Like":Q.default.src,"OpenAI Text Completion":Q.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":Q.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":Q.default.src,Openrouter:$.src,"Oracle Cloud Infrastructure (OCI)":F.src,Perplexity:V.src,Recraft:K.src,Replicate:Y.src,RunwayML:X.src,Sagemaker:d.default.src,Sambanova:J.src,"SAP Generative AI Hub":Z.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":D.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:W.default.src,V0:er.src,"Vercel Ai Gateway":el.src,"Vertex AI (Anthropic, Gemini, etc.)":O.default.src,"Vertex Ai Beta":O.default.src,Vllm:eo.src,VolcEngine:es.src,"Voyage AI":en.src,Watsonx:ed.src,"Watsonx Text":ed.src,xAI:ec.src,Xinference:eu.src};e.s(["Providers",()=>eA,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(ef[e])??"",displayName:e}}let t=Object.keys(eh).find(t=>eh[t].toLowerCase()===e.toLowerCase())??Object.keys(eh).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=eA[t];return{logo:(0,i.resolveLogoSrc)(ef[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=eh[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let r=t.litellm_provider,l="string"==typeof r&&(r.startsWith(`${i}_`)||r.startsWith(`${i}-`));(r===i||l&&!eg.has(r))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,ef,"provider_map",0,eh],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),r=e.i(555987);e.s(["Logo",0,({provider:e,src:l,label:o,className:s="w-4 h-4"})=>{let[n,d]=(0,i.useState)(null),c=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,r.resolveLogoSrc)(l)??"",u=o??e??"";return n!==c&&c?(0,t.jsx)("img",{src:c,alt:`${u||"-"} logo`,className:s,onError:()=>{console.warn(`Logo failed to load: ${c}`),d(c)}}):(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:u.charAt(0)||"-"})}])},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var r=e.i(9583),l=i.forwardRef(function(e,l){return i.createElement(r.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["CheckCircleOutlined",0,l],245704)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var r=e.i(9583),l=i.forwardRef(function(e,l){return i.createElement(r.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ClockCircleOutlined",0,l],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var r=e.i(9583),l=i.forwardRef(function(e,l){return i.createElement(r.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var r=e.i(9583),l=i.forwardRef(function(e,l){return i.createElement(r.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ArrowLeftOutlined",0,l],447566)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),i=e.i(95779),a=e.i(444755),r=e.i(673706),l=e.i(271645);let o=l.default.forwardRef((e,o)=>{let{color:s,children:n,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:o,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",s?(0,r.getColorClassNames)(s,i.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),n)});o.displayName="Title",e.s(["Title",0,o],629569)},304967,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(480731),r=e.i(95779),l=e.i(444755),o=e.i(673706);let s=(0,o.makeClassName)("Card"),n=i.default.forwardRef((e,n)=>{let{decoration:d="",decorationColor:c,children:u,className:A}=e,h=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return i.default.createElement("div",Object.assign({ref:n,className:(0,l.tremorTwMerge)(s("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",c?(0,o.getColorClassNames)(c,r.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),A)},h),u)});n.displayName="Card",e.s(["Card",0,n],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),i=e.i(209428),a=e.i(211577),r=e.i(392221),l=e.i(703923),o=e.i(343794),s=e.i(914949),n=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,n.forwardRef)(function(e,c){var u=e.prefixCls,A=void 0===u?"rc-checkbox":u,h=e.className,g=e.style,f=e.checked,m=e.disabled,p=e.defaultChecked,b=e.type,x=void 0===b?"checkbox":b,v=e.title,C=e.onChange,E=(0,l.default)(e,d),I=(0,n.useRef)(null),w=(0,n.useRef)(null),O=(0,s.default)(void 0!==p&&p,{value:f}),k=(0,r.default)(O,2),y=k[0],S=k[1];(0,n.useImperativeHandle)(c,function(){return{focus:function(e){var t;null==(t=I.current)||t.focus(e)},blur:function(){var e;null==(e=I.current)||e.blur()},input:I.current,nativeElement:w.current}});var R=(0,o.default)(A,h,(0,a.default)((0,a.default)({},"".concat(A,"-checked"),y),"".concat(A,"-disabled"),m));return n.createElement("span",{className:R,title:v,style:g,ref:w},n.createElement("input",(0,t.default)({},E,{className:"".concat(A,"-input"),ref:I,onChange:function(t){m||("checked"in e||S(t.target.checked),null==C||C({target:(0,i.default)((0,i.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:m,checked:!!y,type:x})),n.createElement("span",{className:"".concat(A,"-inner")}))});e.s(["default",0,c],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=n.default.useRef(null),i=()=>{u.default.cancel(t.current),t.current=null};return[()=>{i(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),i()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(91874),r=e.i(611935),l=e.i(121872),o=e.i(26905),s=e.i(242064),n=e.i(937328),d=e.i(321883),c=e.i(62139);let u=t.default.createContext(null);e.i(296059);var A=e.i(915654),h=e.i(183293),g=e.i(246422),f=e.i(838378);function m(e,t){return(e=>{let{checkboxCls:t}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[i]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,h.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,A.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,A.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
- ${i}:not(${i}-disabled),
- ${t}:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
- ${i}-checked:not(${i}-disabled),
- ${t}-checked:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${i}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,f.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let p=(0,g.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[m(t,e)]);e.s(["default",0,p,"getStyle",0,m],236836);var b=e.i(681216),x=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(i[a[r]]=e[a[r]]);return i};let v=t.forwardRef((e,A)=>{var h;let{prefixCls:g,className:f,rootClassName:m,children:v,indeterminate:C=!1,style:E,onMouseEnter:I,onMouseLeave:w,skipGroup:O=!1,disabled:k}=e,y=x(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:S,direction:R,checkbox:_}=t.useContext(s.ConfigContext),L=t.useContext(u),{isFormItemInput:T}=t.useContext(c.FormItemInputContext),B=t.useContext(n.default),M=null!=(h=(null==L?void 0:L.disabled)||k)?h:B,z=t.useRef(y.value),D=t.useRef(null),N=(0,r.composeRef)(A,D);t.useEffect(()=>{null==L||L.registerValue(y.value)},[]),t.useEffect(()=>{if(!O)return y.value!==z.current&&(null==L||L.cancelValue(z.current),null==L||L.registerValue(y.value),z.current=y.value),()=>null==L?void 0:L.cancelValue(y.value)},[y.value]),t.useEffect(()=>{var e;(null==(e=D.current)?void 0:e.input)&&(D.current.input.indeterminate=C)},[C]);let H=S("checkbox",g),q=(0,d.default)(H),[P,U,W]=p(H,q),G=Object.assign({},y);L&&!O&&(G.onChange=(...e)=>{y.onChange&&y.onChange.apply(y,e),L.toggleOption&&L.toggleOption({label:v,value:y.value})},G.name=L.name,G.checked=L.value.includes(y.value));let Q=(0,i.default)(`${H}-wrapper`,{[`${H}-rtl`]:"rtl"===R,[`${H}-wrapper-checked`]:G.checked,[`${H}-wrapper-disabled`]:M,[`${H}-wrapper-in-form-item`]:T},null==_?void 0:_.className,f,m,W,q,U),$=(0,i.default)({[`${H}-indeterminate`]:C},o.TARGET_CLS,U),[F,V]=(0,b.default)(G.onClick);return P(t.createElement(l.default,{component:"Checkbox",disabled:M},t.createElement("label",{className:Q,style:Object.assign(Object.assign({},null==_?void 0:_.style),E),onMouseEnter:I,onMouseLeave:w,onClick:F},t.createElement(a.default,Object.assign({},G,{onClick:V,prefixCls:H,className:$,disabled:M,ref:N})),null!=v&&t.createElement("span",{className:`${H}-label`},v))))});var C=e.i(8211),E=e.i(529681),I=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(i[a[r]]=e[a[r]]);return i};let w=t.forwardRef((e,a)=>{let{defaultValue:r,children:l,options:o=[],prefixCls:n,className:c,rootClassName:A,style:h,onChange:g}=e,f=I(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:m,direction:b}=t.useContext(s.ConfigContext),[x,w]=t.useState(f.value||r||[]),[O,k]=t.useState([]);t.useEffect(()=>{"value"in f&&w(f.value||[])},[f.value]);let y=t.useMemo(()=>o.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[o]),S=e=>{k(t=>t.filter(t=>t!==e))},R=e=>{k(t=>[].concat((0,C.default)(t),[e]))},_=e=>{let t=x.indexOf(e.value),i=(0,C.default)(x);-1===t?i.push(e.value):i.splice(t,1),"value"in f||w(i),null==g||g(i.filter(e=>O.includes(e)).sort((e,t)=>y.findIndex(t=>t.value===e)-y.findIndex(e=>e.value===t)))},L=m("checkbox",n),T=`${L}-group`,B=(0,d.default)(L),[M,z,D]=p(L,B),N=(0,E.default)(f,["value","disabled"]),H=o.length?y.map(e=>t.createElement(v,{prefixCls:L,key:e.value.toString(),disabled:"disabled"in e?e.disabled:f.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,i.default)(`${T}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):l,q=t.useMemo(()=>({toggleOption:_,value:x,disabled:f.disabled,name:f.name,registerValue:R,cancelValue:S}),[_,x,f.disabled,f.name,R,S]),P=(0,i.default)(T,{[`${T}-rtl`]:"rtl"===b},c,A,D,B,z);return M(t.createElement("div",Object.assign({className:P,style:h},N,{ref:a}),t.createElement(u.Provider,{value:q},H)))});v.Group=w,v.__ANT_CHECKBOX=!0,e.s(["default",0,v],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},244451,e=>{"use strict";let t;e.i(247167);var i=e.i(271645),a=e.i(343794),r=e.i(242064),l=e.i(763731),o=e.i(174428);let s=80*Math.PI,n=e=>{let{dotClassName:t,style:r,hasCircleCls:l}=e;return i.createElement("circle",{className:(0,a.default)(`${t}-circle`,{[`${t}-circle-bg`]:l}),r:40,cx:50,cy:50,strokeWidth:20,style:r})},d=({percent:e,prefixCls:t})=>{let r=`${t}-dot`,l=`${r}-holder`,d=`${l}-hidden`,[c,u]=i.useState(!1);(0,o.default)(()=>{0!==e&&u(!0)},[0!==e]);let A=Math.max(Math.min(e,100),0);if(!c)return null;let h={strokeDashoffset:`${s/4}`,strokeDasharray:`${s*A/100} ${s*(100-A)/100}`};return i.createElement("span",{className:(0,a.default)(l,`${r}-progress`,A<=0&&d)},i.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":A},i.createElement(n,{dotClassName:r,hasCircleCls:!0}),i.createElement(n,{dotClassName:r,style:h})))};function c(e){let{prefixCls:t,percent:r=0}=e,l=`${t}-dot`,o=`${l}-holder`,s=`${o}-hidden`;return i.createElement(i.Fragment,null,i.createElement("span",{className:(0,a.default)(o,r>0&&s)},i.createElement("span",{className:(0,a.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>i.createElement("i",{className:`${t}-dot-item`,key:e})))),i.createElement(d,{prefixCls:t,percent:r}))}function u(e){var t;let{prefixCls:r,indicator:o,percent:s}=e,n=`${r}-dot`;return o&&i.isValidElement(o)?(0,l.cloneElement)(o,{className:(0,a.default)(null==(t=o.props)?void 0:t.className,n),percent:s}):i.createElement(c,{prefixCls:r,percent:s})}e.i(296059);var A=e.i(694758),h=e.i(183293),g=e.i(246422),f=e.i(838378);let m=new A.Keyframes("antSpinMove",{to:{opacity:1}}),p=new A.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),b=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:i}=e;return{[t]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:i(i(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 ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:i(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:i(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:i(i(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:i(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:i(i(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${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 ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:i(e.dotSize).sub(i(e.marginXXS).div(2)).div(2).equal(),height:i(e.dotSize).sub(i(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:m,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:p,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:i(i(e.dotSizeSM).sub(i(e.marginXXS).div(2))).div(2).equal(),height:i(i(e.dotSizeSM).sub(i(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:i(i(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:i(i(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:i}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:i}}),x=[[30,.05],[70,.03],[96,.01]];var v=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(i[a[r]]=e[a[r]]);return i};let C=e=>{var l;let{prefixCls:o,spinning:s=!0,delay:n=0,className:d,rootClassName:c,size:A="default",tip:h,wrapperClassName:g,style:f,children:m,fullscreen:p=!1,indicator:C,percent:E}=e,I=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:w,direction:O,className:k,style:y,indicator:S}=(0,r.useComponentConfig)("spin"),R=w("spin",o),[_,L,T]=b(R),[B,M]=i.useState(()=>s&&(!s||!n||!!Number.isNaN(Number(n)))),z=function(e,t){let[a,r]=i.useState(0),l=i.useRef(null),o="auto"===t;return i.useEffect(()=>(o&&e&&(r(0),l.current=setInterval(()=>{r(e=>{let t=100-e;for(let i=0;i{l.current&&(clearInterval(l.current),l.current=null)}),[o,e]),o?a:t}(B,E);i.useEffect(()=>{if(s){let e=function(e,t,i){var a,r=i||{},l=r.noTrailing,o=void 0!==l&&l,s=r.noLeading,n=void 0!==s&&s,d=r.debounceMode,c=void 0===d?void 0:d,u=!1,A=0;function h(){a&&clearTimeout(a)}function g(){for(var i=arguments.length,r=Array(i),l=0;le?n?(A=Date.now(),o||(a=setTimeout(c?f:g,e))):g():!0!==o&&(a=setTimeout(c?f:g,void 0===c?e-d:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;h(),u=!(void 0!==t&&t)},g}(n,()=>{M(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}M(!1)},[n,s]);let D=i.useMemo(()=>void 0!==m&&!p,[m,p]),N=(0,a.default)(R,k,{[`${R}-sm`]:"small"===A,[`${R}-lg`]:"large"===A,[`${R}-spinning`]:B,[`${R}-show-text`]:!!h,[`${R}-rtl`]:"rtl"===O},d,!p&&c,L,T),H=(0,a.default)(`${R}-container`,{[`${R}-blur`]:B}),q=null!=(l=null!=C?C:S)?l:t,P=Object.assign(Object.assign({},y),f),U=i.createElement("div",Object.assign({},I,{style:P,className:N,"aria-live":"polite","aria-busy":B}),i.createElement(u,{prefixCls:R,indicator:q,percent:z}),h&&(D||p)?i.createElement("div",{className:`${R}-text`},h):null);return _(D?i.createElement("div",Object.assign({},I,{className:(0,a.default)(`${R}-nested-loading`,g,L,T)}),B&&i.createElement("div",{key:"loading"},U),i.createElement("div",{className:H,key:"container"},m)):p?i.createElement("div",{className:(0,a.default)(`${R}-fullscreen`,{[`${R}-fullscreen-show`]:B},c,L,T)},U):U)};C.setDefaultIndicator=e=>{t=e},e.s(["default",0,C],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var r=e.i(9583),l=i.forwardRef(function(e,l){return i.createElement(r.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],184163)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},389083,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(829087),r=e.i(480731),l=e.i(95779),o=e.i(444755),s=e.i(673706);let n={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"}},d={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"}},c=(0,s.makeClassName)("Badge"),u=i.default.forwardRef((e,u)=>{let{color:A,icon:h,size:g=r.Sizes.SM,tooltip:f,className:m,children:p}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),x=h||null,{tooltipProps:v,getReferenceProps:C}=(0,a.useTooltip)();return i.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([u,v.refs.setReference]),className:(0,o.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",A?(0,o.tremorTwMerge)((0,s.getColorClassNames)(A,l.colorPalette.background).bgColor,(0,s.getColorClassNames)(A,l.colorPalette.iconText).textColor,(0,s.getColorClassNames)(A,l.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,o.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),n[g].paddingX,n[g].paddingY,n[g].fontSize,m)},C,b),i.default.createElement(a.default,Object.assign({text:f},v)),x?i.default.createElement(x,{className:(0,o.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",d[g].height,d[g].width)}):null,i.default.createElement("span",{className:(0,o.tremorTwMerge)(c("text"),"whitespace-nowrap")},p))});u.displayName="Badge",e.s(["Badge",0,u],389083)},530212,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,i],530212)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var r=e.i(9583),l=i.forwardRef(function(e,l){return i.createElement(r.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["StopOutlined",0,l],724154)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0cgtkk6qelb_j.js b/litellm/proxy/_experimental/out/_next/static/chunks/0cgtkk6qelb_j.js
deleted file mode 100644
index c8d901e4bef..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0cgtkk6qelb_j.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,526612,e=>{"use strict";var t=e.i(843476),a=e.i(109799),i=e.i(625901),s=e.i(950594),r=e.i(115504),n=e.i(741466),l=e.i(343488),o=e.i(271645);let d=({placeholder:e,value:a,onChange:i,icon:d,className:c})=>{let[m,u]=(0,o.useState)(a);(0,o.useEffect)(()=>{u(a)},[a]);let g=(0,l.useDebouncedCallback)(e=>i(e),{wait:n.DEBOUNCE_WAIT_MS});return(0,t.jsxs)(s.InputGroup,{className:(0,r.cx)("w-64",c),children:[d&&(0,t.jsx)(s.InputGroupAddon,{children:(0,t.jsx)(d,{className:"size-4 text-muted-foreground"})}),(0,t.jsx)(s.InputGroupInput,{placeholder:e,value:m,onChange:e=>{let t=e.target.value;u(t),g(t)}})]})};var c=e.i(519455);let m=(0,e.i(475254).default)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),u=({onClick:e,active:a,hasActiveFilters:i,label:s="Filters"})=>(0,t.jsxs)("span",{className:"relative inline-flex",children:[(0,t.jsxs)(c.Button,{variant:"outline",onClick:e,className:(0,r.cn)(a&&"bg-muted"),children:[(0,t.jsx)(m,{className:"size-4"}),s]}),i&&(0,t.jsx)("sup",{"aria-hidden":"true",className:"absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-primary"})]});var g=e.i(367240);let x=({onClick:e,label:a="Reset Filters"})=>(0,t.jsxs)(c.Button,{variant:"outline",onClick:e,children:[(0,t.jsx)(g.RotateCcw,{className:"size-4"}),a]});var p=e.i(555436),h=e.i(284614);let b=({filters:e,showFilters:a,onToggleFilters:i,onChange:s,onReset:r})=>{let n=!!(e.org_id||e.org_alias);return(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(d,{placeholder:"Search by Organization Name",value:e.org_alias,onChange:e=>s("org_alias",e),icon:p.Search,className:"w-64"}),(0,t.jsx)(u,{onClick:()=>i(!a),active:a,hasActiveFilters:n}),(0,t.jsx)(x,{onClick:r})]}),a&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:(0,t.jsx)(d,{placeholder:"Search by Organization ID",value:e.org_id,onChange:e=>s("org_id",e),icon:h.User,className:"w-64"})})]})};var j=e.i(912598),_=e.i(127952),v=e.i(727749),f=e.i(602869),z=e.i(954616),y=e.i(162386),C=e.i(75921),N=e.i(223210),S=e.i(182668),w=e.i(776639),M=e.i(793479),T=e.i(967489),k=e.i(624687),O=e.i(916940),F=e.i(991326),D=e.i(768371);let P=e=>"boolean"==typeof e?e:Array.isArray(e)?e.some(P):null!==e&&"object"==typeof e&&Object.values(e).some(P);var A=e.i(681307);let I=A.z.object({max_budget:A.z.number().nullish(),budget_duration:A.z.string().nullish(),tpm_limit:A.z.number().nullish(),rpm_limit:A.z.number().nullish()}),B=A.z.record(A.z.string(),A.z.unknown()),L=e=>""===e.trim()?null:Number(e),R=A.z.string().refine(e=>""===e.trim()||/^\d+$/.test(e.trim()),"Must be a non-negative whole number"),U=A.z.string().refine(e=>""===e.trim()||Number.isFinite(Number(e))&&Number(e)>=0,"Must be a non-negative number"),E={organization_alias:A.z.string().min(1,"Please input an organization name"),models:A.z.array(A.z.string()),max_budget:U,budget_duration:A.z.string(),tpm_limit:R,rpm_limit:R,vector_stores:A.z.array(A.z.string()),mcp:A.z.object({servers:A.z.array(A.z.string()),accessGroups:A.z.array(A.z.string()),toolsets:A.z.array(A.z.string())}),metadata:A.z.string().refine(e=>""===e.trim()||(e=>{try{let t=JSON.parse(e);return"object"==typeof t&&null!==t&&!Array.isArray(t)}catch{return!1}})(e),"Metadata must be a valid JSON object")},K=A.z.object(E),V="never",q=[{value:V,label:"No reset"},{value:"24h",label:"daily"},{value:"7d",label:"weekly"},{value:"30d",label:"monthly"}],G=async(e,t)=>{let{data:a}=await D.fetchClient.PATCH("/v2/organization/{organization_id}",{params:{path:{organization_id:e}},body:t});return a},Q=({organizationId:e,org:i,accessToken:s,onCancel:r,onSaved:n,patchOrganization:l=G})=>{let o,d=(0,j.useQueryClient)(),m=(0,F.useZodForm)(K,{defaultValues:(o=I.parse(i.litellm_budget_table??{}),{organization_alias:i.organization_alias??"",models:i.models??[],max_budget:o.max_budget?.toString()??"",budget_duration:o.budget_duration??"",tpm_limit:o.tpm_limit?.toString()??"",rpm_limit:o.rpm_limit?.toString()??"",vector_stores:i.object_permission?.vector_stores??[],mcp:{servers:i.object_permission?.mcp_servers??[],accessGroups:i.object_permission?.mcp_access_groups??[],toolsets:i.object_permission?.mcp_toolsets??[]},metadata:i.metadata&&Object.keys(i.metadata).length>0?JSON.stringify(i.metadata,null,2):""})}),{isDirty:u}=m.formState,g=(0,z.useMutation)({mutationFn:t=>l(e,t),onSuccess:()=>{v.default.success("Organization settings updated successfully"),d.invalidateQueries({queryKey:a.organizationKeys.all}),n()},onError:e=>v.default.fromBackend(e instanceof Error?e.message:"Failed to update organization settings")}),x=m.handleSubmit(e=>{var t;let a,i,s;g.mutate((i=(e=>{if(void 0!==e.vector_stores||void 0!==e.mcp)return{...void 0!==e.vector_stores&&{vector_stores:e.vector_stores},...void 0!==e.mcp&&{mcp_servers:e.mcp.servers,mcp_access_groups:e.mcp.accessGroups,mcp_toolsets:e.mcp.toolsets}}})((a=m.formState.dirtyFields,t=Object.fromEntries(Object.keys(e).filter(e=>P(a[e])).map(t=>[t,e[t]])))),{...void 0!==t.organization_alias&&{organization_alias:t.organization_alias},...void 0!==t.models&&{models:t.models},...void 0!==t.max_budget&&{max_budget:L(t.max_budget)},...void 0!==t.tpm_limit&&{tpm_limit:L(t.tpm_limit)},...void 0!==t.rpm_limit&&{rpm_limit:L(t.rpm_limit)},...void 0!==t.budget_duration&&{budget_duration:""===t.budget_duration?null:t.budget_duration},...void 0!==t.metadata&&{metadata:""===(s=t.metadata).trim()?null:B.parse(JSON.parse(s))},...void 0!==i&&{object_permission:i}}))});return(0,t.jsxs)("form",{onSubmit:x,children:[(0,t.jsxs)(N.FieldGroup,{children:[(0,t.jsx)(S.FormField,{control:m.control,name:"organization_alias",label:"Organization Name",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e})}),(0,t.jsx)(S.FormField,{control:m.control,name:"models",label:"Models",children:e=>(0,t.jsx)(y.ModelSelect,{value:e.value,onChange:e.onChange,context:"organization",options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!0}})}),(0,t.jsx)(S.FormField,{control:m.control,name:"max_budget",label:"Max Budget (USD)",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e,type:"number",step:.01,min:0})}),(0,t.jsx)(S.FormField,{control:m.control,name:"budget_duration",label:"Reset Budget",children:({id:e,value:a,onChange:i,"aria-invalid":s,"aria-describedby":r})=>(0,t.jsxs)(T.Select,{items:q,value:""===a?V:a,onValueChange:e=>i(e===V?"":e),children:[(0,t.jsx)(T.SelectTrigger,{id:e,"aria-invalid":s,"aria-describedby":r,children:(0,t.jsx)(T.SelectValue,{})}),(0,t.jsx)(T.SelectContent,{children:q.map(e=>(0,t.jsx)(T.SelectItem,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(S.FormField,{control:m.control,name:"tpm_limit",label:"Tokens per minute Limit (TPM)",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e,type:"number",step:1,min:0})}),(0,t.jsx)(S.FormField,{control:m.control,name:"rpm_limit",label:"Requests per minute Limit (RPM)",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e,type:"number",step:1,min:0})}),(0,t.jsx)(S.FormField,{control:m.control,name:"vector_stores",label:"Vector Stores",children:e=>(0,t.jsx)(O.default,{value:e.value,onChange:e.onChange,accessToken:s,placeholder:"Select vector stores"})}),(0,t.jsx)(S.FormField,{control:m.control,name:"mcp",label:"MCP Servers & Access Groups",children:e=>(0,t.jsx)(C.default,{value:e.value,onChange:e.onChange,accessToken:s,placeholder:"Select MCP servers and access groups"})}),(0,t.jsx)(S.FormField,{control:m.control,name:"metadata",label:"Metadata",children:({ref:e,...a})=>(0,t.jsx)(k.Textarea,{...a,ref:e,rows:4})})]}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 -bottom-6 -inset-x-6 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{type:"button",variant:"outline",onClick:r,disabled:g.isPending,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",disabled:!u||g.isPending,children:g.isPending?"Saving...":"Save Changes"})]})})]})},H={organization_alias:"",models:[],max_budget:"",budget_duration:"",tpm_limit:"",rpm_limit:"",vector_stores:[],mcp:{servers:[],accessGroups:[],toolsets:[]},metadata:""},$=A.z.record(A.z.string(),A.z.unknown()),J=async e=>{let{data:t}=await D.fetchClient.POST("/organization/new",{body:e});return t},W=({open:e,onOpenChange:i,accessToken:s,createOrganization:r=J})=>{let n=(0,j.useQueryClient)(),l=(0,F.useZodForm)(K,{defaultValues:H}),o=(0,z.useMutation)({mutationFn:e=>r(e),onSuccess:()=>{v.default.success("Organization created successfully"),n.invalidateQueries({queryKey:a.organizationKeys.all}),l.reset(H),i(!1)},onError:e=>v.default.fromBackend(e instanceof Error?e.message:"Failed to create organization")}),d=e=>{(e||!o.isPending)&&(e||l.reset(H),i(e))},m=l.handleSubmit(e=>{if(!o.isPending){let t,a;o.mutate((a=Object.keys(t={...e.vector_stores.length>0&&{vector_stores:e.vector_stores},...e.mcp.servers.length>0&&{mcp_servers:e.mcp.servers},...e.mcp.accessGroups.length>0&&{mcp_access_groups:e.mcp.accessGroups},...e.mcp.toolsets.length>0&&{mcp_toolsets:e.mcp.toolsets}}).length>0?t:void 0,{organization_alias:e.organization_alias,models:e.models,...""!==e.max_budget.trim()&&{max_budget:Number(e.max_budget)},...""!==e.tpm_limit.trim()&&{tpm_limit:Number(e.tpm_limit)},...""!==e.rpm_limit.trim()&&{rpm_limit:Number(e.rpm_limit)},...""!==e.budget_duration&&{budget_duration:e.budget_duration},...""!==e.metadata.trim()&&{metadata:$.parse(JSON.parse(e.metadata))},...void 0!==a&&{object_permission:a}}))}});return(0,t.jsx)(w.Dialog,{open:e,onOpenChange:d,children:(0,t.jsxs)(w.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsx)(w.DialogHeader,{children:(0,t.jsx)(w.DialogTitle,{children:"Create Organization"})}),(0,t.jsxs)("form",{onSubmit:m,children:[(0,t.jsxs)(N.FieldGroup,{children:[(0,t.jsx)(S.FormField,{control:l.control,name:"organization_alias",label:"Organization Name",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e})}),(0,t.jsx)(S.FormField,{control:l.control,name:"models",label:"Models",children:e=>(0,t.jsx)(y.ModelSelect,{value:e.value,onChange:e.onChange,context:"organization",options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!0}})}),(0,t.jsx)(S.FormField,{control:l.control,name:"max_budget",label:"Max Budget (USD)",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e,type:"number",step:.01,min:0})}),(0,t.jsx)(S.FormField,{control:l.control,name:"budget_duration",label:"Reset Budget",children:({id:e,value:a,onChange:i,"aria-invalid":s,"aria-describedby":r})=>(0,t.jsxs)(T.Select,{items:q,value:""===a?V:a,onValueChange:e=>i(e===V?"":e),children:[(0,t.jsx)(T.SelectTrigger,{id:e,"aria-invalid":s,"aria-describedby":r,children:(0,t.jsx)(T.SelectValue,{})}),(0,t.jsx)(T.SelectContent,{children:q.map(e=>(0,t.jsx)(T.SelectItem,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(S.FormField,{control:l.control,name:"tpm_limit",label:"Tokens per minute Limit (TPM)",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e,type:"number",step:1,min:0})}),(0,t.jsx)(S.FormField,{control:l.control,name:"rpm_limit",label:"Requests per minute Limit (RPM)",children:({ref:e,...a})=>(0,t.jsx)(M.Input,{...a,ref:e,type:"number",step:1,min:0})}),(0,t.jsx)(S.FormField,{control:l.control,name:"vector_stores",label:"Allowed Vector Stores",description:"Select vector stores this organization can access. Leave empty for access to all vector stores",children:e=>(0,t.jsx)(O.default,{value:e.value,onChange:e.onChange,accessToken:s,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(S.FormField,{control:l.control,name:"mcp",label:"Allowed MCP Servers",description:"Select MCP servers, access groups, and toolsets this organization can access. Leave empty for access to all",children:e=>(0,t.jsx)(C.default,{value:e.value,onChange:e.onChange,accessToken:s,placeholder:"Select MCP servers and access groups (optional)"})}),(0,t.jsx)(S.FormField,{control:l.control,name:"metadata",label:"Metadata",children:({ref:e,...a})=>(0,t.jsx)(k.Textarea,{...a,ref:e,rows:4})})]}),(0,t.jsxs)(w.DialogFooter,{className:"mt-6",children:[(0,t.jsx)(c.Button,{type:"button",variant:"outline",onClick:()=>d(!1),disabled:o.isPending,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",disabled:o.isPending,children:o.isPending?"Creating...":"Create Organization"})]})]})]})})};var Z=e.i(785242),X=e.i(695420);e.i(622826);var Y=e.i(964471),ee=e.i(922407),et=e.i(487486),ea=e.i(515288),ei=e.i(677572),es=e.i(500330),er=e.i(980187),en=e.i(871689),el=e.i(294612),eo=e.i(907308),ed=e.i(384767),ec=e.i(276173);let em=({organizationId:e,onClose:i,accessToken:s,is_org_admin:r,is_proxy_admin:n,userModels:l,editOrg:d})=>{let m=(0,j.useQueryClient)(),{data:u,isLoading:g}=(0,a.useOrganization)(e),[x,p]=(0,o.useState)(!1),[h,b]=(0,o.useState)(!1),[_,z]=(0,o.useState)(!1),[y,C]=(0,o.useState)(null),N=r||n,{data:S}=(0,Z.useTeams)(),{onTabChange:w,hasVisited:M}=(0,X.useVisitedTabs)(d?"settings":"overview"),T=(0,o.useMemo)(()=>(0,er.createTeamAliasMap)(S),[S]),k=async t=>{try{if(null==s)return;let i={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,f.organizationMemberAddCall)(s,e,i),v.default.success("Organization member added successfully"),b(!1),m.invalidateQueries({queryKey:a.organizationKeys.all})}catch(e){v.default.fromBackend("Failed to add organization member"),console.error("Error adding organization member:",e)}},O=async t=>{try{if(!s)return;let i={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,f.organizationMemberUpdateCall)(s,e,i),v.default.success("Organization member updated successfully"),z(!1),m.invalidateQueries({queryKey:a.organizationKeys.all})}catch(e){v.default.fromBackend("Failed to update organization member"),console.error("Error updating organization member:",e)}},F=async t=>{try{if(!s)return;await (0,f.organizationMemberDeleteCall)(s,e,t.user_id),v.default.success("Organization member deleted successfully"),z(!1),m.invalidateQueries({queryKey:a.organizationKeys.all})}catch(e){v.default.fromBackend("Failed to delete organization member"),console.error("Error deleting organization member:",e)}};if(g)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!u)return(0,t.jsx)("div",{className:"p-4",children:"Organization not found"});let D=[{title:"Spend (USD)",key:"spend",render:(e,a)=>{let i=null!=a.user_id?(u.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,t.jsx)(Y.MoneyCell,{value:i?.spend,decimals:4})}},{title:"Created At",key:"created_at",render:(e,a)=>{let i=null!=a.user_id?(u.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,t.jsx)("span",{children:i?.created_at?new Date(i.created_at).toLocaleString():"-"})}}];return(0,t.jsxs)("div",{className:"h-screen w-full bg-background p-4",children:[(0,t.jsx)("div",{className:"mb-6 flex items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",onClick:i,className:"mb-4",children:[(0,t.jsx)(en.ArrowLeft,{className:"size-4"}),"Back to Organizations"]}),(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.organization_alias}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm text-muted-foreground",children:u.organization_id}),(0,t.jsx)(ee.default,{value:u.organization_id,label:"Copy organization ID",iconClassName:"size-3"})]})]})}),(0,t.jsxs)(ei.Tabs,{defaultValue:d?"settings":"overview",onValueChange:w,className:"mb-4",children:[(0,t.jsxs)(ei.TabsList,{variant:"line",className:"h-auto w-full justify-start rounded-none border-b p-0",children:[(0,t.jsx)(ei.TabsTrigger,{value:"overview",className:"flex-none rounded-none px-4 py-2",children:"Overview"}),(0,t.jsx)(ei.TabsTrigger,{value:"members",className:"flex-none rounded-none px-4 py-2",children:"Members"}),(0,t.jsx)(ei.TabsTrigger,{value:"settings",className:"flex-none rounded-none px-4 py-2",children:"Settings"})]}),(0,t.jsx)(ei.TabsContent,{keepMounted:M("overview"),value:"overview",className:"pt-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[(0,t.jsx)(ea.Card,{children:(0,t.jsxs)(ea.CardContent,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Organization Details"}),(0,t.jsxs)("div",{className:"mt-2 text-sm text-foreground",children:[(0,t.jsxs)("p",{children:["Created: ",new Date(u.created_at).toLocaleDateString()]}),(0,t.jsxs)("p",{children:["Updated: ",new Date(u.updated_at).toLocaleDateString()]}),(0,t.jsxs)("p",{children:["Created By: ",u.created_by]})]})]})}),(0,t.jsx)(ea.Card,{children:(0,t.jsxs)(ea.CardContent,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2 text-sm text-foreground",children:[(0,t.jsxs)("p",{className:"text-xl font-semibold",children:["$",(0,es.formatNumberWithCommas)(u.spend,4)]}),(0,t.jsxs)("p",{children:["of"," ",null===u.litellm_budget_table.max_budget?"Unlimited":`$${(0,es.formatNumberWithCommas)(u.litellm_budget_table.max_budget,4)}`]}),u.litellm_budget_table.budget_duration&&(0,t.jsxs)("p",{className:"text-muted-foreground",children:["Reset: ",u.litellm_budget_table.budget_duration]})]})]})}),(0,t.jsx)(ea.Card,{children:(0,t.jsxs)(ea.CardContent,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2 text-sm text-foreground",children:[(0,t.jsxs)("p",{children:["TPM: ",u.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,t.jsxs)("p",{children:["RPM: ",u.litellm_budget_table.rpm_limit||"Unlimited"]}),u.litellm_budget_table.max_parallel_requests&&(0,t.jsxs)("p",{children:["Max Parallel Requests: ",u.litellm_budget_table.max_parallel_requests]})]})]})}),(0,t.jsx)(ea.Card,{children:(0,t.jsxs)(ea.CardContent,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===u.models.length?(0,t.jsx)(et.Badge,{variant:"secondary",children:"All proxy models"}):u.models.map((e,a)=>(0,t.jsx)(et.Badge,{variant:"secondary",children:e},a))})]})}),(0,t.jsx)(ea.Card,{children:(0,t.jsxs)(ea.CardContent,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Teams"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:u.teams?.map((e,a)=>(0,t.jsx)(et.Badge,{variant:"secondary",children:T[e.team_id]||e.team_id},a))})]})}),(0,t.jsx)(ed.default,{objectPermission:u.object_permission,variant:"card",accessToken:s})]})}),(0,t.jsx)(ei.TabsContent,{keepMounted:M("members"),value:"members",className:"pt-4",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)(el.default,{members:(u.members||[]).map(e=>({role:e.user_role||"",user_id:e.user_id,user_email:e.user_email})),canEdit:N,onEdit:e=>{C(e),z(!0)},onDelete:e=>F(e),onAddMember:()=>b(!0),roleColumnTitle:"Organization Role",extraColumns:D,emptyText:"No members found"})})}),(0,t.jsx)(ei.TabsContent,{keepMounted:M("settings"),value:"settings",className:"pt-4",children:(0,t.jsx)(ea.Card,{className:"max-h-[65vh] overflow-y-auto",children:(0,t.jsxs)(ea.CardContent,{children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Organization Settings"}),N&&!x&&(0,t.jsx)(c.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),x?(0,t.jsx)(Q,{organizationId:e,org:u,accessToken:s||"",onCancel:()=>p(!1),onSaved:()=>p(!1)}):(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Organization Name"}),(0,t.jsx)("div",{children:u.organization_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Organization ID"}),(0,t.jsx)("div",{className:"font-mono",children:u.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Created At"}),(0,t.jsx)("div",{children:new Date(u.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Models"}),(0,t.jsx)("div",{className:"mt-1 flex flex-wrap gap-2",children:u.models.map((e,a)=>(0,t.jsx)(et.Badge,{variant:"secondary",children:e},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",u.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",u.litellm_budget_table.rpm_limit||"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Budget"}),(0,t.jsxs)("div",{children:["Max:"," ",null!==u.litellm_budget_table.max_budget?`$${(0,es.formatNumberWithCommas)(u.litellm_budget_table.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Reset: ",u.litellm_budget_table.budget_duration||"Never"]})]}),(0,t.jsx)(ed.default,{objectPermission:u.object_permission,variant:"inline",className:"border-t pt-4",accessToken:s})]})]})})})]}),(0,t.jsx)(eo.default,{isVisible:h,onCancel:()=>b(!1),onSubmit:k,accessToken:s,title:"Add Organization Member",roles:[{label:"org_admin",value:"org_admin",description:"Can add and remove members, and change their roles."},{label:"internal_user",value:"internal_user",description:"Can view/create keys for themselves within organization."},{label:"internal_user_viewer",value:"internal_user_viewer",description:"Can only view their keys within organization."}],defaultRole:"internal_user"}),(0,t.jsx)(ec.default,{visible:_,onCancel:()=>z(!1),onSubmit:O,initialData:y,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Org Admin",value:"org_admin"},{label:"Internal User",value:"internal_user"},{label:"Internal User Viewer",value:"internal_user_viewer"}]}})]})};var eu=e.i(607486),eg=e.i(886407);e.i(707701);var ex=e.i(807235),ep=e.i(541071),eh=e.i(788699),eb=e.i(727612),ej=e.i(494862),e_=e.i(200208),ev=e.i(997422),ef=e.i(547227),ez=e.i(755146);let ey=e=>e.litellm_budget_table??{};function eC({organization:e}){let{tpm_limit:a,rpm_limit:i}=ey(e);return(0,t.jsxs)("div",{className:"flex flex-col text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{children:["TPM: ",a||"Unlimited"]}),(0,t.jsxs)("span",{children:["RPM: ",i||"Unlimited"]})]})}function eN({organization:e,onEditClick:a,onDeleteClick:i}){return(0,t.jsxs)(ez.DropdownMenu,{children:[(0,t.jsx)(ez.DropdownMenuTrigger,{"aria-label":"Open organization actions","data-testid":`organization-actions-${e.organization_id}`,className:(0,r.cn)((0,c.buttonVariants)({variant:"ghost",size:"icon-sm"}),"text-muted-foreground"),children:(0,t.jsx)(ep.MoreHorizontal,{className:"size-4"})}),(0,t.jsxs)(ez.DropdownMenuContent,{align:"end",className:"w-52",children:[(0,t.jsxs)(ez.DropdownMenuItem,{"data-testid":"organization-action-edit",onClick:()=>a(e.organization_id),children:[(0,t.jsx)(eh.Pencil,{}),"Edit"]}),(0,t.jsxs)(ez.DropdownMenuItem,{variant:"destructive","data-testid":"organization-action-delete",onClick:()=>i(e.organization_id),children:[(0,t.jsx)(eb.Trash2,{}),"Delete"]})]})]})}let eS=[{id:"created_at",desc:!0}];function ew({searchActive:e}){let a=e?eg.SearchX:eu.Building2;return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,t.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,t.jsx)(a,{className:"size-5 text-muted-foreground"})}),(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:e?"No matching organizations":"No organizations yet"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:e?"No organizations match your search. Try a different name or ID.":"Create an organization to group teams, models, and budgets."})]})}let eM=({organizations:e,isLoading:a,userRole:i,searchActive:s,onOrganizationClick:r,onEditClick:n,onDeleteClick:l})=>{let[d,c]=(0,o.useState)(eS),m=(0,o.useMemo)(()=>(({userRole:e,onOrganizationClick:a,onEditClick:i,onDeleteClick:s})=>[{id:"organization_id",accessorKey:"organization_id",meta:{title:"Organization ID"},header:({column:e})=>(0,t.jsx)(ej.DataTableSortHeader,{column:e,title:"Organization ID"}),size:220,enableSorting:!0,cell:({row:e})=>(0,t.jsx)(ev.IdentityCell,{title:e.original.organization_id,titleClassName:"font-mono text-xs font-normal",className:"max-w-56",onClick:()=>a(e.original.organization_id)})},{id:"organization_alias",accessorKey:"organization_alias",meta:{title:"Organization Name"},header:({column:e})=>(0,t.jsx)(ej.DataTableSortHeader,{column:e,title:"Organization Name"}),size:200,enableSorting:!0,cell:({row:e})=>{let a=e.original.organization_alias;return(0,t.jsx)("span",{className:"block max-w-56 truncate text-sm font-medium",title:a??void 0,children:a||"-"})}},{id:"created_at",accessorKey:"created_at",sortingFn:"datetime",meta:{title:"Created"},header:({column:e})=>(0,t.jsx)(ej.DataTableSortHeader,{column:e,title:"Created"}),size:130,enableSorting:!0,cell:({row:e})=>(0,t.jsx)(e_.DateCell,{value:e.original.created_at,precision:"date"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend (USD)"},header:({column:e})=>(0,t.jsx)(ej.DataTableSortHeader,{column:e,title:"Spend (USD)"}),size:120,enableSorting:!0,cell:({row:e})=>(0,t.jsx)(Y.MoneyCell,{value:e.original.spend,decimals:4})},{id:"max_budget",meta:{title:"Budget (USD)"},header:"Budget (USD)",size:120,enableSorting:!1,cell:({row:e})=>(0,t.jsx)(Y.MoneyCell,{value:ey(e.original).max_budget,decimals:2,emptyText:"Unlimited",showZero:!0})},{id:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:260,enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ef.ModelsCell,{models:e.original.models})},{id:"limits",meta:{title:"TPM / RPM Limits"},header:"TPM / RPM Limits",size:150,enableSorting:!1,cell:({row:e})=>(0,t.jsx)(eC,{organization:e.original})},{id:"members",meta:{title:"Members"},header:"Members",size:100,enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("span",{className:"text-sm",children:[e.original.members?.length??0," Members"]})},{id:"actions",meta:{className:"text-right",headerClassName:"text-right"},header:()=>(0,t.jsx)("span",{className:"sr-only",children:"Actions"}),size:64,enableSorting:!1,enableHiding:!1,cell:({row:a})=>"Admin"===e?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(eN,{organization:a.original,onEditClick:i,onDeleteClick:s})}):null}])({userRole:i,onOrganizationClick:r,onEditClick:n,onDeleteClick:l}),[i,r,n,l]);return(0,t.jsx)(ex.DataTable,{data:e,columns:m,getRowId:(e,t)=>e.organization_id||String(t),sortingMode:"client",sorting:d,onSortingChange:c,isLoading:a,loadingMessage:"Loading organizations…",noDataMessage:(0,t.jsx)(ew,{searchActive:s}),size:"compact"})},eT=({userRole:e,accessToken:s,premiumUser:r})=>{let[n,l]=(0,o.useState)(null),[d,m]=(0,o.useState)(!1),[u,g]=(0,o.useState)(!1),[x,p]=(0,o.useState)(null),[h,z]=(0,o.useState)(!1),[y,C]=(0,o.useState)(!1),[N,S]=(0,o.useState)(!1),[w,M]=(0,o.useState)({org_id:"",org_alias:""}),T=(0,j.useQueryClient)(),{data:k=[],isLoading:O}=(0,a.useOrganizations)({org_id:w.org_id,org_alias:w.org_alias}),{data:F=[]}=(0,i.useUserModels)(),D=!!(w.org_id||w.org_alias),P=async()=>{if(x&&s)try{z(!0),await (0,f.organizationDeleteCall)(s,x),v.default.success("Organization deleted successfully"),g(!1),p(null),await T.invalidateQueries({queryKey:a.organizationKeys.lists()})}catch(e){console.error("Error deleting organization:",e)}finally{z(!1)}};return r?(0,t.jsxs)("div",{className:"mx-4 mt-4 flex flex-col gap-4",children:[("Admin"===e||"Org Admin"===e)&&(0,t.jsx)(c.Button,{className:"w-fit",onClick:()=>C(!0),children:"+ Create New Organization"}),n?(0,t.jsx)(em,{organizationId:n,onClose:()=>{l(null),m(!1)},accessToken:s,is_org_admin:!0,is_proxy_admin:"Admin"===e,userModels:F,editOrg:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Click on an organization ID to view its details."}),(0,t.jsx)(b,{filters:w,showFilters:N,onToggleFilters:S,onChange:(e,t)=>{M(a=>({...a,[e]:t}))},onReset:()=>{M({org_id:"",org_alias:""})}}),(0,t.jsx)(eM,{organizations:k,isLoading:O,userRole:e,searchActive:D,onOrganizationClick:l,onEditClick:e=>{l(e),m(!0)},onDeleteClick:e=>{e&&(p(e),g(!0))}})]}),(0,t.jsx)(W,{open:y,onOpenChange:C,accessToken:s||""}),(0,t.jsx)(_.default,{isOpen:u,title:"Delete Organization?",message:"Are you sure you want to delete this organization? This action cannot be undone.",resourceInformationTitle:"Organization Information",resourceInformation:[{label:"Organization ID",value:x,code:!0}],onCancel:()=>{g(!1),p(null)},onOk:P,confirmLoading:h})]}):(0,t.jsx)("div",{className:"mx-4 mt-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["This is a LiteLLM Enterprise feature, and requires a valid key to use. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"here"}),"."]})})};var ek=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userRole:a,premiumUser:i}=(0,ek.default)();return(0,t.jsx)(eT,{userRole:a??"",accessToken:e,premiumUser:i??!1})}],526612)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0cj588tfl8vcq.js b/litellm/proxy/_experimental/out/_next/static/chunks/0cj588tfl8vcq.js
new file mode 100644
index 00000000000..c174be6191d
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0cj588tfl8vcq.js
@@ -0,0 +1,10 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var r=e.i(9583),l=n.forwardRef(function(e,l){return n.createElement(r.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["ExclamationCircleOutlined",0,l],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(529681),r=e.i(242064),l=e.i(517455),a=e.i(185793),o=e.i(721369),s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let c=e=>{var{prefixCls:i,className:l,hoverable:a=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(r.ConfigContext),d=c("card",i),u=(0,n.default)(`${d}-grid`,l,{[`${d}-grid-hoverable`]:a});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var d=e.i(915654),u=e.i(183293),g=e.i(246422),b=e.i(838378);let m=(0,g.genStyleHooks)("Card",e=>{let t=(0,b.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:r,boxShadowTertiary:l,bodyPadding:a,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:l},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:i,headerPadding:r,tabsMarginBottom:l}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,d.unit)(r)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
+ > ${n}-typography,
+ > ${n}-typography-edit-content
+ `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:l,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:a,borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
+ ${(0,d.unit)(r)} 0 0 0 ${n},
+ 0 ${(0,d.unit)(r)} 0 0 ${n},
+ ${(0,d.unit)(r)} ${(0,d.unit)(r)} 0 0 ${n},
+ ${(0,d.unit)(r)} 0 0 0 ${n} inset,
+ 0 ${(0,d.unit)(r)} 0 0 ${n} inset;
+ `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:r,colorBorderSecondary:l,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:i,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:(0,d.unit)(e.calc(r).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:i,bodyPadding:r}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(i)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(r)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:i,headerHeightSM:r,headerFontSizeSM:l}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:r,padding:`0 ${(0,d.unit)(i)}`,fontSize:l,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var p=e.i(792812),h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let f=e=>{let{actionClasses:n,actions:i=[],actionStyle:r}=e;return t.createElement("ul",{className:n,style:r},i.map((e,n)=>{let r=`action-${n}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:r},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:g,rootClassName:b,style:y,extra:$,headStyle:v={},bodyStyle:O={},title:j,loading:x,bordered:S,variant:C,size:E,type:w,cover:M,actions:T,tabList:B,children:P,activeTabKey:z,defaultActiveTabKey:N,tabBarExtraContent:k,hoverable:R,tabProps:L={},classNames:G,styles:I}=e,H=h(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:D}=t.useContext(r.ConfigContext),[K]=(0,p.default)("card",C,S),F=e=>{var t;return(0,n.default)(null==(t=null==D?void 0:D.classNames)?void 0:t[e],null==G?void 0:G[e])},X=e=>{var t;return Object.assign(Object.assign({},null==(t=null==D?void 0:D.styles)?void 0:t[e]),null==I?void 0:I[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(P,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[P]),Q=W("card",u),[U,_,V]=m(Q),J=t.createElement(a.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},P),Y=void 0!==z,Z=Object.assign(Object.assign({},L),{[Y?"activeKey":"defaultActiveKey"]:Y?z:N,tabBarExtraContent:k}),ee=(0,l.default)(E),et=ee&&"default"!==ee?ee:"large",en=B?t.createElement(o.default,Object.assign({size:et},Z,{className:`${Q}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:B.map(e=>{var{tab:t}=e;return Object.assign({label:t},h(e,["tab"]))})})):null;if(j||$||en){let e=(0,n.default)(`${Q}-head`,F("header")),i=(0,n.default)(`${Q}-head-title`,F("title")),r=(0,n.default)(`${Q}-extra`,F("extra")),l=Object.assign(Object.assign({},v),X("header"));d=t.createElement("div",{className:e,style:l},t.createElement("div",{className:`${Q}-head-wrapper`},j&&t.createElement("div",{className:i,style:X("title")},j),$&&t.createElement("div",{className:r,style:X("extra")},$)),en)}let ei=(0,n.default)(`${Q}-cover`,F("cover")),er=M?t.createElement("div",{className:ei,style:X("cover")},M):null,el=(0,n.default)(`${Q}-body`,F("body")),ea=Object.assign(Object.assign({},O),X("body")),eo=t.createElement("div",{className:el,style:ea},x?J:P),es=(0,n.default)(`${Q}-actions`,F("actions")),ec=(null==T?void 0:T.length)?t.createElement(f,{actionClasses:es,actionStyle:X("actions"),actions:T}):null,ed=(0,i.default)(H,["onTabChange"]),eu=(0,n.default)(Q,null==D?void 0:D.className,{[`${Q}-loading`]:x,[`${Q}-bordered`]:"borderless"!==K,[`${Q}-hoverable`]:R,[`${Q}-contain-grid`]:q,[`${Q}-contain-tabs`]:null==B?void 0:B.length,[`${Q}-${ee}`]:ee,[`${Q}-type-${w}`]:!!w,[`${Q}-rtl`]:"rtl"===A},g,b,_,V),eg=Object.assign(Object.assign({},null==D?void 0:D.style),y);return U(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:eg}),d,er,eo,ec))});var $=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};y.Grid=c,y.Meta=e=>{let{prefixCls:i,className:l,avatar:a,title:o,description:s}=e,c=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(r.ConfigContext),u=d("card",i),g=(0,n.default)(`${u}-meta`,l),b=a?t.createElement("div",{className:`${u}-meta-avatar`},a):null,m=o?t.createElement("div",{className:`${u}-meta-title`},o):null,p=s?t.createElement("div",{className:`${u}-meta-description`},s):null,h=m||p?t.createElement("div",{className:`${u}-meta-detail`},m,p):null;return t.createElement("div",Object.assign({},c,{className:g}),b,h)},e.s(["Card",0,y],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(908206),r=e.i(242064),l=e.i(517455),a=e.i(150073);let o={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var c=e.i(876556),d=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n},u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let g=e=>{let{itemPrefixCls:i,component:r,span:l,className:a,style:o,labelStyle:c,contentStyle:d,bordered:u,label:g,content:b,colon:m,type:p,styles:h}=e,{classNames:f}=t.useContext(s),y=Object.assign(Object.assign({},c),null==h?void 0:h.label),$=Object.assign(Object.assign({},d),null==h?void 0:h.content);if(u)return t.createElement(r,{colSpan:l,style:o,className:(0,n.default)(a,{[`${i}-item-${p}`]:"label"===p||"content"===p,[null==f?void 0:f.label]:(null==f?void 0:f.label)&&"label"===p,[null==f?void 0:f.content]:(null==f?void 0:f.content)&&"content"===p})},null!=g&&t.createElement("span",{style:y},g),null!=b&&t.createElement("span",{style:$},b));return t.createElement(r,{colSpan:l,style:o,className:(0,n.default)(`${i}-item`,a)},t.createElement("div",{className:`${i}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${i}-item-label`,null==f?void 0:f.label,{[`${i}-item-no-colon`]:!m})},g),null!=b&&t.createElement("span",{style:$,className:(0,n.default)(`${i}-item-content`,null==f?void 0:f.content)},b)))};function b(e,{colon:n,prefixCls:i,bordered:r},{component:l,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:b,prefixCls:m=i,className:p,style:h,labelStyle:f,contentStyle:y,span:$=1,key:v,styles:O},j)=>"string"==typeof l?t.createElement(g,{key:`${a}-${v||j}`,className:p,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),f),null==O?void 0:O.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),y),null==O?void 0:O.content)},span:$,colon:n,component:l,itemPrefixCls:m,bordered:r,label:o?e:null,content:s?b:null,type:a}):[t.createElement(g,{key:`label-${v||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),h),f),null==O?void 0:O.label),span:1,colon:n,component:l[0],itemPrefixCls:m,bordered:r,label:e,type:"label"}),t.createElement(g,{key:`content-${v||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),y),null==O?void 0:O.content),span:2*$-1,component:l[1],itemPrefixCls:m,bordered:r,content:b,type:"content"})])}let m=e=>{let n=t.useContext(s),{prefixCls:i,vertical:r,row:l,index:a,bordered:o}=e;return r?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${a}`,className:`${i}-row`},b(l,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${a}`,className:`${i}-row`},b(l,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:a,className:`${i}-row`},b(l,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var p=e.i(915654),h=e.i(183293),f=e.i(246422),y=e.i(838378);let $=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:i,itemPaddingEnd:r,colonMarginRight:l,colonMarginLeft:a,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.padding)} ${(0,p.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingSM)} ${(0,p.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingXS)} ${(0,p.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},h.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:i,paddingInlineEnd:r},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,p.unit)(a)} ${(0,p.unit)(l)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let O=e=>{let g,{prefixCls:b,title:p,extra:h,column:f,colon:y=!0,bordered:O,layout:j,children:x,className:S,rootClassName:C,style:E,size:w,labelStyle:M,contentStyle:T,styles:B,items:P,classNames:z}=e,N=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:k,direction:R,className:L,style:G,classNames:I,styles:H}=(0,r.useComponentConfig)("descriptions"),W=k("descriptions",b),A=(0,a.default)(),D=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,i.matchScreen)(A,Object.assign(Object.assign({},o),f)))?e:3},[A,f]),K=(g=t.useMemo(()=>P||(0,c.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[P,x]),t.useMemo(()=>g.map(e=>{var{span:t}=e,n=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,i.matchScreen)(A,t)})}),[g,A])),F=(0,l.default)(w),X=((e,n)=>{let[i,r]=(0,t.useMemo)(()=>{let t,i,r,l;return t=[],i=[],r=!1,l=0,n.filter(e=>e).forEach(n=>{let{filled:a}=n,o=u(n,["filled"]);if(a){i.push(o),t.push(i),i=[],l=0;return}let s=e-l;(l+=n.span||1)>=e?(l>e?(r=!0,i.push(Object.assign(Object.assign({},o),{span:s}))):i.push(o),t.push(i),i=[],l=0):i.push(o)}),i.length>0&&t.push(i),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:M,contentStyle:T,styles:{content:Object.assign(Object.assign({},H.content),null==B?void 0:B.content),label:Object.assign(Object.assign({},H.label),null==B?void 0:B.label)},classNames:{label:(0,n.default)(I.label,null==z?void 0:z.label),content:(0,n.default)(I.content,null==z?void 0:z.content)}}),[M,T,B,z,I,H]);return q(t.createElement(s.Provider,{value:_},t.createElement("div",Object.assign({className:(0,n.default)(W,L,I.root,null==z?void 0:z.root,{[`${W}-${F}`]:F&&"default"!==F,[`${W}-bordered`]:!!O,[`${W}-rtl`]:"rtl"===R},S,C,Q,U),style:Object.assign(Object.assign(Object.assign(Object.assign({},G),H.root),null==B?void 0:B.root),E)},N),(p||h)&&t.createElement("div",{className:(0,n.default)(`${W}-header`,I.header,null==z?void 0:z.header),style:Object.assign(Object.assign({},H.header),null==B?void 0:B.header)},p&&t.createElement("div",{className:(0,n.default)(`${W}-title`,I.title,null==z?void 0:z.title),style:Object.assign(Object.assign({},H.title),null==B?void 0:B.title)},p),h&&t.createElement("div",{className:(0,n.default)(`${W}-extra`,I.extra,null==z?void 0:z.extra),style:Object.assign(Object.assign({},H.extra),null==B?void 0:B.extra)},h)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,n)=>t.createElement(m,{key:n,index:n,colon:y,prefixCls:W,vertical:"vertical"===j,bordered:O,row:e}))))))))};O.Item=({children:e})=>e,e.s(["Descriptions",0,O],869216)},368869,e=>{"use strict";e.i(296059);var t=e.i(868297),n=e.i(732961),i=e.i(289882),r=e.i(170517),l=e.i(628882),a=e.i(320890),o=e.i(104458),s=e.i(722319),c=e.i(8398),d=e.i(279728);e.i(765846);var u=e.i(602716),g=e.i(328052),b=e.i(135551);let m=(e,t)=>new b.FastColor(e).setA(t).toRgbString(),p=(e,t)=>new b.FastColor(e).lighten(t).toHexString(),h=e=>{let t=(0,u.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},f=(e,t)=>{let n=e||"#000",i=t||"#fff";return{colorBgBase:n,colorTextBase:i,colorText:m(i,.85),colorTextSecondary:m(i,.65),colorTextTertiary:m(i,.45),colorTextQuaternary:m(i,.25),colorFill:m(i,.18),colorFillSecondary:m(i,.12),colorFillTertiary:m(i,.08),colorFillQuaternary:m(i,.04),colorBgSolid:m(i,.95),colorBgSolidHover:m(i,1),colorBgSolidActive:m(i,.9),colorBgElevated:p(n,12),colorBgContainer:p(n,8),colorBgLayout:p(n,0),colorBgSpotlight:p(n,26),colorBgBlur:m(i,.04),colorBorder:p(n,26),colorBorderSecondary:p(n,19)}},y={defaultSeed:a.defaultConfig.token,useToken:function(){let[e,t,n]=(0,o.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:s.default,darkAlgorithm:(e,t)=>{let n=Object.keys(r.defaultPresetColors).map(t=>{let n=(0,u.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,i,r)=>(e[`${t}-${r+1}`]=n[r],e[`${t}${r+1}`]=n[r],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),i=null!=t?t:(0,s.default)(e),l=(0,g.default)(e,{generateColorPalettes:h,generateNeutralColorPalettes:f});return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,s.default)(e),i=n.fontSizeSM,r=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,i=n-2;return{sizeXXL:t*(i+10),sizeXL:t*(i+6),sizeLG:t*(i+2),sizeMD:t*(i+2),sizeMS:t*(i+1),size:t*i,sizeSM:t*i,sizeXS:t*(i-1),sizeXXS:t*(i-1)}}(null!=t?t:e)),(0,d.default)(i)),{controlHeight:r}),(0,c.default)(Object.assign(Object.assign({},n),{controlHeight:r})))},getDesignToken:e=>{let a=(null==e?void 0:e.algorithm)?(0,t.createTheme)(e.algorithm):i.default,o=Object.assign(Object.assign({},r.default),null==e?void 0:e.token);return(0,n.getComputedToken)(o,{override:null==e?void 0:e.token},a,l.default)},defaultConfig:a.defaultConfig,_internalContext:a.DesignTokenContext};e.s(["theme",0,y],368869)},127952,e=>{"use strict";var t=e.i(843476),n=e.i(560445),i=e.i(175712),r=e.i(869216),l=e.i(311451),a=e.i(212931),o=e.i(898586),s=e.i(368869),c=e.i(270377),d=e.i(271645);e.s(["default",0,function({isOpen:e,title:u,alertMessage:g,message:b,resourceInformationTitle:m,resourceInformation:p,onCancel:h,onOk:f,confirmLoading:y,requiredConfirmation:$}){let{Title:v,Text:O}=o.Typography,{token:j}=s.theme.useToken(),[x,S]=(0,d.useState)("");return(0,d.useEffect)(()=>{e&&S("")},[e]),(0,t.jsx)(a.Modal,{title:u,open:e,onOk:f,onCancel:h,confirmLoading:y,okText:y?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!$&&x!==$||y},cancelButtonProps:{disabled:y},children:(0,t.jsxs)("div",{className:"space-y-4",children:[g&&(0,t.jsx)(n.Alert,{message:g,type:"warning"}),(0,t.jsx)(i.Card,{title:m,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:j.colorErrorBg,borderColor:j.colorErrorBorder}},style:{backgroundColor:j.colorErrorBg,borderColor:j.colorErrorBorder},children:(0,t.jsx)(r.Descriptions,{column:1,size:"small",children:p&&p.map(({label:e,value:n,...i})=>(0,t.jsx)(r.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(O,{...i,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(O,{children:b})}),$&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(O,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(O,{children:"Type "}),(0,t.jsx)(O,{strong:!0,type:"danger",children:$}),(0,t.jsx)(O,{children:" to confirm deletion:"})]}),(0,t.jsx)(l.Input,{value:x,onChange:e=>S(e.target.value),placeholder:$,className:"rounded-md",prefix:(0,t.jsx)(c.ExclamationCircleOutlined,{style:{color:j.colorError}}),autoFocus:!0})]})]})})}])},954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),i=e.i(540143),r=e.i(915823),l=e.i(619273),a=class extends r.Subscribable{#e;#t=void 0;#n;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#l()}mutate(e,t){return this.#i=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#r(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,n,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,n,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,n,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,n,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},o=e.i(912598);e.s(["useMutation",0,function(e,n){let r=(0,o.useQueryClient)(n),[s]=t.useState(()=>new a(r,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(i.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=t.useCallback((e,t)=>{s.mutate(e,t).catch(l.noop)},[s]);if(c.error&&(0,l.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}],954616)},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500727,e=>{"use strict";var t=e.i(266027),n=e.i(243652),i=e.i(602869),r=e.i(135214);let l=(0,n.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:n}=(0,r.default)();return(0,t.useQuery)({queryKey:l.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,i.fetchMCPServers)(n,e),enabled:!!n})}])},263147,e=>{"use strict";var t=e.i(266027),n=e.i(243652),i=e.i(602869),r=e.i(431703),l=e.i(708347),a=e.i(135214);let o=(0,n.createQueryKeys)("accessGroups"),s=async e=>{let t=(0,i.getProxyBaseUrl)(),n=`${t}/v1/access_group`,l=await fetch(n,{method:"GET",headers:{[(0,i.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,r.deriveErrorMessage)(e);throw(0,i.handleError)(t),Error(t)}return l.json()};e.s(["accessGroupKeys",0,o,"useAccessGroups",0,()=>{let{accessToken:e,userRole:n}=(0,a.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>s(e),enabled:!!e&&l.all_admin_roles.includes(n||"")})}])},304911,e=>{"use strict";var t=e.i(843476),n=e.i(262218);let{Text:i}=e.i(898586).Typography;e.s(["default",0,function({userId:e}){return"default_user_id"===e?(0,t.jsx)(n.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(i,{children:e})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0d398pudg-p7u.js b/litellm/proxy/_experimental/out/_next/static/chunks/0d398pudg-p7u.js
new file mode 100644
index 00000000000..d95d8328cbc
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0d398pudg-p7u.js
@@ -0,0 +1,2 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233538,e=>{"use strict";e.s(["isDisabledReactIssue7711",0,function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}])},83733,233137,e=>{"use strict";let t,n;var r,i,s=e.i(247167),o=e.i(271645),a=e.i(544508),l=e.i(746725),u=e.i(835696);void 0!==s.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(r=null==s.default?void 0:s.default.env)?void 0:r.NODE_ENV)==="test"&&void 0===(null==(i=null==Element?void 0:Element.prototype)?void 0:i.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
+`)),[]});var d=((t=d||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);e.s(["transitionDataAttributes",0,function(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t},"useTransition",0,function(e,t,n,r){let[i,s]=(0,o.useState)(n),{hasFlag:d,addFlag:c,removeFlag:f}=function(e=0){let[t,n]=(0,o.useState)(e),r=(0,o.useCallback)(e=>n(e),[t]),i=(0,o.useCallback)(e=>n(t=>t|e),[t]),s=(0,o.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:(0,o.useCallback)(e=>n(t=>t&~e),[n]),toggleFlag:(0,o.useCallback)(e=>n(t=>t^e),[n])}}(e&&i?3:0),h=(0,o.useRef)(!1),p=(0,o.useRef)(!1),m=(0,l.useDisposables)();return(0,u.useIsoMorphicEffect)(()=>{var i;if(e){if(n&&s(!0),!t){n&&c(3);return}return null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:i}){let s=(0,a.disposables)();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(function(e,t){var n,r;let i=(0,a.disposables)();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===o.length?t():Promise.allSettled(o.map(e=>e.finished)).then(()=>{s||t()}),i.dispose}(e,r))})}),s.dispose}(t,{inFlight:h,prepare(){p.current?p.current=!1:p.current=h.current,h.current=!0,p.current||(n?(c(3),f(4)):(c(4),f(2)))},run(){p.current?n?(f(3),c(4)):(f(4),c(3)):n?f(1):c(1)},done(){var e;p.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(h.current=!1,f(7),n||s(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})}},[e,n,t,m]),e?[i,{closed:d(1),enter:d(2),leave:d(4),transition:d(2)||d(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}],83733);let c=(0,o.createContext)(null);c.displayName="OpenClosedContext";var f=((n=f||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);e.s(["OpenClosedProvider",0,function({value:e,children:t}){return o.default.createElement(c.Provider,{value:e},t)},"ResetOpenClosedProvider",0,function({children:e}){return o.default.createElement(c.Provider,{value:null},e)},"State",0,f,"useOpenClosed",0,function(){return(0,o.useContext)(c)}],233137)},677667,674175,886148,543086,e=>{"use strict";let t,n;var r,i=e.i(290571),s=e.i(783222),o=e.i(433336),a=e.i(271645),l=e.i(394487),u=e.i(914189),d=e.i(144279),c=e.i(294316),f=e.i(83733);let h=(0,a.createContext)(()=>{});function p({value:e,children:t}){return a.default.createElement(h.Provider,{value:e},t)}e.s(["CloseProvider",0,p],674175);var m=e.i(233137),g=e.i(233538),v=e.i(397701),b=e.i(402155),y=e.i(700020);let E=null!=(r=a.default.startTransition)?r:function(e){e()};var x=e.i(998348),w=((t=w||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),k=((n=k||{})[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.SetButtonElement=4]="SetButtonElement",n[n.SetPanelElement=5]="SetPanelElement",n);let C={0:e=>({...e,disclosureState:(0,v.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},S=(0,a.createContext)(null);function _(e){let t=(0,a.useContext)(S);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,_),t}return t}S.displayName="DisclosureContext";let T=(0,a.createContext)(null);T.displayName="DisclosureAPIContext";let O=(0,a.createContext)(null);function R(e,t){return(0,v.match)(t.type,C,e,t)}O.displayName="DisclosurePanelContext";let I=a.Fragment,D=y.RenderFeatures.RenderStrategy|y.RenderFeatures.Static,L=Object.assign((0,y.forwardRefWithAs)(function(e,t){let{defaultOpen:n=!1,...r}=e,i=(0,a.useRef)(null),s=(0,c.useSyncRefs)(t,(0,c.optionalRef)(e=>{i.current=e},void 0===e.as||e.as===a.Fragment)),o=(0,a.useReducer)(R,{disclosureState:+!n,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:l,buttonId:d},f]=o,h=(0,u.useEvent)(e=>{f({type:1});let t=(0,b.getOwnerDocument)(i);if(!t||!d)return;let n=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==n||n.focus()}),g=(0,a.useMemo)(()=>({close:h}),[h]),E=(0,a.useMemo)(()=>({open:0===l,close:h}),[l,h]),x=(0,y.useRender)();return a.default.createElement(S.Provider,{value:o},a.default.createElement(T.Provider,{value:g},a.default.createElement(p,{value:h},a.default.createElement(m.OpenClosedProvider,{value:(0,v.match)(l,{0:m.State.Open,1:m.State.Closed})},x({ourProps:{ref:s},theirProps:r,slot:E,defaultTag:I,name:"Disclosure"})))))}),{Button:(0,y.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),{id:r=`headlessui-disclosure-button-${n}`,disabled:i=!1,autoFocus:f=!1,...h}=e,[p,m]=_("Disclosure.Button"),v=(0,a.useContext)(O),b=null!==v&&v===p.panelId,E=(0,a.useRef)(null),w=(0,c.useSyncRefs)(E,t,(0,u.useEvent)(e=>{if(!b)return m({type:4,element:e})}));(0,a.useEffect)(()=>{if(!b)return m({type:2,buttonId:r}),()=>{m({type:2,buttonId:null})}},[r,m,b]);let k=(0,u.useEvent)(e=>{var t;if(b){if(1===p.disclosureState)return;switch(e.key){case x.Keys.Space:case x.Keys.Enter:e.preventDefault(),e.stopPropagation(),m({type:0}),null==(t=p.buttonElement)||t.focus()}}else switch(e.key){case x.Keys.Space:case x.Keys.Enter:e.preventDefault(),e.stopPropagation(),m({type:0})}}),C=(0,u.useEvent)(e=>{e.key===x.Keys.Space&&e.preventDefault()}),S=(0,u.useEvent)(e=>{var t;(0,g.isDisabledReactIssue7711)(e.currentTarget)||i||(b?(m({type:0}),null==(t=p.buttonElement)||t.focus()):m({type:0}))}),{isFocusVisible:T,focusProps:R}=(0,s.useFocusRing)({autoFocus:f}),{isHovered:I,hoverProps:D}=(0,o.useHover)({isDisabled:i}),{pressed:L,pressProps:N}=(0,l.useActivePress)({disabled:i}),P=(0,a.useMemo)(()=>({open:0===p.disclosureState,hover:I,active:L,disabled:i,focus:T,autofocus:f}),[p,I,L,T,i,f]),j=(0,d.useResolveButtonType)(e,p.buttonElement),M=b?(0,y.mergeProps)({ref:w,type:j,disabled:i||void 0,autoFocus:f,onKeyDown:k,onClick:S},R,D,N):(0,y.mergeProps)({ref:w,id:r,type:j,"aria-expanded":0===p.disclosureState,"aria-controls":p.panelElement?p.panelId:void 0,disabled:i||void 0,autoFocus:f,onKeyDown:k,onKeyUp:C,onClick:S},R,D,N);return(0,y.useRender)()({ourProps:M,theirProps:h,slot:P,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,y.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),{id:r=`headlessui-disclosure-panel-${n}`,transition:i=!1,...s}=e,[o,l]=_("Disclosure.Panel"),{close:d}=function e(t){let n=(0,a.useContext)(T);if(null===n){let n=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}return n}("Disclosure.Panel"),[h,p]=(0,a.useState)(null),g=(0,c.useSyncRefs)(t,(0,u.useEvent)(e=>{E(()=>l({type:5,element:e}))}),p);(0,a.useEffect)(()=>(l({type:3,panelId:r}),()=>{l({type:3,panelId:null})}),[r,l]);let v=(0,m.useOpenClosed)(),[b,x]=(0,f.useTransition)(i,h,null!==v?(v&m.State.Open)===m.State.Open:0===o.disclosureState),w=(0,a.useMemo)(()=>({open:0===o.disclosureState,close:d}),[o.disclosureState,d]),k={ref:g,id:r,...(0,f.transitionDataAttributes)(x)},C=(0,y.useRender)();return a.default.createElement(m.ResetOpenClosedProvider,null,a.default.createElement(O.Provider,{value:o.panelId},C({ourProps:k,theirProps:s,slot:w,defaultTag:"div",features:D,visible:b,name:"Disclosure.Panel"})))})});e.s(["Disclosure",0,L],886148);let N=(0,a.createContext)(void 0);var P=e.i(444755);let j=(0,e.i(673706).makeClassName)("Accordion"),M=(0,a.createContext)({isOpen:!1}),A=a.default.forwardRef((e,t)=>{var n;let{defaultOpen:r=!1,children:s,className:o}=e,l=(0,i.__rest)(e,["defaultOpen","children","className"]),u=null!=(n=(0,a.useContext)(N))?n:(0,P.tremorTwMerge)("rounded-tremor-default border");return a.default.createElement(L,Object.assign({as:"div",ref:t,className:(0,P.tremorTwMerge)(j("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",u,o),defaultOpen:r},l),({open:e})=>a.default.createElement(M.Provider,{value:{isOpen:e}},s))});A.displayName="Accordion",e.s(["OpenContext",0,M,"default",0,A],543086),e.s(["Accordion",0,A],677667)},130643,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(886148),i=e.i(444755);let s=(0,e.i(673706).makeClassName)("AccordionBody"),o=n.default.forwardRef((e,o)=>{let{children:a,className:l}=e,u=(0,t.__rest)(e,["children","className"]);return n.default.createElement(r.Disclosure.Panel,Object.assign({ref:o,className:(0,i.tremorTwMerge)(s("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",l)},u),a)});o.displayName="AccordionBody",e.s(["AccordionBody",0,o],130643)},898667,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(886148);let i=e=>{var r=(0,t.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),n.default.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 s=e.i(543086),o=e.i(444755);let a=(0,e.i(673706).makeClassName)("AccordionHeader"),l=n.default.forwardRef((e,l)=>{let{children:u,className:d}=e,c=(0,t.__rest)(e,["children","className"]),{isOpen:f}=(0,n.useContext)(s.OpenContext);return n.default.createElement(r.Disclosure.Button,Object.assign({ref:l,className:(0,o.tremorTwMerge)(a("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",d)},c),n.default.createElement("div",{className:(0,o.tremorTwMerge)(a("children"),"flex flex-1 text-inherit mr-4")},u),n.default.createElement("div",null,n.default.createElement(i,{className:(0,o.tremorTwMerge)(a("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",f?"transition-all":"transition-all -rotate-180")})))});l.displayName="AccordionHeader",e.s(["AccordionHeader",0,l],898667)},244451,e=>{"use strict";let t;e.i(247167);var n=e.i(271645),r=e.i(343794),i=e.i(242064),s=e.i(763731),o=e.i(174428);let a=80*Math.PI,l=e=>{let{dotClassName:t,style:i,hasCircleCls:s}=e;return n.createElement("circle",{className:(0,r.default)(`${t}-circle`,{[`${t}-circle-bg`]:s}),r:40,cx:50,cy:50,strokeWidth:20,style:i})},u=({percent:e,prefixCls:t})=>{let i=`${t}-dot`,s=`${i}-holder`,u=`${s}-hidden`,[d,c]=n.useState(!1);(0,o.default)(()=>{0!==e&&c(!0)},[0!==e]);let f=Math.max(Math.min(e,100),0);if(!d)return null;let h={strokeDashoffset:`${a/4}`,strokeDasharray:`${a*f/100} ${a*(100-f)/100}`};return n.createElement("span",{className:(0,r.default)(s,`${i}-progress`,f<=0&&u)},n.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f},n.createElement(l,{dotClassName:i,hasCircleCls:!0}),n.createElement(l,{dotClassName:i,style:h})))};function d(e){let{prefixCls:t,percent:i=0}=e,s=`${t}-dot`,o=`${s}-holder`,a=`${o}-hidden`;return n.createElement(n.Fragment,null,n.createElement("span",{className:(0,r.default)(o,i>0&&a)},n.createElement("span",{className:(0,r.default)(s,`${t}-dot-spin`)},[1,2,3,4].map(e=>n.createElement("i",{className:`${t}-dot-item`,key:e})))),n.createElement(u,{prefixCls:t,percent:i}))}function c(e){var t;let{prefixCls:i,indicator:o,percent:a}=e,l=`${i}-dot`;return o&&n.isValidElement(o)?(0,s.cloneElement)(o,{className:(0,r.default)(null==(t=o.props)?void 0:t.className,l),percent:a}):n.createElement(d,{prefixCls:i,percent:a})}e.i(296059);var f=e.i(694758),h=e.i(183293),p=e.i(246422),m=e.i(838378);let g=new f.Keyframes("antSpinMove",{to:{opacity:1}}),v=new f.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),b=(0,p.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${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 ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${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 ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${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(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:g,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:v,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{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 ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,m.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}}),y=[[30,.05],[70,.03],[96,.01]];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 i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let x=e=>{var s;let{prefixCls:o,spinning:a=!0,delay:l=0,className:u,rootClassName:d,size:f="default",tip:h,wrapperClassName:p,style:m,children:g,fullscreen:v=!1,indicator:x,percent:w}=e,k=E(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:C,direction:S,className:_,style:T,indicator:O}=(0,i.useComponentConfig)("spin"),R=C("spin",o),[I,D,L]=b(R),[N,P]=n.useState(()=>a&&(!a||!l||!!Number.isNaN(Number(l)))),j=function(e,t){let[r,i]=n.useState(0),s=n.useRef(null),o="auto"===t;return n.useEffect(()=>(o&&e&&(i(0),s.current=setInterval(()=>{i(e=>{let t=100-e;for(let n=0;n{s.current&&(clearInterval(s.current),s.current=null)}),[o,e]),o?r:t}(N,w);n.useEffect(()=>{if(a){let e=function(e,t,n){var r,i=n||{},s=i.noTrailing,o=void 0!==s&&s,a=i.noLeading,l=void 0!==a&&a,u=i.debounceMode,d=void 0===u?void 0:u,c=!1,f=0;function h(){r&&clearTimeout(r)}function p(){for(var n=arguments.length,i=Array(n),s=0;se?l?(f=Date.now(),o||(r=setTimeout(d?m:p,e))):p():!0!==o&&(r=setTimeout(d?m:p,void 0===d?e-u:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly;h(),c=!(void 0!==t&&t)},p}(l,()=>{P(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}P(!1)},[l,a]);let M=n.useMemo(()=>void 0!==g&&!v,[g,v]),A=(0,r.default)(R,_,{[`${R}-sm`]:"small"===f,[`${R}-lg`]:"large"===f,[`${R}-spinning`]:N,[`${R}-show-text`]:!!h,[`${R}-rtl`]:"rtl"===S},u,!v&&d,D,L),F=(0,r.default)(`${R}-container`,{[`${R}-blur`]:N}),$=null!=(s=null!=x?x:O)?s:t,z=Object.assign(Object.assign({},T),m),B=n.createElement("div",Object.assign({},k,{style:z,className:A,"aria-live":"polite","aria-busy":N}),n.createElement(c,{prefixCls:R,indicator:$,percent:j}),h&&(M||v)?n.createElement("div",{className:`${R}-text`},h):null);return I(M?n.createElement("div",Object.assign({},k,{className:(0,r.default)(`${R}-nested-loading`,p,D,L)}),N&&n.createElement("div",{key:"loading"},B),n.createElement("div",{className:F,key:"container"},g)):v?n.createElement("div",{className:(0,r.default)(`${R}-fullscreen`,{[`${R}-fullscreen-show`]:N},d,D,L)},B):B)};x.setDefaultIndicator=e=>{t=e},e.s(["default",0,x],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},285027,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={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"};var i=e.i(9583),s=n.forwardRef(function(e,s){return n.createElement(i.default,(0,t.default)({},e,{ref:s,icon:r}))});e.s(["WarningOutlined",0,s],285027)},743151,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var r=o(e.r(844343)),i=o(e.r(271645)),s=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}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 l(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 u(e){for(var t=1;t{"use strict";var r=e.r(743151).CopyToClipboard;r.CopyToClipboard=r,t.exports=r},350967,46757,e=>{"use strict";var t=e.i(290571),n=e.i(444755),r=e.i(673706),i=e.i(271645);let s={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"},a={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"},l={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,s,"gridColsLg",0,l,"gridColsMd",0,a,"gridColsSm",0,o],46757);let u=(0,r.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",c=i.default.forwardRef((e,r)=>{let{numItems:c=1,numItemsSm:f,numItemsMd:h,numItemsLg:p,children:m,className:g}=e,v=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=d(c,s),y=d(f,o),E=d(h,a),x=d(p,l),w=(0,n.tremorTwMerge)(b,y,E,x);return i.default.createElement("div",Object.assign({ref:r,className:(0,n.tremorTwMerge)(u("root"),"grid",w,g)},v),m)});c.displayName="Grid",e.s(["Grid",0,c],350967)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={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"};var i=e.i(9583),s=n.forwardRef(function(e,s){return n.createElement(i.default,(0,t.default)({},e,{ref:s,icon:r}))});e.s(["UploadOutlined",0,s],519756)},540626,e=>{"use strict";let t;var n,r=e.i(271645);let i=(0,r.createContext)(null);function s(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=o(e);if(n.length!==o(t).length)return!1;for(let r=0;re,n){let i=n?.compare??l,s=(0,r.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),o=(0,r.useCallback)(()=>e.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(s,o,o,t,i)}function d(e,...t){return"function"==typeof e?e(...t):e}var c=class{#e=!0;#t;#n;#r;#i;#s;#o;#a;#l=0;#u=5;#d=!1;#c=!1;#f=null;#h=()=>{this.debugLog("Connected to event bus"),this.#s=!0,this.#d=!1,this.debugLog("Emitting queued events",this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#h)};#p=()=>{if(this.#l{this.#d||(this.#d=!0,this.#n().addEventListener("tanstack-connect-success",this.#h),this.#p())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#i=[],this.#s=!1,this.#c=!1,this.#o=null,this.#a=r}startConnectLoop(){null!==this.#o||this.#s||(this.debugLog(`Starting connect loop (every ${this.#a}ms)`),this.#o=setInterval(this.#p,this.#a))}stopConnectLoop(){this.#d=!1,null!==this.#o&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#f&&(this.debugLog("Emitting event to internal event target",e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#c)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#s){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#i.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#d&&(this.#m(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||(this.#f=new EventTarget),this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",i),()=>{};let s=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(i,s),this.debugLog("Registered event to bus",i),()=>{r&&this.#f?.removeEventListener(i,s),this.#n().removeEventListener(i,s)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let f=new Map;function h(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let p=new class extends c{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}},m=((n={})[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n);function g(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}let v=[],b=0,{link:y,unlink:E,propagate:x,checkDirty:w,shallowPropagate:k}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let r=t.depsTail;if(void 0!==r&&r.dep===e)return;let i=void 0!==r?r.nextDep:t.deps;if(void 0!==i&&i.dep===e){i.version=n,t.depsTail=i;return}let s=e.subsTail;if(void 0!==s&&s.version===n&&s.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:s,nextSub:void 0};void 0!==i&&(i.prevDep=o),void 0!==r?r.nextDep=o:t.deps=o,void 0!==s?s.nextSub=o:e.subs=o},unlink:function(e,t=e.sub){let r=e.dep,i=e.prevDep,s=e.nextDep,o=e.nextSub,a=e.prevSub;return void 0!==s?s.prevDep=i:t.depsTail=i,void 0!==i?i.nextDep=s:t.deps=s,void 0!==o?o.prevSub=a:r.subsTail=a,void 0!==a?a.nextSub=o:void 0===(r.subs=o)&&n(r),s},propagate:function(e){let n,r=e.nextSub;e:for(;;){let i=e.sub,s=i.flags;if(s&(m.RecursedCheck|m.Recursed|m.Dirty|m.Pending)?s&(m.RecursedCheck|m.Recursed)?s&m.RecursedCheck?!(s&(m.Dirty|m.Pending))&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,i)?(i.flags=s|(m.Recursed|m.Pending),s&=m.Mutable):s=m.None:i.flags=s&~m.Recursed|m.Pending:s=m.None:i.flags=s|m.Pending,s&m.Watching&&t(i),s&m.Mutable){let t=i.subs;if(void 0!==t){let i=(e=t).nextSub;void 0!==i&&(n={value:r,prev:n},r=i);continue}}if(void 0!==(e=r)){r=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){r=e.nextSub;continue e}break}},checkDirty:function(t,n){let i,s=0,o=!1;e:for(;;){let a=t.dep,l=a.flags;if(n.flags&m.Dirty)o=!0;else if((l&(m.Mutable|m.Dirty))==(m.Mutable|m.Dirty)){if(e(a)){let e=a.subs;void 0!==e.nextSub&&r(e),o=!0}}else if((l&(m.Mutable|m.Pending))==(m.Mutable|m.Pending)){(void 0!==t.nextSub||void 0!==t.prevSub)&&(i={value:t,prev:i}),t=a.deps,n=a,++s;continue}if(!o){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;s--;){let s=n.subs,a=void 0!==s.nextSub;if(a?(t=i.value,i=i.prev):t=s,o){if(e(n)){a&&r(s),n=t.sub;continue}o=!1}else n.flags&=~m.Pending;n=t.sub;let l=t.nextDep;if(void 0!==l){t=l;continue e}}return o}},shallowPropagate:r};function r(e){do{let n=e.sub,r=n.flags;(r&(m.Pending|m.Dirty))===m.Pending&&(n.flags=r|m.Dirty,(r&(m.Watching|m.RecursedCheck))===m.Watching&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){v[S++]=e,e.flags&=~m.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=m.Mutable|m.Dirty,_(e))}}),C=0,S=0;function _(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=E(n,e)}var T=class{constructor(e,n){this.atom=function(e){let n="function"==typeof e,r={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?m.None:m.Mutable,get:()=>(void 0!==t&&y(r,t,b),r._snapshot),subscribe(e){var n;let i,s,o=g(e),a={current:!1},l=(n=()=>{r.get(),a.current?o.next?.(r._snapshot):a.current=!0},i=()=>{let e=t;t=s,++b,s.depsTail=void 0,s.flags=m.Watching|m.RecursedCheck;try{return n()}finally{t=e,s.flags&=~m.RecursedCheck,_(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:m.Watching|m.RecursedCheck,notify(){let e=this.flags;e&m.Dirty||e&m.Pending&&w(this.deps,this)?i():this.flags=m.Watching},stop(){this.flags=m.None,this.depsTail=void 0,_(this)}},i(),s);return{unsubscribe:()=>{l.stop()}}},_update(i){let s=t,o=(void 0)??Object.is;if(n)t=r,++b,r.depsTail=void 0;else if(void 0===i)return!1;n&&(r.flags=m.Mutable|m.RecursedCheck);try{let t=r._snapshot,s="function"==typeof i?i(t):void 0===i&&n?e(t):i;if(void 0===t||!o(t,s))return r._snapshot=s,!0;return!1}finally{t=s,n&&(r.flags&=~m.RecursedCheck),_(r)}}};return n?(r.flags=m.Mutable|m.Dirty,r.get=function(){let e=r.flags;if(e&m.Dirty||e&m.Pending&&w(r.deps,r)){if(r._update()){let e=r.subs;void 0!==e&&k(e)}}else e&m.Pending&&(r.flags=e&~m.Pending);return void 0!==t&&y(r,t,b),r._snapshot}):r.set=function(e){if(r._update(e)){let e=r.subs;if(void 0!==e&&(x(e),k(e),1)){for(;C{this.options={...this.options,...e},this.#v()||this.cancel()},this.#b=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:r}=n;return{...n,status:this.#v()?r?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;if(n){var r,i;f.set(n,t),p.emit(e,{key:(r={...t,key:n}).key,store:{state:h("function"==typeof(i=r.store).get?i.get():i.state)},options:h(r.options)})}})("Debouncer",this)},this.#v=()=>!!d(this.options.enabled,this),this.#y=()=>d(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#v())return;this.#b({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#b({canLeadingExecute:!1}),t=!0,this.#E(...e)),this.options.trailing&&this.#b({isPending:!0,lastArgs:e}),this.#g&&clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#b({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#E(...e)},this.#y())},this.#E=(...e)=>{this.#v()&&(this.fn(...e),this.#b({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#x(),this.#E(...this.store.state.lastArgs))},this.#x=()=>{this.#g&&(clearTimeout(this.#g),this.#g=void 0)},this.cancel=()=>{this.#x(),this.#b({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#b(O())},this.key=t.key,this.options={...R,...t},this.#b(this.options.initialState??{}),this.key&&p.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#b(e.payload.store.state),this.setOptions(e.payload.options))})}#b;#v;#y;#E;#x};e.s(["useDebouncer",0,function(e,t,n=()=>({})){let o={...((0,r.useContext)(i)?.defaultOptions??{}).debouncer,...t},[a]=(0,r.useState)(()=>{let t=new I(e,o);return t.Subscribe=function(e){let n=u(t.store,e.selector,{compare:s});return"function"==typeof e.children?e.children(n):e.children},t});a.fn=e,a.setOptions(o),(0,r.useEffect)(()=>()=>{o.onUnmount?o.onUnmount(a):a.cancel()},[]);let l=u(a.store,n,{compare:s});return(0,r.useMemo)(()=>({...a,state:l}),[a,l])}],540626)},741466,e=>{"use strict";e.s(["DEBOUNCE_WAIT_MS",0,300])},399029,e=>{"use strict";var t=e.i(540626),n=e.i(271645);e.s(["useDebouncedState",0,function(e,r,i){let[s,o]=(0,n.useState)(e),a=(0,t.useDebouncer)(o,r,i);return[s,a.maybeExecute,a]}])},663435,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(199133),i=e.i(898586),s=e.i(56456),o=e.i(399029),a=e.i(785242),l=e.i(741466);let{Text:u}=i.Typography;e.s(["default",0,({value:e,onChange:i,onTeamSelect:d,disabled:c,organizationId:f,pageSize:h=20})=>{let[p,m]=(0,n.useState)(""),[g,v]=(0,o.useDebouncedState)("",{wait:l.DEBOUNCE_WAIT_MS}),{data:b,fetchNextPage:y,hasNextPage:E,isFetchingNextPage:x,isLoading:w}=(0,a.useInfiniteTeams)(h,g||void 0,f),k=(0,n.useMemo)(()=>{if(!b?.pages)return[];let e=new Set,t=[];for(let n of b.pages)for(let r of n.teams)e.has(r.team_id)||(e.add(r.team_id),t.push(r));return t},[b]);return(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{i?.(e??""),d&&d(e?k.find(t=>t.team_id===e)??null:null)},disabled:c,allowClear:!0,filterOption:!1,onSearch:e=>{m(e),v(e)},searchValue:p,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&E&&!x&&y()},loading:w,notFoundContent:w?(0,t.jsx)(s.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,x&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(s.LoadingOutlined,{spin:!0})})]}),children:k.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(u,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={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"};var i=e.i(9583),s=n.forwardRef(function(e,s){return n.createElement(i.default,(0,t.default)({},e,{ref:s,icon:r}))});e.s(["default",0,s],597440)},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={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"};var i=e.i(9583),s=n.forwardRef(function(e,s){return n.createElement(i.default,(0,t.default)({},e,{ref:s,icon:r}))});e.s(["default",0,s],184163)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={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"};var i=e.i(9583),s=n.forwardRef(function(e,s){return n.createElement(i.default,(0,t.default)({},e,{ref:s,icon:r}))});e.s(["FileTextOutlined",0,s],993914)},59935,(e,t,n)=>{var r;let i;e.e,r=function e(){var t,n="u">typeof self?self:"u">typeof window?window:void 0!==n?n:{},r=!n.document&&!!n.postMessage,i=n.IS_PAPA_WORKER||!1,s={},o=0,a={};function l(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=y(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(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,i)n.postMessage({results:s,workerId:a.WORKER_ID,finished:r});else if(x(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!r||!x(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){x(this._config.error)?this._config.error(e):i&&this._config.error&&n.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.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=E(this._chunkLoaded,this),t.onerror=E(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,n,i=this._config.downloadRequestHeaders;for(n in i)t.setRequestHeader(n,i[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 d(e){(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var t,n,r="u">typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=E(this._chunkLoaded,this),t.onerror=E(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 c(e){var t;l.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){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.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=E(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=E(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=E(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=E(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,n,r,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,o=/^((\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)))$/,l=this,u=0,d=0,c=!1,f=!1,h=[],g={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&r&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!v(e)})),E()){if(g)if(Array.isArray(g.data[0])){for(var t,n=0;E()&&n(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(n)?parseFloat(n):o.test(n)?new Date(n):""===n?null:n):n)(a=e.header?i>=h.length?"__parsed_extra":h[i]:a,l=e.transform?e.transform(l,a):l);"__parsed_extra"===a?(r[a]=r[a]||[],r[a].push(l)):r[a]=l}return e.header&&(i>h.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+n):ie.preview?n.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,o){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),r=!1,e.delimiter?x(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,n,r,i,s)=>{var o,l,u,d;s=s||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var c=0;c=n.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,n=e.newline,r=e.comments,i=e.step,s=e.preview,o=e.fastMode,l=null,u=!1,d=null==e.quoteChar?'"':e.quoteChar,c=d;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof t||-1=s)return F(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:k.length,index:f}),L++}}else if(r&&0===S.length&&a.substring(f,f+E)===r){if(-1===I)return F();f=I+y,I=a.indexOf(n,f),R=a.indexOf(t,f)}else if(-1!==R&&(R=s)return F(!0)}return M();function P(e){k.push(e),_=f}function j(e){return -1!==e&&(e=a.substring(L+1,e))&&""===e.trim()?e.length:0}function M(e){return g||(void 0===e&&(e=a.substring(f)),S.push(e),f=v,P(S),w&&$()),F()}function A(e){f=e,P(S),S=[],I=a.indexOf(n,f)}function F(r){if(e.header&&!m&&k.length&&!u){var i=k[0],s=Object.create(null),o=new Set(i);let t=!1;for(let n=0;n{if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=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||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+o),t.escapeFormulae instanceof RegExp?c=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(c=/^[=+\-@\t\r].*$/)}})(),RegExp(p(o),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,u);if("object"==typeof e[0])return h(d||Object.keys(e[0]),e,u)}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||d),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])),h(e.fields||[],e.data||[],u);throw Error("Unable to serialize unrecognized input");function h(e,t,n){var o="",a=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var n=0;n{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(536916),i=e.i(599724),s=e.i(409797),o=e.i(233565);let a=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,l=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,u=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,d=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function c(e,t=""){let n=e.toLowerCase();if(d.test(n))return"read";if(a.test(n))return"delete";if(u.test(n))return"update";if(l.test(n))return"create";if(t){let e=t.toLowerCase();if(d.test(e))return"read";if(a.test(e))return"delete";if(u.test(e))return"update";if(l.test(e))return"create"}return"unknown"}function f(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let n of e)t[c(n.name,n.description)].push(n);return t}let h={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,h,"classifyToolOp",0,c,"groupToolsByCrud",0,f],696609);let p=["read","create","update","delete","unknown"],m={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},g={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},v={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:a,onChange:l,readOnly:u=!1,searchFilter:d=""})=>{let[c,b]=(0,n.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),y=(0,n.useMemo)(()=>f(e),[e]),E=(0,n.useMemo)(()=>new Set(void 0===a?e.map(e=>e.name):a),[a,e]),x=e=>{if(u)return;let t=new Set(E);t.has(e)?t.delete(e):t.add(e),l(Array.from(t))};return 0===e.length?null:(0,t.jsx)("div",{className:"space-y-3",children:p.map(e=>{let n,a=y[e];if(0===a.length)return null;if(d){let e=d.toLowerCase();if(!a.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let f=h[e],p=(n=y[e]).length>0&&n.every(e=>E.has(e.name)),w=(e=>{let t=y[e];if(0===t.length)return!1;let n=t.filter(e=>E.has(e.name)).length;return n>0&&n{b(t=>({...t,[e]:!t[e]}))},children:[k?(0,t.jsx)(o.ChevronRightIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}):(0,t.jsx)(s.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:f.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${m[f.risk]}`,children:"high"===f.risk?"High Risk":"medium"===f.risk?"Medium Risk":"low"===f.risk?"Safe":"Unclassified"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[a.filter(e=>E.has(e.name)).length,"/",a.length," allowed"]})]}),!u&&(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,t.jsx)(i.Text,{className:"text-xs text-gray-500",children:p?"All on":w?"Partial":"All off"}),(0,t.jsx)(r.Checkbox,{checked:p,indeterminate:w,onChange:t=>((e,t)=>{if(u)return;let n=new Set(E);for(let r of y[e])t?n.add(r.name):n.delete(r.name);l(Array.from(n))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!k&&(0,t.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:f.description}),!k&&(0,t.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:a.filter(e=>!d||e.name.toLowerCase().includes(d.toLowerCase())||(e.description??"").toLowerCase().includes(d.toLowerCase())).map(e=>{let n,s=(n=e.name,E.has(n));return(0,t.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!u?"cursor-pointer":""} ${s?"":"opacity-60"}`,onClick:()=>x(e.name),children:[(0,t.jsx)(r.Checkbox,{checked:s,onChange:()=>x(e.name),disabled:u,onClick:e=>e.stopPropagation()}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)(i.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,t.jsx)(i.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,t.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded shrink-0 ${s?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:s?"on":"off"})]},e.name)})})]},e)})})}],531516)},988297,e=>{"use strict";var t=e.i(271645);let n=t.forwardRef(function(e,n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,n],988297)},68155,e=>{"use strict";var t=e.i(271645);let n=t.forwardRef(function(e,n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,n],68155)},269200,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("Table"),s=n.default.forwardRef((e,s)=>{let{children:o,className:a}=e,l=(0,t.__rest)(e,["children","className"]);return n.default.createElement("div",{className:(0,r.tremorTwMerge)(i("root"),"overflow-auto",a)},n.default.createElement("table",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},l),o))});s.displayName="Table",e.s(["Table",0,s],269200)},427612,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHead"),s=n.default.forwardRef((e,s)=>{let{children:o,className:a}=e,l=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("thead",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",a)},l),o))});s.displayName="TableHead",e.s(["TableHead",0,s],427612)},64848,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=n.default.forwardRef((e,s)=>{let{children:o,className:a}=e,l=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("th",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",a)},l),o))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",0,s],64848)},942232,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableBody"),s=n.default.forwardRef((e,s)=>{let{children:o,className:a}=e,l=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("tbody",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",a)},l),o))});s.displayName="TableBody",e.s(["TableBody",0,s],942232)},496020,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableRow"),s=n.default.forwardRef((e,s)=>{let{children:o,className:a}=e,l=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("tr",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("row"),a)},l),o))});s.displayName="TableRow",e.s(["TableRow",0,s],496020)},977572,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableCell"),s=n.default.forwardRef((e,s)=>{let{children:o,className:a}=e,l=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("td",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("root"),"align-middle whitespace-nowrap text-left p-4",a)},l),o))});s.displayName="TableCell",e.s(["TableCell",0,s],977572)},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),n=e.i(914189);e.s(["useControllable",0,function(e,r,i){let[s,o]=(0,t.useState)(i),a=void 0!==e,l=(0,t.useRef)(a),u=(0,t.useRef)(!1),d=(0,t.useRef)(!1);return!a||l.current||u.current?a||!l.current||d.current||(d.current=!0,l.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,l.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:s,(0,n.useEvent)(e=>(a||o(e),null==r?void 0:r(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[n]=(0,t.useState)(e);return n}],214520);let r=(0,t.createContext)(void 0);function i(){return(0,t.useContext)(r)}e.s(["useDisabled",0,i],601893);var s=e.i(174080),o=e.i(746725);function a(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))!function e(t,n,r){if(Array.isArray(r))for(let[i,s]of r.entries())e(t,l(n,i.toString()),s);else r instanceof Date?t.push([n,r.toISOString()]):"boolean"==typeof r?t.push([n,r?"1":"0"]):"string"==typeof r?t.push([n,r]):"number"==typeof r?t.push([n,`${r}`]):null==r?t.push([n,""]):a(r,n,t)}(n,l(t,r),i);return n}function l(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}},"objectToFormEntries",0,a],694421);var u=e.i(700020),d=e.i(2788);let c=(0,t.createContext)(null);function f({children:e}){let n=(0,t.useContext)(c);if(!n)return t.default.createElement(t.default.Fragment,null,e);let{target:r}=n;return r?(0,s.createPortal)(t.default.createElement(t.default.Fragment,null,e),r):null}function h({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(d.Hidden,{features:d.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",0,function({data:e,form:n,disabled:r,onReset:i,overrides:s}){let[l,c]=(0,t.useState)(null),p=(0,o.useDisposables)();return(0,t.useEffect)(()=>{if(i&&l)return p.addEventListener(l,"reset",i)},[l,n,i]),t.default.createElement(f,null,t.default.createElement(h,{setForm:c,formId:n}),a(e).map(([e,i])=>t.default.createElement(d.Hidden,{features:d.HiddenFeatures.Hidden,...(0,u.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:r,name:e,value:i,...s})})))}],140721);let p=(0,t.createContext)(void 0);function m(){return(0,t.useContext)(p)}e.s(["useProvidedId",0,m],942803);var g=e.i(835696),v=e.i(294316);let b=(0,t.createContext)(null);b.displayName="DescriptionContext";let y=Object.assign((0,u.forwardRefWithAs)(function(e,n){let r=(0,t.useId)(),s=i(),{id:o=`headlessui-description-${r}`,...a}=e,l=function e(){let n=(0,t.useContext)(b);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),d=(0,v.useSyncRefs)(n);(0,g.useIsoMorphicEffect)(()=>l.register(o),[o,l.register]);let c=s||!1,f=(0,t.useMemo)(()=>({...l.slot,disabled:c}),[l.slot,c]),h={ref:d,...l.props,id:o};return(0,u.useRender)()({ourProps:h,theirProps:a,slot:f,defaultTag:"p",name:l.name||"Description"})}),{});e.s(["Description",0,y,"useDescribedBy",0,function(){var e,n;return null!=(n=null==(e=(0,t.useContext)(b))?void 0:e.value)?n:void 0},"useDescriptions",0,function(){let[e,r]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let i=(0,n.useEvent)(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),s=(0,t.useMemo)(()=>({register:i,slot:e.slot,name:e.name,props:e.props,value:e.value}),[i,e.slot,e.name,e.props,e.value]);return t.default.createElement(b.Provider,{value:s},e.children)},[r])]}],35889);let E=(0,t.createContext)(null);function x(e){var n,r,i;let s=null!=(r=null==(n=(0,t.useContext)(E))?void 0:n.value)?r:void 0;return(null!=(i=null==e?void 0:e.length)?i:0)>0?[s,...e].filter(Boolean).join(" "):s}E.displayName="LabelContext";let w=Object.assign((0,u.forwardRefWithAs)(function(e,r){var s;let o=(0,t.useId)(),a=function e(){let n=(0,t.useContext)(E);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),l=m(),d=i(),{id:c=`headlessui-label-${o}`,htmlFor:f=null!=l?l:null==(s=a.props)?void 0:s.htmlFor,passive:h=!1,...p}=e,b=(0,v.useSyncRefs)(r);(0,g.useIsoMorphicEffect)(()=>a.register(c),[c,a.register]);let y=(0,n.useEvent)(e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),a.props&&"onClick"in a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),x=d||!1,w=(0,t.useMemo)(()=>({...a.slot,disabled:x}),[a.slot,x]),k={ref:b,...a.props,id:c,htmlFor:f,onClick:y};return h&&("onClick"in k&&(delete k.htmlFor,delete k.onClick),"onClick"in p&&delete p.onClick),(0,u.useRender)()({ourProps:k,theirProps:p,slot:w,defaultTag:f?"label":"div",name:a.name||"Label"})}),{});e.s(["Label",0,w,"useLabelledBy",0,x,"useLabels",0,function({inherit:e=!1}={}){let r=x(),[i,s]=(0,t.useState)([]),o=e?[r,...i].filter(Boolean):i;return[o.length>0?o.join(" "):void 0,(0,t.useMemo)(()=>function(e){let r=(0,n.useEvent)(e=>(s(t=>[...t,e]),()=>s(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),i=(0,t.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return t.default.createElement(E.Provider,{value:i},e.children)},[s])]}],722678)},35983,220508,e=>{"use strict";var t=e.i(333771);e.s(["SelectItem",()=>t.default],35983);var n=e.i(271645);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,r],220508)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0d6y38dwy2fvp.js b/litellm/proxy/_experimental/out/_next/static/chunks/0d6y38dwy2fvp.js
deleted file mode 100644
index a9ab6054f14..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0d6y38dwy2fvp.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},244451,e=>{"use strict";let t;e.i(247167);var i=e.i(271645),a=e.i(343794),n=e.i(242064),o=e.i(763731),r=e.i(174428);let l=80*Math.PI,s=e=>{let{dotClassName:t,style:n,hasCircleCls:o}=e;return i.createElement("circle",{className:(0,a.default)(`${t}-circle`,{[`${t}-circle-bg`]:o}),r:40,cx:50,cy:50,strokeWidth:20,style:n})},d=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,o=`${n}-holder`,d=`${o}-hidden`,[c,u]=i.useState(!1);(0,r.default)(()=>{0!==e&&u(!0)},[0!==e]);let f=Math.max(Math.min(e,100),0);if(!c)return null;let m={strokeDashoffset:`${l/4}`,strokeDasharray:`${l*f/100} ${l*(100-f)/100}`};return i.createElement("span",{className:(0,a.default)(o,`${n}-progress`,f<=0&&d)},i.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f},i.createElement(s,{dotClassName:n,hasCircleCls:!0}),i.createElement(s,{dotClassName:n,style:m})))};function c(e){let{prefixCls:t,percent:n=0}=e,o=`${t}-dot`,r=`${o}-holder`,l=`${r}-hidden`;return i.createElement(i.Fragment,null,i.createElement("span",{className:(0,a.default)(r,n>0&&l)},i.createElement("span",{className:(0,a.default)(o,`${t}-dot-spin`)},[1,2,3,4].map(e=>i.createElement("i",{className:`${t}-dot-item`,key:e})))),i.createElement(d,{prefixCls:t,percent:n}))}function u(e){var t;let{prefixCls:n,indicator:r,percent:l}=e,s=`${n}-dot`;return r&&i.isValidElement(r)?(0,o.cloneElement)(r,{className:(0,a.default)(null==(t=r.props)?void 0:t.className,s),percent:l}):i.createElement(c,{prefixCls:n,percent:l})}e.i(296059);var f=e.i(694758),m=e.i(183293),p=e.i(246422),h=e.i(838378);let y=new f.Keyframes("antSpinMove",{to:{opacity:1}}),g=new f.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),v=(0,p.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:i}=e;return{[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:i(i(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 ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:i(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:i(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:i(i(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:i(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:i(i(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${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 ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:i(e.dotSize).sub(i(e.marginXXS).div(2)).div(2).equal(),height:i(e.dotSize).sub(i(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:y,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:g,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:i(i(e.dotSizeSM).sub(i(e.marginXXS).div(2))).div(2).equal(),height:i(i(e.dotSizeSM).sub(i(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:i(i(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:i(i(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,h.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:i}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:i}}),b=[[30,.05],[70,.03],[96,.01]];var S=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(i[a[n]]=e[a[n]]);return i};let $=e=>{var o;let{prefixCls:r,spinning:l=!0,delay:s=0,className:d,rootClassName:c,size:f="default",tip:m,wrapperClassName:p,style:h,children:y,fullscreen:g=!1,indicator:$,percent:x}=e,w=S(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:C,direction:z,className:N,style:E,indicator:k}=(0,n.useComponentConfig)("spin"),O=C("spin",r),[M,j,I]=v(O),[D,q]=i.useState(()=>l&&(!l||!s||!!Number.isNaN(Number(s)))),T=function(e,t){let[a,n]=i.useState(0),o=i.useRef(null),r="auto"===t;return i.useEffect(()=>(r&&e&&(n(0),o.current=setInterval(()=>{n(e=>{let t=100-e;for(let i=0;i{o.current&&(clearInterval(o.current),o.current=null)}),[r,e]),r?a:t}(D,x);i.useEffect(()=>{if(l){let e=function(e,t,i){var a,n=i||{},o=n.noTrailing,r=void 0!==o&&o,l=n.noLeading,s=void 0!==l&&l,d=n.debounceMode,c=void 0===d?void 0:d,u=!1,f=0;function m(){a&&clearTimeout(a)}function p(){for(var i=arguments.length,n=Array(i),o=0;oe?s?(f=Date.now(),r||(a=setTimeout(c?h:p,e))):p():!0!==r&&(a=setTimeout(c?h:p,void 0===c?e-d:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly;m(),u=!(void 0!==t&&t)},p}(s,()=>{q(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}q(!1)},[s,l]);let L=i.useMemo(()=>void 0!==y&&!g,[y,g]),H=(0,a.default)(O,N,{[`${O}-sm`]:"small"===f,[`${O}-lg`]:"large"===f,[`${O}-spinning`]:D,[`${O}-show-text`]:!!m,[`${O}-rtl`]:"rtl"===z},d,!g&&c,j,I),P=(0,a.default)(`${O}-container`,{[`${O}-blur`]:D}),R=null!=(o=null!=$?$:k)?o:t,G=Object.assign(Object.assign({},E),h),X=i.createElement("div",Object.assign({},w,{style:G,className:H,"aria-live":"polite","aria-busy":D}),i.createElement(u,{prefixCls:O,indicator:R,percent:T}),m&&(L||g)?i.createElement("div",{className:`${O}-text`},m):null);return M(L?i.createElement("div",Object.assign({},w,{className:(0,a.default)(`${O}-nested-loading`,p,j,I)}),D&&i.createElement("div",{key:"loading"},X),i.createElement("div",{className:P,key:"container"},y)):g?i.createElement("div",{className:(0,a.default)(`${O}-fullscreen`,{[`${O}-fullscreen-show`]:D},c,j,I)},X):X)};$.setDefaultIndicator=e=>{t=e},e.s(["default",0,$],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(281256).Row;e.s(["Row",0,t],621192)},263147,e=>{"use strict";var t=e.i(266027),i=e.i(243652),a=e.i(602869),n=e.i(431703),o=e.i(708347),r=e.i(135214);let l=(0,i.createQueryKeys)("accessGroups"),s=async e=>{let t=(0,a.getProxyBaseUrl)(),i=`${t}/v1/access_group`,o=await fetch(i,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,n.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return o.json()};e.s(["accessGroupKeys",0,l,"useAccessGroups",0,()=>{let{accessToken:e,userRole:i}=(0,r.default)();return(0,t.useQuery)({queryKey:l.list({}),queryFn:async()=>s(e),enabled:!!e&&o.all_admin_roles.includes(i||"")})}])},304911,e=>{"use strict";var t=e.i(843476),i=e.i(262218);let{Text:a}=e.i(898586).Typography;e.s(["default",0,function({userId:e}){return"default_user_id"===e?(0,t.jsx)(i.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(a,{children:e})}])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},988846,181692,438100,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default],988846);let i=(0,e.i(475254).default)("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"}]]);e.s(["default",0,i],181692),e.s(["KeyIcon",0,i],438100)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var n=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(n.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["SaveOutlined",0,o],987432)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var n=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(n.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["MinusCircleOutlined",0,o],564897)},497650,e=>{"use strict";var t=e.i(309821);e.s(["Progress",()=>t.default])},849550,e=>{"use strict";let t=(0,e.i(475254).default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);e.s(["default",0,t])},113625,e=>{"use strict";let t=(0,e.i(475254).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["default",0,t])},823429,e=>{"use strict";let t=(0,e.i(475254).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["default",0,t])},516430,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeftIcon",()=>t.default])},44068,e=>{"use strict";var t=e.i(823429);e.s(["EditIcon",()=>t.default])},166452,e=>{"use strict";var t=e.i(98740);e.s(["UsersIcon",()=>t.default])},897565,e=>{"use strict";var t=e.i(113625);e.s(["LayersIcon",()=>t.default])},372943,e=>{"use strict";e.i(247167);var t=e.i(8211),i=e.i(271645),a=e.i(343794),n=e.i(529681),o=e.i(242064),r=e.i(704914),l=e.i(876556),s=e.i(290224),d=e.i(251224),c=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(i[a[n]]=e[a[n]]);return i};function u({suffixCls:e,tagName:t,displayName:a}){return a=>i.forwardRef((n,o)=>i.createElement(a,Object.assign({ref:o,suffixCls:e,tagName:t},n)))}let f=i.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:l,tagName:s}=e,u=c(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:f}=i.useContext(o.ConfigContext),m=f("layout",n),[p,h,y]=(0,d.default)(m),g=r?`${m}-${r}`:m;return p(i.createElement(s,Object.assign({className:(0,a.default)(n||g,l,h,y),ref:t},u)))}),m=i.forwardRef((e,u)=>{let{direction:f}=i.useContext(o.ConfigContext),[m,p]=i.useState([]),{prefixCls:h,className:y,rootClassName:g,children:v,hasSider:b,tagName:S,style:$}=e,x=c(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),w=(0,n.default)(x,["suffixCls"]),{getPrefixCls:C,className:z,style:N}=(0,o.useComponentConfig)("layout"),E=C("layout",h),k="boolean"==typeof b?b:!!m.length||(0,l.default)(v).some(e=>e.type===s.default),[O,M,j]=(0,d.default)(E),I=(0,a.default)(E,{[`${E}-has-sider`]:k,[`${E}-rtl`]:"rtl"===f},z,y,g,M,j),D=i.useMemo(()=>({siderHook:{addSider:e=>{p(i=>[].concat((0,t.default)(i),[e]))},removeSider:e=>{p(t=>t.filter(t=>t!==e))}}}),[]);return O(i.createElement(r.LayoutContext.Provider,{value:D},i.createElement(S,Object.assign({ref:u,className:I,style:Object.assign(Object.assign({},N),$)},w),v)))}),p=u({tagName:"div",displayName:"Layout"})(m),h=u({suffixCls:"header",tagName:"header",displayName:"Header"})(f),y=u({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(f),g=u({suffixCls:"content",tagName:"main",displayName:"Content"})(f);p.Header=h,p.Footer=y,p.Content=g,p.Sider=s.default,p._InternalSiderContext=s.SiderContext,e.s(["Layout",0,p],372943)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js b/litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js
deleted file mode 100644
index 5a875678fe6..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,793479,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,type:a,...s},l)=>(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),ref:l,...s}));s.displayName="Input",e.s(["Input",0,s])},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("label",{ref:s,"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));s.displayName="Label",e.s(["Label",0,s])},515288,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,size:a="default",...s},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s}));s.displayName="Card";let l=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));l.displayName="CardHeader";let i=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-title",className:(0,r.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));i.displayName="CardTitle";let o=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a}));o.displayName="CardDescription";let d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));d.displayName="CardAction";let n=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a}));n.displayName="CardContent";let c=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));c.displayName="CardFooter",e.s(["Card",0,s,"CardAction",0,d,"CardContent",0,n,"CardDescription",0,o,"CardFooter",0,c,"CardHeader",0,l,"CardTitle",0,i])},312130,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(519455),s=e.i(515288),l=e.i(793479),i=e.i(110204),o=e.i(571303),d=e.i(275144),n=e.i(602869),c=e.i(727749);let u=({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:f,setLogoUrl:p,faviconUrl:g,setFaviconUrl:h}=(0,d.useTheme)(),[x,v]=(0,a.useState)(""),[b,y]=(0,a.useState)(""),[j,C]=(0,a.useState)(!1);(0,a.useEffect)(()=>{m&&N()},[m]);let N=async()=>{try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(a.ok){let e=await a.json();v(e.values?.logo_url||""),y(e.values?.favicon_url||""),p(e.values?.logo_url||null),h(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},w=async()=>{C(!0);try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:x||null,favicon_url:b||null})})).ok)c.default.success("Theme settings updated successfully!"),p(x||null),h(b||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),c.default.fromBackend("Failed to update theme settings")}finally{C(!1)}},_=async()=>{v(""),y(""),p(null),h(null),C(!0);try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)c.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),c.default.fromBackend("Failed to reset theme settings")}finally{C(!1)}};return m?(0,t.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"mb-2 text-2xl font-bold",children:"UI Theme Customization"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(s.Card,{children:(0,t.jsxs)(s.CardContent,{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Label,{htmlFor:"ui-theme-logo-url",className:"mb-2",children:"Custom Logo URL"}),(0,t.jsx)(l.Input,{id:"ui-theme-logo-url",placeholder:"https://example.com/logo.png",value:x,onChange:e=>{v(e.target.value),p(e.target.value||null)}}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Label,{htmlFor:"ui-theme-favicon-url",className:"mb-2",children:"Custom Favicon URL"}),(0,t.jsx)(l.Input,{id:"ui-theme-favicon-url",placeholder:"https://example.com/favicon.ico",value:b,onChange:e=>{y(e.target.value),h(e.target.value||null)}}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter a URL for your custom favicon (.ico, .png, or .svg) or leave empty for default"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsxs)(r.Button,{onClick:w,disabled:j,children:[j&&(0,t.jsx)(o.UiLoadingSpinner,{className:"size-4"}),"Save Changes"]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:_,disabled:j,children:[j&&(0,t.jsx)(o.UiLoadingSpinner,{className:"size-4"}),"Reset to Default"]})]})]})})]}):null};var m=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userRole:a,userId:r}=(0,m.default)();return(0,t.jsx)(u,{userID:r,userRole:a,accessToken:e})}],312130)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0dsiq_ok1yngk.js b/litellm/proxy/_experimental/out/_next/static/chunks/0dsiq_ok1yngk.js
deleted file mode 100644
index e28d954b9e1..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0dsiq_ok1yngk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233538,e=>{"use strict";e.s(["isDisabledReactIssue7711",0,function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let s=(null==t?void 0:t.getAttribute("disabled"))==="";return!(s&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&s}])},83733,233137,e=>{"use strict";let t,n;var s,r,i=e.i(247167),l=e.i(271645),a=e.i(544508),o=e.i(746725),d=e.i(835696);void 0!==i.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(s=null==i.default?void 0:i.default.env)?void 0:s.NODE_ENV)==="test"&&void 0===(null==(r=null==Element?void 0:Element.prototype)?void 0:r.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
-`)),[]});var u=((t=u||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);e.s(["transitionDataAttributes",0,function(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t},"useTransition",0,function(e,t,n,s){let[r,i]=(0,l.useState)(n),{hasFlag:u,addFlag:c,removeFlag:m}=function(e=0){let[t,n]=(0,l.useState)(e),s=(0,l.useCallback)(e=>n(e),[t]),r=(0,l.useCallback)(e=>n(t=>t|e),[t]),i=(0,l.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:s,addFlag:r,hasFlag:i,removeFlag:(0,l.useCallback)(e=>n(t=>t&~e),[n]),toggleFlag:(0,l.useCallback)(e=>n(t=>t^e),[n])}}(e&&r?3:0),h=(0,l.useRef)(!1),p=(0,l.useRef)(!1),f=(0,o.useDisposables)();return(0,d.useIsoMorphicEffect)(()=>{var r;if(e){if(n&&i(!0),!t){n&&c(3);return}return null==(r=null==s?void 0:s.start)||r.call(s,n),function(e,{prepare:t,run:n,done:s,inFlight:r}){let i=(0,a.disposables)();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return n();let s=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=s}(e,{prepare:t,inFlight:r}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(function(e,t){var n,s;let r=(0,a.disposables)();if(!e)return r.dispose;let i=!1;r.add(()=>{i=!0});let l=null!=(s=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?s:[];return 0===l.length?t():Promise.allSettled(l.map(e=>e.finished)).then(()=>{i||t()}),r.dispose}(e,s))})}),i.dispose}(t,{inFlight:h,prepare(){p.current?p.current=!1:p.current=h.current,h.current=!0,p.current||(n?(c(3),m(4)):(c(4),m(2)))},run(){p.current?n?(m(3),c(4)):(m(4),c(3)):n?m(1):c(1)},done(){var e;p.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(h.current=!1,m(7),n||i(!1),null==(e=null==s?void 0:s.end)||e.call(s,n))}})}},[e,n,t,f]),e?[r,{closed:u(1),enter:u(2),leave:u(4),transition:u(2)||u(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}],83733);let c=(0,l.createContext)(null);c.displayName="OpenClosedContext";var m=((n=m||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);e.s(["OpenClosedProvider",0,function({value:e,children:t}){return l.default.createElement(c.Provider,{value:e},t)},"ResetOpenClosedProvider",0,function({children:e}){return l.default.createElement(c.Provider,{value:null},e)},"State",0,m,"useOpenClosed",0,function(){return(0,l.useContext)(c)}],233137)},677667,674175,886148,543086,e=>{"use strict";let t,n;var s,r=e.i(290571),i=e.i(783222),l=e.i(433336),a=e.i(271645),o=e.i(394487),d=e.i(914189),u=e.i(144279),c=e.i(294316),m=e.i(83733);let h=(0,a.createContext)(()=>{});function p({value:e,children:t}){return a.default.createElement(h.Provider,{value:e},t)}e.s(["CloseProvider",0,p],674175);var f=e.i(233137),g=e.i(233538),x=e.i(397701),v=e.i(402155),b=e.i(700020);let y=null!=(s=a.default.startTransition)?s:function(e){e()};var j=e.i(998348),C=((t=C||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((n=w||{})[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.SetButtonElement=4]="SetButtonElement",n[n.SetPanelElement=5]="SetPanelElement",n);let E={0:e=>({...e,disclosureState:(0,x.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},S=(0,a.createContext)(null);function N(e){let t=(0,a.useContext)(S);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return t}S.displayName="DisclosureContext";let k=(0,a.createContext)(null);k.displayName="DisclosureAPIContext";let _=(0,a.createContext)(null);function T(e,t){return(0,x.match)(t.type,E,e,t)}_.displayName="DisclosurePanelContext";let I=a.Fragment,O=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,P=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:n=!1,...s}=e,r=(0,a.useRef)(null),i=(0,c.useSyncRefs)(t,(0,c.optionalRef)(e=>{r.current=e},void 0===e.as||e.as===a.Fragment)),l=(0,a.useReducer)(T,{disclosureState:+!n,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:u},m]=l,h=(0,d.useEvent)(e=>{m({type:1});let t=(0,v.getOwnerDocument)(r);if(!t||!u)return;let n=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(u):t.getElementById(u);null==n||n.focus()}),g=(0,a.useMemo)(()=>({close:h}),[h]),y=(0,a.useMemo)(()=>({open:0===o,close:h}),[o,h]),j=(0,b.useRender)();return a.default.createElement(S.Provider,{value:l},a.default.createElement(k.Provider,{value:g},a.default.createElement(p,{value:h},a.default.createElement(f.OpenClosedProvider,{value:(0,x.match)(o,{0:f.State.Open,1:f.State.Closed})},j({ourProps:{ref:i},theirProps:s,slot:y,defaultTag:I,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),{id:s=`headlessui-disclosure-button-${n}`,disabled:r=!1,autoFocus:m=!1,...h}=e,[p,f]=N("Disclosure.Button"),x=(0,a.useContext)(_),v=null!==x&&x===p.panelId,y=(0,a.useRef)(null),C=(0,c.useSyncRefs)(y,t,(0,d.useEvent)(e=>{if(!v)return f({type:4,element:e})}));(0,a.useEffect)(()=>{if(!v)return f({type:2,buttonId:s}),()=>{f({type:2,buttonId:null})}},[s,f,v]);let w=(0,d.useEvent)(e=>{var t;if(v){if(1===p.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),f({type:0}),null==(t=p.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),f({type:0})}}),E=(0,d.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),S=(0,d.useEvent)(e=>{var t;(0,g.isDisabledReactIssue7711)(e.currentTarget)||r||(v?(f({type:0}),null==(t=p.buttonElement)||t.focus()):f({type:0}))}),{isFocusVisible:k,focusProps:T}=(0,i.useFocusRing)({autoFocus:m}),{isHovered:I,hoverProps:O}=(0,l.useHover)({isDisabled:r}),{pressed:P,pressProps:L}=(0,o.useActivePress)({disabled:r}),D=(0,a.useMemo)(()=>({open:0===p.disclosureState,hover:I,active:P,disabled:r,focus:k,autofocus:m}),[p,I,P,k,r,m]),R=(0,u.useResolveButtonType)(e,p.buttonElement),M=v?(0,b.mergeProps)({ref:C,type:R,disabled:r||void 0,autoFocus:m,onKeyDown:w,onClick:S},T,O,L):(0,b.mergeProps)({ref:C,id:s,type:R,"aria-expanded":0===p.disclosureState,"aria-controls":p.panelElement?p.panelId:void 0,disabled:r||void 0,autoFocus:m,onKeyDown:w,onKeyUp:E,onClick:S},T,O,L);return(0,b.useRender)()({ourProps:M,theirProps:h,slot:D,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),{id:s=`headlessui-disclosure-panel-${n}`,transition:r=!1,...i}=e,[l,o]=N("Disclosure.Panel"),{close:u}=function e(t){let n=(0,a.useContext)(k);if(null===n){let n=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}return n}("Disclosure.Panel"),[h,p]=(0,a.useState)(null),g=(0,c.useSyncRefs)(t,(0,d.useEvent)(e=>{y(()=>o({type:5,element:e}))}),p);(0,a.useEffect)(()=>(o({type:3,panelId:s}),()=>{o({type:3,panelId:null})}),[s,o]);let x=(0,f.useOpenClosed)(),[v,j]=(0,m.useTransition)(r,h,null!==x?(x&f.State.Open)===f.State.Open:0===l.disclosureState),C=(0,a.useMemo)(()=>({open:0===l.disclosureState,close:u}),[l.disclosureState,u]),w={ref:g,id:s,...(0,m.transitionDataAttributes)(j)},E=(0,b.useRender)();return a.default.createElement(f.ResetOpenClosedProvider,null,a.default.createElement(_.Provider,{value:l.panelId},E({ourProps:w,theirProps:i,slot:C,defaultTag:"div",features:O,visible:v,name:"Disclosure.Panel"})))})});e.s(["Disclosure",0,P],886148);let L=(0,a.createContext)(void 0);var D=e.i(444755);let R=(0,e.i(673706).makeClassName)("Accordion"),M=(0,a.createContext)({isOpen:!1}),F=a.default.forwardRef((e,t)=>{var n;let{defaultOpen:s=!1,children:i,className:l}=e,o=(0,r.__rest)(e,["defaultOpen","children","className"]),d=null!=(n=(0,a.useContext)(L))?n:(0,D.tremorTwMerge)("rounded-tremor-default border");return a.default.createElement(P,Object.assign({as:"div",ref:t,className:(0,D.tremorTwMerge)(R("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,l),defaultOpen:s},o),({open:e})=>a.default.createElement(M.Provider,{value:{isOpen:e}},i))});F.displayName="Accordion",e.s(["OpenContext",0,M,"default",0,F],543086),e.s(["Accordion",0,F],677667)},130643,e=>{"use strict";var t=e.i(290571),n=e.i(271645),s=e.i(886148),r=e.i(444755);let i=(0,e.i(673706).makeClassName)("AccordionBody"),l=n.default.forwardRef((e,l)=>{let{children:a,className:o}=e,d=(0,t.__rest)(e,["children","className"]);return n.default.createElement(s.Disclosure.Panel,Object.assign({ref:l,className:(0,r.tremorTwMerge)(i("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},d),a)});l.displayName="AccordionBody",e.s(["AccordionBody",0,l],130643)},898667,e=>{"use strict";var t=e.i(290571),n=e.i(271645),s=e.i(886148);let r=e=>{var s=(0,t.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},s),n.default.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 i=e.i(543086),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("AccordionHeader"),o=n.default.forwardRef((e,o)=>{let{children:d,className:u}=e,c=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,n.useContext)(i.OpenContext);return n.default.createElement(s.Disclosure.Button,Object.assign({ref:o,className:(0,l.tremorTwMerge)(a("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",u)},c),n.default.createElement("div",{className:(0,l.tremorTwMerge)(a("children"),"flex flex-1 text-inherit mr-4")},d),n.default.createElement("div",null,n.default.createElement(r,{className:(0,l.tremorTwMerge)(a("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});o.displayName="AccordionHeader",e.s(["AccordionHeader",0,o],898667)},743151,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var s=l(e.r(844343)),r=l(e.r(271645)),i=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}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 o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,s)}return n}function d(e){for(var t=1;t{"use strict";var s=e.r(743151).CopyToClipboard;s.CopyToClipboard=s,t.exports=s},285027,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let s={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"};var r=e.i(9583),i=n.forwardRef(function(e,i){return n.createElement(r.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["WarningOutlined",0,i],285027)},540626,e=>{"use strict";let t;var n,s=e.i(271645);let r=(0,s.createContext)(null);function i(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,s]of e)if(!t.has(n)||!Object.is(s,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=l(e);if(n.length!==l(t).length)return!1;for(let s=0;se,n){let r=n?.compare??o,i=(0,s.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),l=(0,s.useCallback)(()=>e.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(i,l,l,t,r)}function u(e,...t){return"function"==typeof e?e(...t):e}var c=class{#e=!0;#t;#n;#s;#r;#i;#l;#a;#o=0;#d=5;#u=!1;#c=!1;#m=null;#h=()=>{this.debugLog("Connected to event bus"),this.#i=!0,this.#u=!1,this.debugLog("Emitting queued events",this.#r),this.#r.forEach(e=>this.emitEventToBus(e)),this.#r=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#h)};#p=()=>{if(this.#o{this.#u||(this.#u=!0,this.#n().addEventListener("tanstack-connect-success",this.#h),this.#p())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:s=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#s=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#r=[],this.#i=!1,this.#c=!1,this.#l=null,this.#a=s}startConnectLoop(){null!==this.#l||this.#i||(this.debugLog(`Starting connect loop (every ${this.#a}ms)`),this.#l=setInterval(this.#p,this.#a))}stopConnectLoop(){this.#u=!1,null!==this.#l&&(clearInterval(this.#l),this.#l=null,this.#r=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#s&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#m&&(this.debugLog("Emitting event to internal event target",e,t),this.#m.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#c)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#i){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#r.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#u&&(this.#f(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let s=n?.withEventTarget??!1,r=`${this.#t}:${e}`;if(s&&(this.#m||(this.#m=new EventTarget),this.#m.addEventListener(r,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",r),()=>{};let i=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(r,i),this.debugLog("Registered event to bus",r),()=>{s&&this.#m?.removeEventListener(r,i),this.#n().removeEventListener(r,i)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let m=new Map;function h(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let p=new class extends c{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}},f=((n={})[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n);function g(e,t,n){let s="object"==typeof e,r=s?e:void 0;return{next:(s?e.next:e)?.bind(r),error:(s?e.error:t)?.bind(r),complete:(s?e.complete:n)?.bind(r)}}let x=[],v=0,{link:b,unlink:y,propagate:j,checkDirty:C,shallowPropagate:w}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let s=t.depsTail;if(void 0!==s&&s.dep===e)return;let r=void 0!==s?s.nextDep:t.deps;if(void 0!==r&&r.dep===e){r.version=n,t.depsTail=r;return}let i=e.subsTail;if(void 0!==i&&i.version===n&&i.sub===t)return;let l=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:s,nextDep:r,prevSub:i,nextSub:void 0};void 0!==r&&(r.prevDep=l),void 0!==s?s.nextDep=l:t.deps=l,void 0!==i?i.nextSub=l:e.subs=l},unlink:function(e,t=e.sub){let s=e.dep,r=e.prevDep,i=e.nextDep,l=e.nextSub,a=e.prevSub;return void 0!==i?i.prevDep=r:t.depsTail=r,void 0!==r?r.nextDep=i:t.deps=i,void 0!==l?l.prevSub=a:s.subsTail=a,void 0!==a?a.nextSub=l:void 0===(s.subs=l)&&n(s),i},propagate:function(e){let n,s=e.nextSub;e:for(;;){let r=e.sub,i=r.flags;if(i&(f.RecursedCheck|f.Recursed|f.Dirty|f.Pending)?i&(f.RecursedCheck|f.Recursed)?i&f.RecursedCheck?!(i&(f.Dirty|f.Pending))&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,r)?(r.flags=i|(f.Recursed|f.Pending),i&=f.Mutable):i=f.None:r.flags=i&~f.Recursed|f.Pending:i=f.None:r.flags=i|f.Pending,i&f.Watching&&t(r),i&f.Mutable){let t=r.subs;if(void 0!==t){let r=(e=t).nextSub;void 0!==r&&(n={value:s,prev:n},s=r);continue}}if(void 0!==(e=s)){s=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){s=e.nextSub;continue e}break}},checkDirty:function(t,n){let r,i=0,l=!1;e:for(;;){let a=t.dep,o=a.flags;if(n.flags&f.Dirty)l=!0;else if((o&(f.Mutable|f.Dirty))==(f.Mutable|f.Dirty)){if(e(a)){let e=a.subs;void 0!==e.nextSub&&s(e),l=!0}}else if((o&(f.Mutable|f.Pending))==(f.Mutable|f.Pending)){(void 0!==t.nextSub||void 0!==t.prevSub)&&(r={value:t,prev:r}),t=a.deps,n=a,++i;continue}if(!l){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;i--;){let i=n.subs,a=void 0!==i.nextSub;if(a?(t=r.value,r=r.prev):t=i,l){if(e(n)){a&&s(i),n=t.sub;continue}l=!1}else n.flags&=~f.Pending;n=t.sub;let o=t.nextDep;if(void 0!==o){t=o;continue e}}return l}},shallowPropagate:s};function s(e){do{let n=e.sub,s=n.flags;(s&(f.Pending|f.Dirty))===f.Pending&&(n.flags=s|f.Dirty,(s&(f.Watching|f.RecursedCheck))===f.Watching&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){x[S++]=e,e.flags&=~f.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=f.Mutable|f.Dirty,N(e))}}),E=0,S=0;function N(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=y(n,e)}var k=class{constructor(e,n){this.atom=function(e){let n="function"==typeof e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?f.None:f.Mutable,get:()=>(void 0!==t&&b(s,t,v),s._snapshot),subscribe(e){var n;let r,i,l=g(e),a={current:!1},o=(n=()=>{s.get(),a.current?l.next?.(s._snapshot):a.current=!0},r=()=>{let e=t;t=i,++v,i.depsTail=void 0,i.flags=f.Watching|f.RecursedCheck;try{return n()}finally{t=e,i.flags&=~f.RecursedCheck,N(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:f.Watching|f.RecursedCheck,notify(){let e=this.flags;e&f.Dirty||e&f.Pending&&C(this.deps,this)?r():this.flags=f.Watching},stop(){this.flags=f.None,this.depsTail=void 0,N(this)}},r(),i);return{unsubscribe:()=>{o.stop()}}},_update(r){let i=t,l=(void 0)??Object.is;if(n)t=s,++v,s.depsTail=void 0;else if(void 0===r)return!1;n&&(s.flags=f.Mutable|f.RecursedCheck);try{let t=s._snapshot,i="function"==typeof r?r(t):void 0===r&&n?e(t):r;if(void 0===t||!l(t,i))return s._snapshot=i,!0;return!1}finally{t=i,n&&(s.flags&=~f.RecursedCheck),N(s)}}};return n?(s.flags=f.Mutable|f.Dirty,s.get=function(){let e=s.flags;if(e&f.Dirty||e&f.Pending&&C(s.deps,s)){if(s._update()){let e=s.subs;void 0!==e&&w(e)}}else e&f.Pending&&(s.flags=e&~f.Pending);return void 0!==t&&b(s,t,v),s._snapshot}):s.set=function(e){if(s._update(e)){let e=s.subs;if(void 0!==e&&(j(e),w(e),1)){for(;E{this.options={...this.options,...e},this.#x()||this.cancel()},this.#v=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:s}=n;return{...n,status:this.#x()?s?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;if(n){var s,r;m.set(n,t),p.emit(e,{key:(s={...t,key:n}).key,store:{state:h("function"==typeof(r=s.store).get?r.get():r.state)},options:h(s.options)})}})("Debouncer",this)},this.#x=()=>!!u(this.options.enabled,this),this.#b=()=>u(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#x())return;this.#v({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#v({canLeadingExecute:!1}),t=!0,this.#y(...e)),this.options.trailing&&this.#v({isPending:!0,lastArgs:e}),this.#g&&clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#v({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#y(...e)},this.#b())},this.#y=(...e)=>{this.#x()&&(this.fn(...e),this.#v({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#j(),this.#y(...this.store.state.lastArgs))},this.#j=()=>{this.#g&&(clearTimeout(this.#g),this.#g=void 0)},this.cancel=()=>{this.#j(),this.#v({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#v(_())},this.key=t.key,this.options={...T,...t},this.#v(this.options.initialState??{}),this.key&&p.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#v(e.payload.store.state),this.setOptions(e.payload.options))})}#v;#x;#b;#y;#j};e.s(["useDebouncer",0,function(e,t,n=()=>({})){let l={...((0,s.useContext)(r)?.defaultOptions??{}).debouncer,...t},[a]=(0,s.useState)(()=>{let t=new I(e,l);return t.Subscribe=function(e){let n=d(t.store,e.selector,{compare:i});return"function"==typeof e.children?e.children(n):e.children},t});a.fn=e,a.setOptions(l),(0,s.useEffect)(()=>()=>{l.onUnmount?l.onUnmount(a):a.cancel()},[]);let o=d(a.store,n,{compare:i});return(0,s.useMemo)(()=>({...a,state:o}),[a,o])}],540626)},741466,e=>{"use strict";e.s(["DEBOUNCE_WAIT_MS",0,300])},399029,e=>{"use strict";var t=e.i(540626),n=e.i(271645);e.s(["useDebouncedState",0,function(e,s,r){let[i,l]=(0,n.useState)(e),a=(0,t.useDebouncer)(l,s,r);return[i,a.maybeExecute,a]}])},663435,e=>{"use strict";var t=e.i(843476),n=e.i(271645),s=e.i(199133),r=e.i(898586),i=e.i(56456),l=e.i(399029),a=e.i(785242),o=e.i(741466);let{Text:d}=r.Typography;e.s(["default",0,({value:e,onChange:r,onTeamSelect:u,disabled:c,organizationId:m,pageSize:h=20})=>{let[p,f]=(0,n.useState)(""),[g,x]=(0,l.useDebouncedState)("",{wait:o.DEBOUNCE_WAIT_MS}),{data:v,fetchNextPage:b,hasNextPage:y,isFetchingNextPage:j,isLoading:C}=(0,a.useInfiniteTeams)(h,g||void 0,m),w=(0,n.useMemo)(()=>{if(!v?.pages)return[];let e=new Set,t=[];for(let n of v.pages)for(let s of n.teams)e.has(s.team_id)||(e.add(s.team_id),t.push(s));return t},[v]);return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{r?.(e??""),u&&u(e?w.find(t=>t.team_id===e)??null:null)},disabled:c,allowClear:!0,filterOption:!1,onSearch:e=>{f(e),x(e)},searchValue:p,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&y&&!j&&b()},loading:C,notFoundContent:C?(0,t.jsx)(i.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,j&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(i.LoadingOutlined,{spin:!0})})]}),children:w.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(d,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}])},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),n=e.i(914189);e.s(["useControllable",0,function(e,s,r){let[i,l]=(0,t.useState)(r),a=void 0!==e,o=(0,t.useRef)(a),d=(0,t.useRef)(!1),u=(0,t.useRef)(!1);return!a||o.current||d.current?a||!o.current||u.current||(u.current=!0,o.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(d.current=!0,o.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:i,(0,n.useEvent)(e=>(a||l(e),null==s?void 0:s(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[n]=(0,t.useState)(e);return n}],214520);let s=(0,t.createContext)(void 0);function r(){return(0,t.useContext)(s)}e.s(["useDisabled",0,r],601893);var i=e.i(174080),l=e.i(746725);function a(e={},t=null,n=[]){for(let[s,r]of Object.entries(e))!function e(t,n,s){if(Array.isArray(s))for(let[r,i]of s.entries())e(t,o(n,r.toString()),i);else s instanceof Date?t.push([n,s.toISOString()]):"boolean"==typeof s?t.push([n,s?"1":"0"]):"string"==typeof s?t.push([n,s]):"number"==typeof s?t.push([n,`${s}`]):null==s?t.push([n,""]):a(s,n,t)}(n,o(t,s),r);return n}function o(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,n;let s=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(s){for(let t of s.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=s.requestSubmit)||n.call(s)}},"objectToFormEntries",0,a],694421);var d=e.i(700020),u=e.i(2788);let c=(0,t.createContext)(null);function m({children:e}){let n=(0,t.useContext)(c);if(!n)return t.default.createElement(t.default.Fragment,null,e);let{target:s}=n;return s?(0,i.createPortal)(t.default.createElement(t.default.Fragment,null,e),s):null}function h({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(u.Hidden,{features:u.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",0,function({data:e,form:n,disabled:s,onReset:r,overrides:i}){let[o,c]=(0,t.useState)(null),p=(0,l.useDisposables)();return(0,t.useEffect)(()=>{if(r&&o)return p.addEventListener(o,"reset",r)},[o,n,r]),t.default.createElement(m,null,t.default.createElement(h,{setForm:c,formId:n}),a(e).map(([e,r])=>t.default.createElement(u.Hidden,{features:u.HiddenFeatures.Hidden,...(0,d.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:s,name:e,value:r,...i})})))}],140721);let p=(0,t.createContext)(void 0);function f(){return(0,t.useContext)(p)}e.s(["useProvidedId",0,f],942803);var g=e.i(835696),x=e.i(294316);let v=(0,t.createContext)(null);v.displayName="DescriptionContext";let b=Object.assign((0,d.forwardRefWithAs)(function(e,n){let s=(0,t.useId)(),i=r(),{id:l=`headlessui-description-${s}`,...a}=e,o=function e(){let n=(0,t.useContext)(v);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),u=(0,x.useSyncRefs)(n);(0,g.useIsoMorphicEffect)(()=>o.register(l),[l,o.register]);let c=i||!1,m=(0,t.useMemo)(()=>({...o.slot,disabled:c}),[o.slot,c]),h={ref:u,...o.props,id:l};return(0,d.useRender)()({ourProps:h,theirProps:a,slot:m,defaultTag:"p",name:o.name||"Description"})}),{});e.s(["Description",0,b,"useDescribedBy",0,function(){var e,n;return null!=(n=null==(e=(0,t.useContext)(v))?void 0:e.value)?n:void 0},"useDescriptions",0,function(){let[e,s]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let r=(0,n.useEvent)(e=>(s(t=>[...t,e]),()=>s(t=>{let n=t.slice(),s=n.indexOf(e);return -1!==s&&n.splice(s,1),n}))),i=(0,t.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return t.default.createElement(v.Provider,{value:i},e.children)},[s])]}],35889);let y=(0,t.createContext)(null);function j(e){var n,s,r;let i=null!=(s=null==(n=(0,t.useContext)(y))?void 0:n.value)?s:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}y.displayName="LabelContext";let C=Object.assign((0,d.forwardRefWithAs)(function(e,s){var i;let l=(0,t.useId)(),a=function e(){let n=(0,t.useContext)(y);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),o=f(),u=r(),{id:c=`headlessui-label-${l}`,htmlFor:m=null!=o?o:null==(i=a.props)?void 0:i.htmlFor,passive:h=!1,...p}=e,v=(0,x.useSyncRefs)(s);(0,g.useIsoMorphicEffect)(()=>a.register(c),[c,a.register]);let b=(0,n.useEvent)(e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),a.props&&"onClick"in a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),j=u||!1,C=(0,t.useMemo)(()=>({...a.slot,disabled:j}),[a.slot,j]),w={ref:v,...a.props,id:c,htmlFor:m,onClick:b};return h&&("onClick"in w&&(delete w.htmlFor,delete w.onClick),"onClick"in p&&delete p.onClick),(0,d.useRender)()({ourProps:w,theirProps:p,slot:C,defaultTag:m?"label":"div",name:a.name||"Label"})}),{});e.s(["Label",0,C,"useLabelledBy",0,j,"useLabels",0,function({inherit:e=!1}={}){let s=j(),[r,i]=(0,t.useState)([]),l=e?[s,...r].filter(Boolean):r;return[l.length>0?l.join(" "):void 0,(0,t.useMemo)(()=>function(e){let s=(0,n.useEvent)(e=>(i(t=>[...t,e]),()=>i(t=>{let n=t.slice(),s=n.indexOf(e);return -1!==s&&n.splice(s,1),n}))),r=(0,t.useMemo)(()=>({register:s,slot:e.slot,name:e.name,props:e.props,value:e.value}),[s,e.slot,e.name,e.props,e.value]);return t.default.createElement(y.Provider,{value:r},e.children)},[i])]}],722678)},35983,220508,e=>{"use strict";var t=e.i(333771);e.s(["SelectItem",()=>t.default],35983);var n=e.i(271645);let s=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,s],220508)},371455,172372,e=>{"use strict";var t=e.i(843476),n=e.i(827252),s=e.i(213205),r=e.i(912598),i=e.i(109799),l=e.i(677667),a=e.i(130643),o=e.i(898667),d=e.i(35983),u=e.i(779241),c=e.i(560445),m=e.i(464571),h=e.i(536916),p=e.i(808613),f=e.i(311451),g=e.i(212931),x=e.i(199133),v=e.i(770914),b=e.i(592968),y=e.i(898586),j=e.i(271645),C=e.i(599724),w=e.i(291542),E=e.i(515831),S=e.i(519756),N=e.i(737434),k=e.i(285027),_=e.i(993914),T=e.i(955135);e.i(247167);var I=e.i(931067);let O={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"};var P=e.i(9583),L=j.forwardRef(function(e,t){return j.createElement(P.default,(0,I.default)({},e,{ref:t,icon:O}))}),D=e.i(602869),R=e.i(59935),M=e.i(220508);let F=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}),A=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});var B=e.i(237016),U=e.i(727749);let V=({accessToken:e,teams:n,possibleUIRoles:s,onUsersCreated:r})=>{let[i,l]=(0,j.useState)(!1),[a,o]=(0,j.useState)([]),[d,u]=(0,j.useState)(!1),[c,h]=(0,j.useState)(null),[p,f]=(0,j.useState)(null),[x,v]=(0,j.useState)(null),[b,I]=(0,j.useState)(null),[O,P]=(0,j.useState)(null),[V,z]=(0,j.useState)("http://localhost:4000");(0,j.useEffect)(()=>{(async()=>{try{let t=await (0,D.getProxyUISettings)(e);P(t)}catch(e){console.error("Error fetching UI settings:",e)}})(),z(new URL("/",window.location.href).toString())},[e]);let $=async()=>{u(!0);let t=a.map(e=>({...e,status:"pending"}));o(t);let n=!1;for(let s=0;se.trim()).filter(Boolean),0===t.teams.length&&delete t.teams),r.models&&"string"==typeof r.models&&""!==r.models.trim()&&(t.models=r.models.split(",").map(e=>e.trim()).filter(Boolean),0===t.models.length&&delete t.models),r.max_budget&&""!==r.max_budget.toString().trim()){let e=parseFloat(r.max_budget.toString());!isNaN(e)&&e>0&&(t.max_budget=e)}r.budget_duration&&""!==r.budget_duration.trim()&&(t.budget_duration=r.budget_duration.trim()),r.metadata&&"string"==typeof r.metadata&&""!==r.metadata.trim()&&(t.metadata=r.metadata.trim());let i=await (0,D.userCreateCall)(e,null,t);if(i&&(i.key||i.user_id)){n=!0;let t=i.data?.user_id||i.user_id;try{if(O?.SSO_ENABLED){let e=new URL("/ui",V).toString();o(t=>t.map((t,n)=>n===s?{...t,status:"success",key:i.key||i.user_id,invitation_link:e}:t))}else{let n=await (0,D.invitationCreateCall)(e,t),r=new URL(`/ui/onboarding?invitation_id=${n.id}`,V).toString();o(e=>e.map((e,t)=>t===s?{...e,status:"success",key:i.key||i.user_id,invitation_link:r}:e))}}catch(e){console.error("Error creating invitation:",e),o(e=>e.map((e,t)=>t===s?{...e,status:"success",key:i.key||i.user_id,error:"User created but failed to generate invitation link"}:e))}}else{let e=i?.error||"Failed to create user";o(t=>t.map((t,n)=>n===s?{...t,status:"failed",error:e}:t))}}catch(t){console.error("Caught error:",t);let e=t?.response?.data?.error||t?.message||String(t);o(t=>t.map((t,n)=>n===s?{...t,status:"failed",error:e}:t))}}u(!1),n&&r&&r()},H=[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,n)=>n.isValid?n.status&&"pending"!==n.status?"success"===n.status?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(M.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}),(0,t.jsx)("span",{className:"text-green-500",children:"Success"})]}),n.invitation_link&&(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:n.invitation_link}),(0,t.jsx)(B.CopyToClipboard,{text:n.invitation_link,onCopy:()=>U.default.success("Invitation link copied!"),children:(0,t.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(F,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsx)("span",{className:"text-red-500",children:"Failed"})]}),n.error&&(0,t.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(n.error)})]}):(0,t.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(F,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),n.error&&(0,t.jsx)("span",{className:"text-sm text-red-500 ml-7",children:n.error})]})}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{type:"primary",className:"mb-0",onClick:()=>l(!0),children:"+ Bulk Invite Users"}),(0,t.jsx)(g.Modal,{title:"Bulk Invite Users",open:i,width:800,onCancel:()=>l(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,t.jsx)("div",{className:"flex flex-col",children:0===a.length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,t.jsxs)("div",{className:"ml-11 mb-6",children:[(0,t.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,t.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,t.jsx)("li",{children:"Download our CSV template"}),(0,t.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,t.jsx)("li",{children:"Save the file and upload it here"}),(0,t.jsx)("li",{children:"After creation, download the results file containing the Virtual Keys for each user"})]}),(0,t.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"user_email"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"user_role"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer") '})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"teams"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"models"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,t.jsx)(m.Button,{type:"primary",size:"large",className:"w-full md:w-auto",icon:(0,t.jsx)(N.DownloadOutlined,{}),children:"Download CSV Template"})]}),(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,t.jsxs)("div",{className:"ml-11",children:[b?(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-md border ${x?"bg-red-50 border-red-200":"bg-blue-50 border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[x?(0,t.jsx)(L,{className:"text-red-500 text-xl mr-3"}):(0,t.jsx)(_.FileTextOutlined,{className:"text-blue-500 text-xl mr-3"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,className:x?"text-red-800":"text-blue-800",children:b.name}),(0,t.jsxs)(y.Typography.Text,{className:`block text-xs ${x?"text-red-600":"text-blue-600"}`,children:[(b.size/1024).toFixed(1)," KB • ",new Date().toLocaleDateString()]})]})]}),(0,t.jsx)(m.Button,{size:"small",onClick:()=>{I(null),o([]),h(null),f(null),v(null)},className:"flex items-center",icon:(0,t.jsx)(T.DeleteOutlined,{}),children:"Remove"})]}),x?(0,t.jsxs)("div",{className:"mt-3 text-red-600 text-sm flex items-start",children:[(0,t.jsx)(k.WarningOutlined,{className:"mr-2 mt-0.5"}),(0,t.jsx)("span",{children:x})]}):!p&&(0,t.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,t.jsx)("div",{className:"bg-blue-500 h-1.5 rounded-full w-full animate-pulse"})}),(0,t.jsx)("span",{className:"ml-2 text-xs text-blue-600",children:"Processing..."})]})]}):(0,t.jsx)(E.Upload,{beforeUpload:e=>((h(null),f(null),v(null),I(e),"text/csv"===e.type||e.name.endsWith(".csv"))?e.size>5242880?v(`File is too large (${(e.size/1048576).toFixed(1)} MB). Please upload a CSV file smaller than 5MB.`):R.default.parse(e,{complete:e=>{if(!e.data||0===e.data.length){f("The CSV file appears to be empty. Please upload a file with data."),o([]);return}if(1===e.data.length){f("The CSV file only contains headers but no user data. Please add user data to your CSV."),o([]);return}let t=e.data[0];if(0===t.length||1===t.length&&""===t[0]){f("The CSV file doesn't contain any column headers. Please make sure your CSV has headers."),o([]);return}let s=["user_email","user_role"].filter(e=>!t.includes(e));if(s.length>0){f(`Your CSV is missing these required columns: ${s.join(", ")}. Please add these columns to your CSV file.`),o([]);return}try{let s=e.data.slice(1).map((e,s)=>{if(0===e.length||1===e.length&&""===e[0])return null;if(e.length=parseFloat(r.max_budget.toString())&&i.push("Max budget must be greater than 0")),r.budget_duration&&!r.budget_duration.match(/^\d+[dhmwy]$|^\d+mo$/)&&i.push(`Invalid budget duration format "${r.budget_duration}". Use format like "30d", "1mo", "2w", "6h"`),r.teams&&"string"==typeof r.teams&&n&&n.length>0){let e=n.map(e=>e.team_id),t=r.teams.split(",").map(e=>e.trim()).filter(t=>!e.includes(t));t.length>0&&i.push(`Unknown team(s): ${t.join(", ")}`)}return i.length>0&&(r.isValid=!1,r.error=i.join(", ")),r}).filter(Boolean),r=s.filter(e=>e.isValid);o(s),0===s.length?f("No valid data rows found in the CSV file. Please check your file format."):0===r.length?h("No valid users found in the CSV. Please check the errors below and fix your CSV file."):r.length{h(`Failed to parse CSV file: ${e.message}`),o([])},header:!1}):(v(`Invalid file type: ${e.name}. Please upload a CSV file (.csv extension).`),U.default.fromBackend("Invalid file type. Please upload a CSV file.")),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,t.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,t.jsx)(S.UploadOutlined,{className:"text-3xl text-gray-400 mb-2"}),(0,t.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,t.jsx)(m.Button,{size:"small",children:"Browse files"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-4",children:"Only CSV files (.csv) are supported"})]})}),p&&(0,t.jsx)("div",{className:"mb-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(A,{className:"h-5 w-5 text-yellow-500 mr-2 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,className:"text-yellow-800",children:"CSV Structure Error"}),(0,t.jsx)(y.Typography.Paragraph,{className:"text-yellow-700 mt-1 mb-0",children:p}),(0,t.jsx)(y.Typography.Paragraph,{className:"text-yellow-700 mt-2 mb-0",children:"Please download our template and ensure your CSV follows the required format."})]})]})})]})]}):(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,t.jsx)("h3",{className:"text-lg font-medium",children:a.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),c&&(0,t.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(k.WarningOutlined,{className:"text-red-500 mr-2 mt-1"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(C.Text,{className:"text-red-600 font-medium",children:c}),a.some(e=>!e.isValid)&&(0,t.jsxs)("ul",{className:"mt-2 list-disc list-inside text-red-600 text-sm",children:[(0,t.jsx)("li",{children:"Check the table below for specific errors in each row"}),(0,t.jsx)("li",{children:"Common issues include invalid email formats, missing required fields, or incorrect role values"}),(0,t.jsx)("li",{children:"Fix these issues in your CSV file and upload again"})]})]})]})}),(0,t.jsxs)("div",{className:"ml-11",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,t.jsx)("div",{className:"flex items-center",children:a.some(e=>"success"===e.status||"failed"===e.status)?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(C.Text,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,t.jsxs)(C.Text,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded-sm mr-2",children:[a.filter(e=>"success"===e.status).length," Successful"]}),a.some(e=>"failed"===e.status)&&(0,t.jsxs)(C.Text,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded-sm",children:[a.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(C.Text,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,t.jsxs)(C.Text,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded-sm",children:[a.filter(e=>e.isValid).length," of ",a.length," users valid"]})]})}),!a.some(e=>"success"===e.status||"failed"===e.status)&&(0,t.jsxs)("div",{className:"flex space-x-3",children:[(0,t.jsx)(m.Button,{onClick:()=>{o([]),h(null)},children:"Back"}),(0,t.jsx)(m.Button,{type:"primary",onClick:$,disabled:0===a.filter(e=>e.isValid).length||d,children:d?"Creating...":`Create ${a.filter(e=>e.isValid).length} Users`})]})]}),a.some(e=>"success"===e.status)&&(0,t.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"mr-3 mt-1",children:(0,t.jsx)(M.CheckCircleIcon,{className:"h-5 w-5 text-blue-500"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(C.Text,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,t.jsxs)(C.Text,{className:"block text-sm text-blue-700 mt-1",children:[(0,t.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing Virtual Keys and invitation links. Users will need these Virtual Keys to make LLM requests through LiteLLM."]})]})]})}),(0,t.jsx)(w.Table,{dataSource:a,columns:H,size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!a.some(e=>"success"===e.status||"failed"===e.status)&&(0,t.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,t.jsx)(m.Button,{onClick:()=>{o([]),h(null)},className:"mr-3",children:"Back"}),(0,t.jsx)(m.Button,{type:"primary",onClick:$,disabled:0===a.filter(e=>e.isValid).length||d,children:d?"Creating...":`Create ${a.filter(e=>e.isValid).length} Users`})]}),a.some(e=>"success"===e.status||"failed"===e.status)&&(0,t.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,t.jsx)(m.Button,{onClick:()=>{o([]),h(null)},className:"mr-3",children:"Start New Bulk Import"}),(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{let e=a.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),t=new Blob([R.default.unparse(e)],{type:"text/csv"}),n=window.URL.createObjectURL(t),s=document.createElement("a");s.href=n,s.download="bulk_users_results.csv",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(n)},icon:(0,t.jsx)(N.DownloadOutlined,{}),children:"Download User Credentials"})]})]})]})})})]})};var z=e.i(663435),$=e.i(355619);function H({isInvitationLinkModalVisible:e,setIsInvitationLinkModalVisible:n,baseUrl:s,invitationLinkData:r,modalType:i="invitation"}){let{Title:l,Paragraph:a}=y.Typography,o=()=>(function({baseUrl:e,invitationId:t,hasUserSetupSso:n,resetPassword:s}){if(!e)return"";let r=new URL(e).pathname,i=r&&"/"!==r?`${r}/ui`:"ui";return n?new URL(i,e).toString():t?new URL(`${i}/onboarding?invitation_id=${t}${s?"&action=reset_password":""}`,e).toString():""})({baseUrl:s,invitationId:r?.id,hasUserSetupSso:r?.has_user_setup_sso??!1,resetPassword:"resetPassword"===i});return(0,t.jsxs)(g.Modal,{title:"invitation"===i?"Invitation Link":"Reset Password Link",open:e,width:800,footer:null,onOk:()=>{n(!1)},onCancel:()=>{n(!1)},children:[(0,t.jsx)(a,{children:"invitation"===i?"Copy and send the generated link to onboard this user to the proxy.":"Copy and send the generated link to the user to reset their password."}),(0,t.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,t.jsx)(C.Text,{className:"text-base",children:"User ID"}),(0,t.jsx)(C.Text,{children:r?.user_id})]}),(0,t.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,t.jsx)(C.Text,{children:"invitation"===i?"Invitation Link":"Reset Password Link"}),(0,t.jsx)(C.Text,{children:(0,t.jsx)(C.Text,{children:o()})})]}),(0,t.jsx)("div",{className:"flex justify-end mt-5",children:(0,t.jsx)(B.CopyToClipboard,{text:o(),onCopy:()=>U.default.success("Copied!"),children:(0,t.jsx)(m.Button,{type:"primary",children:"invitation"===i?"Copy invitation link":"Copy password reset link"})})})]})}e.s(["default",0,H],172372);let{Option:W}=x.Select,{Text:q,Link:K,Title:G}=y.Typography;e.s(["CreateUserButton",0,({userID:e,accessToken:y,teams:C,possibleUIRoles:w,onUserCreated:E,isEmbedded:S=!1})=>{let N=(0,r.useQueryClient)(),[k,_]=(0,j.useState)(null),[T]=p.Form.useForm(),[I,O]=(0,j.useState)(!1),[P,L]=(0,j.useState)(!1),[R,M]=(0,j.useState)([]),[F,A]=(0,j.useState)(!1),[B,G]=(0,j.useState)(null),[J,Y]=(0,j.useState)(null),{data:Q=[]}=(0,i.useOrganizations)();(0,j.useMemo)(()=>{let e=Q.flatMap(e=>e.teams||[]);return e.length>0?e:C||[]},[Q,C]),(0,j.useEffect)(()=>{let t=async()=>{try{let t=await (0,D.modelAvailableCall)(y,e,"any"),n=[];for(let e=0;e{try{U.default.info("Making API Call"),S||O(!0),t.models&&0!==t.models.length||"proxy_admin"===t.user_role||(t.models=["no-default-models"]),t.organization_ids&&(t.organizations=t.organization_ids,delete t.organization_ids);let n=await (0,D.userCreateCall)(y,null,t);await N.invalidateQueries({queryKey:["userList"]}),L(!0);let s=n.data?.user_id||n.user_id;if(E&&S){E(s),T.resetFields();return}if(k?.SSO_ENABLED){let t={id:"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),user_id:s,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:e,updated_at:new Date,updated_by:e,has_user_setup_sso:!0};G(t),A(!0)}else(0,D.invitationCreateCall)(y,s).then(e=>{e.has_user_setup_sso=!1,G(e),A(!0)});U.default.success("API user Created"),T.resetFields(),localStorage.removeItem("userData"+e)}catch(t){let e=t.response?.data?.detail||t?.message||"Error creating the user";U.default.fromBackend(e),console.error("Error creating the user:",t)}};return S?(0,t.jsxs)(p.Form,{form:T,onFinish:Z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer",send_invite_email:!0},children:[(0,t.jsx)(c.Alert,{message:"Email invitations",description:(0,t.jsxs)(t.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,t.jsx)(K,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,t.jsx)(p.Form.Item,{label:"User Email",name:"user_email",children:(0,t.jsx)(u.TextInput,{placeholder:""})}),(0,t.jsx)(p.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(x.Select,{children:w&&Object.entries(w).map(([e,{ui_label:n,description:s}])=>(0,t.jsx)(d.SelectItem,{value:e,title:n,children:(0,t.jsxs)("div",{className:"flex",children:[n," ",(0,t.jsx)(q,{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:s})]})},e))})}),(0,t.jsx)(p.Form.Item,{label:"Team",name:"team_id",children:(0,t.jsx)(z.default,{})}),(0,t.jsx)(p.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(f.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(p.Form.Item,{label:"Send invitation email",name:"send_invite_email",valuePropName:"checked",children:(0,t.jsx)(h.Checkbox,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Create User"})})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(m.Button,{type:"primary",className:"mb-0",onClick:()=>O(!0),children:"+ Invite User"}),(0,t.jsx)(V,{accessToken:y,teams:C,possibleUIRoles:w}),(0,t.jsxs)(g.Modal,{title:"Invite User",open:I,width:800,footer:null,onOk:()=>{O(!1),T.resetFields()},onCancel:()=>{O(!1),L(!1),T.resetFields()},children:[(0,t.jsxs)(v.Space,{direction:"vertical",size:"middle",children:[(0,t.jsx)(q,{className:"mb-1",children:"Create a User who can own keys"}),(0,t.jsx)(c.Alert,{message:"Email invitations",description:(0,t.jsxs)(t.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,t.jsx)(K,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"})]}),(0,t.jsxs)(p.Form,{form:T,onFinish:Z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer",send_invite_email:!0},children:[(0,t.jsx)(p.Form.Item,{label:"User Email",name:"user_email",children:(0,t.jsx)(f.Input,{})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(b.Tooltip,{title:"This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings",children:(0,t.jsx)(n.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(x.Select,{children:w&&Object.entries(w).map(([e,{ui_label:n,description:s}])=>(0,t.jsxs)(d.SelectItem,{value:e,title:n,children:[(0,t.jsx)(q,{children:n}),(0,t.jsxs)(q,{type:"secondary",children:[" - ",s]})]},e))})}),(0,t.jsx)(p.Form.Item,{label:"Team",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,t.jsx)(z.default,{})}),(0,t.jsx)(p.Form.Item,{label:"Organization",name:"organization_ids",help:"The user will be added to the selected organization(s).",children:(0,t.jsx)(x.Select,{mode:"multiple",placeholder:"Select Organization",style:{width:"100%"},children:Q.map(e=>(0,t.jsxs)(W,{value:e.organization_id,children:[e.organization_alias," (",e.organization_id,")"]},e.organization_id))})}),(0,t.jsx)(p.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(f.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(p.Form.Item,{label:"Send invitation email",name:"send_invite_email",valuePropName:"checked",children:(0,t.jsx)(h.Checkbox,{})}),(0,t.jsxs)(l.Accordion,{children:[(0,t.jsx)(o.AccordionHeader,{children:(0,t.jsx)(q,{strong:!0,children:"Personal Key Creation"})}),(0,t.jsx)(a.AccordionBody,{children:(0,t.jsx)(p.Form.Item,{className:"gap-2",label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(b.Tooltip,{title:"Models user has access to, outside of team scope.",children:(0,t.jsx)(n.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,t.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,t.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),R.map(e=>(0,t.jsx)(x.Select.Option,{value:e,children:(0,$.getModelDisplayName)(e)},e))]})})})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{type:"primary",icon:(0,t.jsx)(s.UserAddOutlined,{}),htmlType:"submit",children:"Invite User"})})]})]}),P&&(0,t.jsx)(H,{isInvitationLinkModalVisible:F,setIsInvitationLinkModalVisible:A,baseUrl:J||"",invitationLinkData:B})]})}],371455)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0e3vwdd43gm8b.js b/litellm/proxy/_experimental/out/_next/static/chunks/0e3vwdd43gm8b.js
new file mode 100644
index 00000000000..1408e4abb8a
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0e3vwdd43gm8b.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},d)=>(0,t.jsx)("div",{ref:d,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));d.displayName="CardHeader";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));l.displayName="CardTitle";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));s.displayName="CardDescription";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));i.displayName="CardAction";let n=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));n.displayName="CardContent";let c=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,i,"CardContent",0,n,"CardDescription",0,s,"CardFooter",0,c,"CardHeader",0,d,"CardTitle",0,l])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:o=0,side:d="bottom",sideOffset:l=4,className:s,...i}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:d,sideOffset:l,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...i})})})},"DropdownMenuItem",0,function({className:e,inset:o,variant:d="default",...l}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":d,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...l})},"DropdownMenuSeparator",0,function({className:e,...o}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...o})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),d=e.i(444755),l=e.i(673706),s=e.i(95779);let i={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"}},n={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"}},c={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:""}},u=(0,l.makeClassName)("Icon"),g=r.default.forwardRef((e,g)=>{let{icon:m,variant:p="simple",tooltip:f,size:b=o.Sizes.SM,color:x,className:h}=e,v=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),w=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,d.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,d.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.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,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,d.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.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,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,d.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,d.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(p,x),{tooltipProps:C,getReferenceProps:k}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([g,C.refs.setReference]),className:(0,d.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,c[p].rounded,c[p].border,c[p].shadow,c[p].ring,i[b].paddingX,i[b].paddingY,h)},k,v),r.default.createElement(a.default,Object.assign({text:f},C)),r.default.createElement(m,{className:(0,d.tremorTwMerge)(u("icon"),"shrink-0",n[b].height,n[b].width)}))});g.displayName="Icon",e.s(["default",0,g],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},868499,e=>{"use strict";var t=e.i(843476);e.s([],558762),e.i(558762);var r=e.i(366250),a=e.i(402820),o=e.i(156736),d=e.i(209793),l=e.i(784324),s=e.i(264951),i=e.i(77173);let n=e.i(313488).DialogTrigger;var c=e.i(974217),u=e.i(325326),g=e.i(301807);let m={modal:!0,disablePointerDismissal:!0,role:"alertdialog"};class p extends u.DialogHandle{constructor(e){super(e??new g.DialogStore(m)),e&&this.store.update(m)}}e.s(["Backdrop",()=>a.DialogBackdrop,"Close",()=>o.DialogClose,"Description",()=>d.DialogDescription,"Handle",0,p,"Popup",()=>l.DialogPopup,"Portal",()=>s.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)(e,"alert-dialog")},"Title",()=>i.DialogTitle,"Trigger",0,n,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new p}],734604);var f=e.i(734604),f=f,b=e.i(115504),x=e.i(519455);function h({...e}){return(0,t.jsx)(f.Portal,{"data-slot":"alert-dialog-portal",...e})}function v({className:e,...r}){return(0,t.jsx)(f.Backdrop,{"data-slot":"alert-dialog-overlay",className:(0,b.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...r})}e.s(["AlertDialog",0,function({...e}){return(0,t.jsx)(f.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogAction",0,function({className:e,variant:r="default",size:a="default",...o}){return(0,t.jsx)(f.Close,{"data-slot":"alert-dialog-action",className:(0,b.cn)(e),render:(0,t.jsx)(x.Button,{variant:r,size:a}),...o})},"AlertDialogCancel",0,function({className:e,variant:r="outline",size:a="default",...o}){return(0,t.jsx)(f.Close,{"data-slot":"alert-dialog-cancel",className:(0,b.cn)(e),render:(0,t.jsx)(x.Button,{variant:r,size:a}),...o})},"AlertDialogContent",0,function({className:e,size:r="default",...a}){return(0,t.jsxs)(h,{children:[(0,t.jsx)(v,{}),(0,t.jsx)(f.Popup,{"data-slot":"alert-dialog-content","data-size":r,className:(0,b.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(f.Description,{"data-slot":"alert-dialog-description",className:(0,b.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,b.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,b.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(f.Title,{"data-slot":"alert-dialog-title",className:(0,b.cn)("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})},"AlertDialogTrigger",0,function({...e}){return(0,t.jsx)(f.Trigger,{"data-slot":"alert-dialog-trigger",...e})}],868499)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[o,d]=(0,t.useState)(e);return[a?r:o,e=>{a||d(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),a=e.i(433336),o=e.i(271645),d=e.i(394487),l=e.i(503269),s=e.i(214520),i=e.i(746725),n=e.i(914189),c=e.i(144279),u=e.i(294316),g=e.i(601893),m=e.i(140721),p=e.i(942803),f=e.i(233538),b=e.i(694421),x=e.i(700020),h=e.i(35889),v=e.i(998348),w=e.i(722678);let C=(0,o.createContext)(null);C.displayName="GroupContext";let k=o.Fragment,y=Object.assign((0,x.forwardRefWithAs)(function(e,t){var k;let y=(0,o.useId)(),N=(0,p.useProvidedId)(),D=(0,g.useDisabled)(),{id:j=N||`headlessui-switch-${y}`,disabled:M=D||!1,checked:T,defaultChecked:P,onChange:z,name:R,value:A,form:S,autoFocus:E=!1,..._}=e,F=(0,o.useContext)(C),[H,I]=(0,o.useState)(null),B=(0,o.useRef)(null),L=(0,u.useSyncRefs)(B,t,null===F?null:F.setSwitch,I),O=(0,s.useDefaultValue)(P),[V,K]=(0,l.useControllable)(T,z,null!=O&&O),X=(0,i.useDisposables)(),[Y,q]=(0,o.useState)(!1),U=(0,n.useEvent)(()=>{q(!0),null==K||K(!V),X.nextFrame(()=>{q(!1)})}),G=(0,n.useEvent)(e=>{if((0,f.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),W=(0,n.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),U()):e.key===v.Keys.Enter&&(0,b.attemptSubmit)(e.currentTarget)}),$=(0,n.useEvent)(e=>e.preventDefault()),J=(0,w.useLabelledBy)(),Q=(0,h.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:E}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:M}),{pressed:ea,pressProps:eo}=(0,d.useActivePress)({disabled:M}),ed=(0,o.useMemo)(()=>({checked:V,disabled:M,hover:et,focus:Z,active:ea,autofocus:E,changing:Y}),[V,et,Z,ea,M,Y,E]),el=(0,x.mergeProps)({id:j,ref:L,role:"switch",type:(0,c.useResolveButtonType)(e,H),tabIndex:-1===e.tabIndex?0:null!=(k=e.tabIndex)?k:0,"aria-checked":V,"aria-labelledby":J,"aria-describedby":Q,disabled:M||void 0,autoFocus:E,onClick:G,onKeyUp:W,onKeyPress:$},ee,er,eo),es=(0,o.useCallback)(()=>{if(void 0!==O)return null==K?void 0:K(O)},[K,O]),ei=(0,x.useRender)();return o.default.createElement(o.default.Fragment,null,null!=R&&o.default.createElement(m.FormFields,{disabled:M,data:{[R]:A||"on"},overrides:{type:"checkbox",checked:V},form:S,onReset:es}),ei({ourProps:el,theirProps:_,slot:ed,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,o.useState)(null),[d,l]=(0,w.useLabels)(),[s,i]=(0,h.useDescriptions)(),n=(0,o.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,x.useRender)();return o.default.createElement(i,{name:"Switch.Description",value:s},o.default.createElement(l,{name:"Switch.Label",value:d,props:{htmlFor:null==(t=n.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},o.default.createElement(C.Provider,{value:n},c({ourProps:{},theirProps:e,slot:{},defaultTag:k,name:"Switch.Group"}))))},Label:w.Label,Description:h.Description});var N=e.i(888288),D=e.i(95779),j=e.i(444755),M=e.i(673706),T=e.i(829087);let P=(0,M.makeClassName)("Switch"),z=o.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:d=!1,onChange:l,color:s,name:i,error:n,errorMessage:c,disabled:u,required:g,tooltip:m,id:p}=e,f=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:s?(0,M.getColorClassNames)(s,D.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,M.getColorClassNames)(s,D.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[x,h]=(0,N.default)(d,a),[v,w]=(0,o.useState)(!1),{tooltipProps:C,getReferenceProps:k}=(0,T.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement(T.default,Object.assign({text:m},C)),o.default.createElement("div",Object.assign({ref:(0,M.mergeRefs)([r,C.refs.setReference]),className:(0,j.tremorTwMerge)(P("root"),"flex flex-row relative h-5")},f,k),o.default.createElement("input",{type:"checkbox",className:(0,j.tremorTwMerge)(P("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:i,required:g,checked:x,onChange:e=>{e.preventDefault()}}),o.default.createElement(y,{checked:x,onChange:e=>{h(e),null==l||l(e)},disabled:u,className:(0,j.tremorTwMerge)(P("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:p},o.default.createElement("span",{className:(0,j.tremorTwMerge)(P("sr-only"),"sr-only")},"Switch ",x?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,j.tremorTwMerge)(P("background"),x?b.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.default.createElement("span",{"aria-hidden":"true",className:(0,j.tremorTwMerge)(P("round"),x?(0,j.tremorTwMerge)(b.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",v?(0,j.tremorTwMerge)("ring-2",b.ringColor):"")}))),n&&c?o.default.createElement("p",{className:(0,j.tremorTwMerge)(P("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});z.displayName="Switch",e.s(["Switch",0,z],793130)},439573,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=(0,a.cva)({base:"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}}),d=r.forwardRef(({className:e,variant:r,...d},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"alert",role:"alert",className:(0,a.cn)(o({variant:r}),e),...d}));d.displayName="Alert";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-title",className:(0,a.cn)("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...r}));l.displayName="AlertTitle";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r}));s.displayName="AlertDescription";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-action",className:(0,a.cn)("absolute top-2.5 right-3",e),...r}));i.displayName="AlertAction",e.s(["Alert",0,d,"AlertAction",0,i,"AlertDescription",0,s,"AlertTitle",0,l])},431343,e=>{"use strict";let t=(0,e.i(475254).default)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],431343)},569074,e=>{"use strict";let t=(0,e.i(475254).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],569074)},269638,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",0,t],269638)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0eamb3kk74kws.js b/litellm/proxy/_experimental/out/_next/static/chunks/0eamb3kk74kws.js
deleted file mode 100644
index 7e4d1f8aa3a..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0eamb3kk74kws.js
+++ /dev/null
@@ -1,7 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=r.forwardRef(({className:e,size:r="default",...i},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i}));i.displayName="Card";let n=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));o.displayName="CardTitle";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";let s=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));s.displayName="CardAction";let d=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,i,"CardAction",0,s,"CardContent",0,d,"CardDescription",0,l,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,o])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),i=e.i(519455),n=e.i(793479),o=e.i(624687);let l=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),s=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:n="ghost",size:o="xs",...l},d)=>(0,t.jsx)(i.Button,{ref:d,type:r,"data-size":o,variant:n,className:(0,a.cn)(s({size:o}),e),...l}));d.displayName="InputGroupButton";let c=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Input,{ref:i,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));c.displayName="InputGroupInput",r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(o.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(l({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,d,"InputGroupInput",0,c,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:i=0,side:n="bottom",sideOffset:o=4,className:l,...s}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:i,side:n,sideOffset:o,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...s})})})},"DropdownMenuItem",0,function({className:e,inset:i,variant:n="default",...o}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})},"DropdownMenuSeparator",0,function({className:e,...i}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...i})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,a,i=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),o=e.i(951437),l=e.i(146376),s=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let f=n.createContext(void 0);function p(){let e=n.useContext(f);if(void 0===e)throw Error((0,u.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),h={tabActivationDirection:e=>({[g.activationDirection]:e})};var m=e.i(675606),v=e.i(56434);let b=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:p="horizontal",render:g,value:b,style:y,...w}=e,k=void 0!==e.defaultValue,C=n.useRef([]),[j,E]=n.useState(()=>new Map),[R,_]=(0,o.useControlled)({controlled:b,default:a,name:"Tabs",state:"value"}),S=void 0!==b,[N,O]=n.useState(()=>new Map),A=n.useRef(void 0),T=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of N.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[N]),[I,z]=n.useState(()=>({previousValue:R,tabActivationDirection:"none"})),{previousValue:M,tabActivationDirection:D}=I,$=D,P=!1;M!==R&&($=x(M,R,p,N),P=null!=M&&null!=R&&null==T(R));let L=P?M:R,H=M!==L||D!==$;(0,l.useIsoLayoutEffect)(()=>{H&&z({previousValue:L,tabActivationDirection:$})},[L,H,$]);let q=(0,s.useStableCallback)((e,t)=>{t.activationDirection=x(R,e,p,N),u?.(e,t),t.isCanceled||_(e)}),U=(0,s.useStableCallback)((e,t)=>{u?.(e,(0,m.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),B=(0,s.useStableCallback)((e,t)=>{E(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),V=(0,s.useStableCallback)((e,t)=>{E(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),W=n.useCallback(e=>j.get(e),[j]),F=n.useCallback(e=>{for(let t of N.values())if(e===t?.value)return t?.id},[N]),K=n.useMemo(()=>({getTabElementBySelectedValue:T,getTabIdByPanelValue:F,getTabPanelIdByValue:W,onValueChange:q,orientation:p,registerMountedTabPanel:B,setTabMap:O,unregisterMountedTabPanel:V,tabActivationDirection:$,value:R}),[T,F,W,q,p,B,O,V,$,R]),G=n.useMemo(()=>{for(let e of N.values())if(null!=e&&e.value===R)return e},[N,R]),Y=n.useMemo(()=>{for(let e of N.values())if(null!=e&&!e.disabled)return e.value},[N]),J=n.useRef(!k),X=n.useRef(a),Q=n.useRef(k),Z=n.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(S)return;function e(e,t){_(e),z(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),U(e,t),J.current=!1}if(0===N.size){Z.current&&null!==R&&!A.current?.isConnected&&e(null,v.REASONS.missing);return}Z.current=!0,A.current=N.keys().next().value;let t=G?.disabled,r=null==G&&null!==R;if(t||R!==X.current||(Q.current=!1),Q.current&&t&&R===X.current)return;let a=J.current;if(t||r){let r=Y??null;if(R===r){J.current=!1;return}let i=v.REASONS.missing;a?i=v.REASONS.initial:t&&(i=v.REASONS.disabled),e(r,i);return}a&&null!=G&&(U(R,v.REASONS.initial),J.current=!1)},[Y,S,U,G,_,N,R]);let ee={orientation:p,tabActivationDirection:$},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:w,stateAttributesMapping:h});return(0,i.jsx)(f.Provider,{value:K,children:(0,i.jsx)(c.CompositeList,{elementsRef:C,children:et})})});function x(e,t,r,a){if(null==e||null==t)return"none";let i=null,n=null;for(let[r,o]of a.entries()){if(null==o)continue;let a=o.value??o.index;if(e===a&&(i=r),t===a&&(n=r),null!=i&&null!=n)break}if(null==i||null==n)return i!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let o=i.getBoundingClientRect(),l=n.getBoundingClientRect();if("horizontal"===r){if(l.lefto.left)return"right"}else{if(l.topo.top)return"down"}return"none"}var y=e.i(108868),w=e.i(788015),k=e.i(540886);let C="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,C],370359);var j=e.i(395530);let E=n.createContext(void 0);function R(){let e=n.useContext(E);if(void 0===e)throw Error((0,u.default)(65));return e}var _=e.i(647554);let S=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:i,value:o,id:s,nativeButton:c=!0,style:u,...f}=e,{value:g,getTabPanelIdByValue:b,orientation:x,tabActivationDirection:E}=p(),{activateOnFocus:S,highlightedTabIndex:N,onTabActivation:O,registerTabResizeObserverElement:A,setHighlightedTabIndex:T,tabsListElement:I}=R(),z=(0,w.useBaseUiId)(s),M=n.useMemo(()=>({disabled:a,id:z,value:o}),[a,z,o]),{compositeProps:D,compositeRef:$,index:P}=(0,j.useCompositeItem)({metadata:M}),L=o===g,H=n.useRef(!1),q=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=q.current;if(e)return A(e)},[A]),(0,l.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(L&&P>-1&&N!==P){if(null!=I){let e=(0,_.activeElement)((0,y.ownerDocument)(I));if(e&&(0,_.contains)(I,e))return}a||T(P)}},[L,P,N,T,a,I]);let{getButtonProps:U,buttonRef:B}=(0,k.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),V=b(o),W=n.useRef(!1),F=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:L,orientation:x,tabActivationDirection:E},ref:[t,B,$,q],props:[D,{role:"tab","aria-controls":V,"aria-selected":L,id:z,onClick:function(e){L||a||O(o,(0,m.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){L||(P>-1&&!a&&T(P),!a&&S&&(!W.current||W.current&&F.current)&&O(o,(0,m.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){L||a||(W.current=!0,e.button&&0!==e.button||(F.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){W.current=!1,F.current=!1},{once:!0})))},[C]:L?"":void 0,onKeyDownCapture(){H.current=!0}},f,U],stateAttributesMapping:h})});var N=e.i(73364),O=e.i(802239),A=e.i(956789);function T(){return A.NOOP}function I(){return!1}function z(){return!0}let M=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var D=e.i(172410);let $={...h,activeTabPosition:()=>null,activeTabSize:()=>null},P=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:o=!1,style:l,...s}=e,{nonce:c}=(0,D.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:f,tabActivationDirection:g,value:h}=p(),{tabsListElement:m,registerIndicatorUpdateListener:v}=R(),b=(0,O.useSyncExternalStore)(T,I,z),x=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>v(x),[v,x]);let y=0,w=0,k=0,C=0,j=0,E=0,_=!1;if(null!=h&&null!=m){let e=u(h);if(null!=e){_=!0;let{width:t,height:r}=(0,N.getCssDimensions)(e),{width:a,height:i}=(0,N.getCssDimensions)(m),n=e.getBoundingClientRect(),o=m.getBoundingClientRect(),l=a>0?o.width/a:1,s=i>0?o.height/i:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=n.left-o.left,t=n.top-o.top;y=e/l+m.scrollLeft-m.clientLeft,k=t/s+m.scrollTop-m.clientTop}else y=e.offsetLeft,k=e.offsetTop;j=t,E=r,w=m.scrollWidth-y-j,C=m.scrollHeight-k-E}}let S=_?{left:y,right:w,top:k,bottom:C}:null,A=_?{width:j,height:E}:null,P=_?{[M.activeTabLeft]:`${y}px`,[M.activeTabRight]:`${w}px`,[M.activeTabTop]:`${k}px`,[M.activeTabBottom]:`${C}px`,[M.activeTabWidth]:`${j}px`,[M.activeTabHeight]:`${E}px`}:void 0,L=_&&j>0&&E>0,H=(0,d.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:S,activeTabSize:A,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:P,hidden:!L},s,{suppressHydrationWarning:!0}],stateAttributesMapping:$});return null==h?null:(0,i.jsxs)(n.Fragment,{children:[H,b&&o&&(0,i.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var L=e.i(144394),H=e.i(209407),q=e.i(137584),U=e.i(223910),B=e.i(673553);let V=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),W={...h,...H.transitionStatusMapping},F=n.forwardRef(function(e,t){let{className:r,value:a,render:i,keepMounted:o=!1,style:s,...c}=e,{value:u,getTabIdByPanelValue:f,orientation:g,tabActivationDirection:h,registerMountedTabPanel:m,unregisterMountedTabPanel:v}=p(),b=(0,w.useBaseUiId)(),x=n.useMemo(()=>({id:b,value:a}),[b,a]),{ref:y,index:k}=(0,B.useCompositeListItem)({metadata:x}),C=a===u,{mounted:j,transitionStatus:E,setMounted:R}=(0,U.useTransitionStatus)(C),_=!j,S=f(a),N=n.useRef(null),O=(0,d.useRenderElement)("div",e,{state:{hidden:_,orientation:g,tabActivationDirection:h,transitionStatus:E},ref:[t,y,N],props:[{"aria-labelledby":S,hidden:_,id:b,role:"tabpanel",tabIndex:C?0:-1,inert:(0,L.inertValue)(!C),[V.index]:k},c],stateAttributesMapping:W});return((0,q.useOpenChangeComplete)({open:C,ref:N,onComplete(){C||R(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!_||o)&&null!=b)return m(a,b),()=>{v(a,b)}},[_,o,a,b,m,v]),o||j)?O:null});var K=e.i(590803),G=e.i(828918),Y=e.i(673327),J=e.i(621082);let X=[];var Q=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:o=A.EMPTY_ARRAY,props:u=A.EMPTY_ARRAY,state:f=A.EMPTY_OBJECT,stateAttributesMapping:p,highlightedIndex:g,onHighlightedIndexChange:h,orientation:m,grid:v,loopFocus:b,onLoop:x,enableHomeAndEndKeys:y,onMapChange:w,stopEventPropagation:k=!0,rootRef:j,disabledIndices:E,modifierKeys:R,highlightItemOnHover:S=!1,tag:N="div",...O}=e,{props:T,highlightedIndex:I,onHighlightedIndexChange:z,elementsRef:M,onMapChange:D,relayKeyboardEvent:$}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:i,direction:o,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:h=X}=e,[m,v]=n.useState(0),b=null!=a,x=n.useRef(null),y=(0,G.useMergedRefs)(x,u),w=n.useRef([]),k=n.useRef(!1),j=d??m,E=(0,s.useStableCallback)((e,t=!1)=>{if((c??v)(e),t){let t=w.current[e];(0,Y.scrollIntoViewIfNeeded)(x.current,t,o,r)}}),R=(0,s.useStableCallback)(e=>{if(0===e.size||k.current)return;k.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(C))??null,i=a?t.indexOf(a):-1;if(-1!==i)E(i);else if((0,J.isListIndexDisabled)(t,j,g)){let e=(0,J.findNonDisabledListIndex)(t,{disabledIndices:g});(0,J.isIndexOutOfListBounds)(t,e)||E(e)}(0,Y.scrollIntoViewIfNeeded)(x.current,a,o,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==g||null!=d||!k.current)return;let e=w.current;if((0,J.isListIndexDisabled)(e,j,g)){let t=(0,J.findNonDisabledListIndex)(e,{disabledIndices:g});(0,J.isIndexOutOfListBounds)(e,t)||E(t)}},[g,d,j,w,E]);let S=(0,s.useStableCallback)((e,t,r)=>i?i(e,t,r,w):r),N=(0,s.useStableCallback)(e=>{let n=f?Y.COMPOSITE_KEYS:Y.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of Y.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,h)||!x.current)return;let l="rtl"===o,s=l?Y.ARROW_LEFT:Y.ARROW_RIGHT,d={horizontal:s,vertical:Y.ARROW_DOWN,both:s}[r],c=l?Y.ARROW_RIGHT:Y.ARROW_LEFT,u={horizontal:c,vertical:Y.ARROW_UP,both:c}[r],m=(0,_.getTarget)(e.nativeEvent);if(null!=m&&(0,Y.isNativeInput)(m)&&!(0,K.isElementDisabled)(m)){let t=m.selectionStart,r=m.selectionEnd,a=m.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let v=j,y=(0,J.getMinListIndex)(w,g),k=(0,J.getMaxListIndex)(w,g);null!=a&&(v=a({disabledIndices:g,elementsRef:w,event:e,highlightedIndex:j,loopFocus:t,maxIndex:k,minIndex:y,onLoop:S,orientation:r,rtl:l}));let C={horizontal:[s],vertical:[Y.ARROW_DOWN],both:[s,Y.ARROW_DOWN]}[r],R={horizontal:[c],vertical:[Y.ARROW_UP],both:[c,Y.ARROW_UP]}[r],N=b?n:({horizontal:f?Y.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:Y.HORIZONTAL_KEYS,vertical:f?Y.VERTICAL_KEYS_WITH_EXTRA_KEYS:Y.VERTICAL_KEYS,both:n})[r];f&&(e.key===Y.HOME?v=y:e.key===Y.END&&(v=k)),v===j&&(C.includes(e.key)||R.includes(e.key))&&(t&&v===k&&C.includes(e.key)?(v=y,i&&(v=i(e,j,v,w))):t&&v===y&&R.includes(e.key)?(v=k,i&&(v=i(e,j,v,w))):v=(0,J.findNonDisabledListIndex)(w.current,{startingIndex:v,decrement:R.includes(e.key),disabledIndices:g})),v===j||(0,J.isIndexOutOfListBounds)(w.current,v)||(p&&e.stopPropagation(),N.has(e.key)&&e.preventDefault(),E(v,!0),queueMicrotask(()=>{w.current[v]?.focus()}))});return{props:{ref:y,onFocus(e){let t=x.current,r=(0,_.getTarget)(e.nativeEvent);t&&null!=r&&(0,Y.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:N},highlightedIndex:j,onHighlightedIndexChange:E,elementsRef:w,disabledIndices:g,onMapChange:R,relayKeyboardEvent:N}}({grid:v,loopFocus:b,onLoop:x,orientation:m,highlightedIndex:g,onHighlightedIndexChange:h,rootRef:j,stopEventPropagation:k,enableHomeAndEndKeys:y,direction:(0,Z.useDirection)(),disabledIndices:E,modifierKeys:R}),P=(0,d.useRenderElement)(N,e,{state:f,ref:o,props:[T,...u,O],stateAttributesMapping:p}),L=n.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:z,highlightItemOnHover:S,relayKeyboardEvent:$}),[I,z,S,$]);return(0,i.jsx)(Q.CompositeRootContext.Provider,{value:L,children:(0,i.jsx)(c.CompositeList,{elementsRef:M,onMapChange:e=>{w?.(e),D(e)},children:P})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:o=!0,render:d,style:c,...u}=e,{onValueChange:f,orientation:g,value:m,setTabMap:v,tabActivationDirection:b}=p(),[x,y]=n.useState(0),[w,k]=n.useState(null),C=n.useRef(new Set),j=n.useRef(new Set),R=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{C.current.forEach(e=>{e()})});return R.current=e,w&&e.observe(w),j.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),R.current=null}},[w]);let _=(0,s.useStableCallback)(e=>(C.current.add(e),()=>{C.current.delete(e)})),S=(0,s.useStableCallback)(e=>(j.current.add(e),R.current?.observe(e),()=>{j.current.delete(e),R.current?.unobserve(e)})),N=(0,s.useStableCallback)((e,t)=>{e!==m&&f(e,t)}),O=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:_,registerTabResizeObserverElement:S,onTabActivation:N,setHighlightedTabIndex:y,tabsListElement:w}),[r,x,_,S,N,y,w]);return(0,i.jsx)(E.Provider,{value:O,children:(0,i.jsx)(ee,{render:d,className:a,style:c,state:{orientation:g,tabActivationDirection:b},refs:[t,k],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:h,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:o,orientation:g,onHighlightedIndexChange:y,onMapChange:v,disabledIndices:A.EMPTY_ARRAY})})});e.s(["Indicator",0,P,"List",0,et,"Panel",0,F,"Root",0,b,"Tab",0,S],69281);var er=e.i(69281),er=er,ea=e.i(115504);let ei=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,i.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,i.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,i.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(ei({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,i.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["CheckCircleOutlined",0,n],245704)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),i=e.i(392221),n=e.i(703923),o=e.i(343794),l=e.i(914949),s=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,s.forwardRef)(function(e,c){var u=e.prefixCls,f=void 0===u?"rc-checkbox":u,p=e.className,g=e.style,h=e.checked,m=e.disabled,v=e.defaultChecked,b=e.type,x=void 0===b?"checkbox":b,y=e.title,w=e.onChange,k=(0,n.default)(e,d),C=(0,s.useRef)(null),j=(0,s.useRef)(null),E=(0,l.default)(void 0!==v&&v,{value:h}),R=(0,i.default)(E,2),_=R[0],S=R[1];(0,s.useImperativeHandle)(c,function(){return{focus:function(e){var t;null==(t=C.current)||t.focus(e)},blur:function(){var e;null==(e=C.current)||e.blur()},input:C.current,nativeElement:j.current}});var N=(0,o.default)(f,p,(0,a.default)((0,a.default)({},"".concat(f,"-checked"),_),"".concat(f,"-disabled"),m));return s.createElement("span",{className:N,title:y,style:g,ref:j},s.createElement("input",(0,t.default)({},k,{className:"".concat(f,"-input"),ref:C,onChange:function(t){m||("checked"in e||S(t.target.checked),null==w||w({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:m,checked:!!_,type:x})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,c],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=s.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),i=e.i(611935),n=e.i(121872),o=e.i(26905),l=e.i(242064),s=e.i(937328),d=e.i(321883),c=e.i(62139);let u=t.default.createContext(null);e.i(296059);var f=e.i(915654),p=e.i(183293),g=e.i(246422),h=e.i(838378);function m(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,p.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,f.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
- ${r}:not(${r}-disabled),
- ${t}:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
- ${r}-checked:not(${r}-disabled),
- ${t}-checked:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,h.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let v=(0,g.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[m(t,e)]);e.s(["default",0,v,"getStyle",0,m],236836);var b=e.i(681216),x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let y=t.forwardRef((e,f)=>{var p;let{prefixCls:g,className:h,rootClassName:m,children:y,indeterminate:w=!1,style:k,onMouseEnter:C,onMouseLeave:j,skipGroup:E=!1,disabled:R}=e,_=x(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:S,direction:N,checkbox:O}=t.useContext(l.ConfigContext),A=t.useContext(u),{isFormItemInput:T}=t.useContext(c.FormItemInputContext),I=t.useContext(s.default),z=null!=(p=(null==A?void 0:A.disabled)||R)?p:I,M=t.useRef(_.value),D=t.useRef(null),$=(0,i.composeRef)(f,D);t.useEffect(()=>{null==A||A.registerValue(_.value)},[]),t.useEffect(()=>{if(!E)return _.value!==M.current&&(null==A||A.cancelValue(M.current),null==A||A.registerValue(_.value),M.current=_.value),()=>null==A?void 0:A.cancelValue(_.value)},[_.value]),t.useEffect(()=>{var e;(null==(e=D.current)?void 0:e.input)&&(D.current.input.indeterminate=w)},[w]);let P=S("checkbox",g),L=(0,d.default)(P),[H,q,U]=v(P,L),B=Object.assign({},_);A&&!E&&(B.onChange=(...e)=>{_.onChange&&_.onChange.apply(_,e),A.toggleOption&&A.toggleOption({label:y,value:_.value})},B.name=A.name,B.checked=A.value.includes(_.value));let V=(0,r.default)(`${P}-wrapper`,{[`${P}-rtl`]:"rtl"===N,[`${P}-wrapper-checked`]:B.checked,[`${P}-wrapper-disabled`]:z,[`${P}-wrapper-in-form-item`]:T},null==O?void 0:O.className,h,m,U,L,q),W=(0,r.default)({[`${P}-indeterminate`]:w},o.TARGET_CLS,q),[F,K]=(0,b.default)(B.onClick);return H(t.createElement(n.default,{component:"Checkbox",disabled:z},t.createElement("label",{className:V,style:Object.assign(Object.assign({},null==O?void 0:O.style),k),onMouseEnter:C,onMouseLeave:j,onClick:F},t.createElement(a.default,Object.assign({},B,{onClick:K,prefixCls:P,className:W,disabled:z,ref:$})),null!=y&&t.createElement("span",{className:`${P}-label`},y))))});var w=e.i(8211),k=e.i(529681),C=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let j=t.forwardRef((e,a)=>{let{defaultValue:i,children:n,options:o=[],prefixCls:s,className:c,rootClassName:f,style:p,onChange:g}=e,h=C(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:m,direction:b}=t.useContext(l.ConfigContext),[x,j]=t.useState(h.value||i||[]),[E,R]=t.useState([]);t.useEffect(()=>{"value"in h&&j(h.value||[])},[h.value]);let _=t.useMemo(()=>o.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[o]),S=e=>{R(t=>t.filter(t=>t!==e))},N=e=>{R(t=>[].concat((0,w.default)(t),[e]))},O=e=>{let t=x.indexOf(e.value),r=(0,w.default)(x);-1===t?r.push(e.value):r.splice(t,1),"value"in h||j(r),null==g||g(r.filter(e=>E.includes(e)).sort((e,t)=>_.findIndex(t=>t.value===e)-_.findIndex(e=>e.value===t)))},A=m("checkbox",s),T=`${A}-group`,I=(0,d.default)(A),[z,M,D]=v(A,I),$=(0,k.default)(h,["value","disabled"]),P=o.length?_.map(e=>t.createElement(y,{prefixCls:A,key:e.value.toString(),disabled:"disabled"in e?e.disabled:h.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${T}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):n,L=t.useMemo(()=>({toggleOption:O,value:x,disabled:h.disabled,name:h.name,registerValue:N,cancelValue:S}),[O,x,h.disabled,h.name,N,S]),H=(0,r.default)(T,{[`${T}-rtl`]:"rtl"===b},c,f,D,I,M);return z(t.createElement("div",Object.assign({className:H,style:p},$,{ref:a}),t.createElement(u.Provider,{value:L},P)))});y.Group=j,y.__ANT_CHECKBOX=!0,e.s(["default",0,y],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ArrowLeftOutlined",0,n],447566)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},868499,e=>{"use strict";var t=e.i(843476);e.s([],558762),e.i(558762);var r=e.i(366250),a=e.i(402820),i=e.i(156736),n=e.i(209793),o=e.i(784324),l=e.i(264951),s=e.i(77173);let d=e.i(313488).DialogTrigger;var c=e.i(974217),u=e.i(325326),f=e.i(301807);let p={modal:!0,disablePointerDismissal:!0,role:"alertdialog"};class g extends u.DialogHandle{constructor(e){super(e??new f.DialogStore(p)),e&&this.store.update(p)}}e.s(["Backdrop",()=>a.DialogBackdrop,"Close",()=>i.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,g,"Popup",()=>o.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)(e,"alert-dialog")},"Title",()=>s.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new g}],734604);var h=e.i(734604),h=h,m=e.i(115504),v=e.i(519455);function b({...e}){return(0,t.jsx)(h.Portal,{"data-slot":"alert-dialog-portal",...e})}function x({className:e,...r}){return(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:(0,m.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...r})}e.s(["AlertDialog",0,function({...e}){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogAction",0,function({className:e,variant:r="default",size:a="default",...i}){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-action",className:(0,m.cn)(e),render:(0,t.jsx)(v.Button,{variant:r,size:a}),...i})},"AlertDialogCancel",0,function({className:e,variant:r="outline",size:a="default",...i}){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-cancel",className:(0,m.cn)(e),render:(0,t.jsx)(v.Button,{variant:r,size:a}),...i})},"AlertDialogContent",0,function({className:e,size:r="default",...a}){return(0,t.jsxs)(b,{children:[(0,t.jsx)(x,{}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content","data-size":r,className:(0,m.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,m.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,m.cn)("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})},"AlertDialogTrigger",0,function({...e}){return(0,t.jsx)(h.Trigger,{"data-slot":"alert-dialog-trigger",...e})}],868499)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},541202,e=>{"use strict";var t=e.i(843476),r=e.i(522016),a=e.i(560445);e.s(["DeprecationBanner",0,({featureName:e})=>(0,t.jsx)(a.Alert,{message:`${e} is on a draft deprecation list`,description:(0,t.jsxs)(t.Fragment,{children:[`${e} is one of several experimental features we're considering removing, potentially as early as September 1, 2026. This list is a draft and is not final. If you rely on this feature, please share feedback on the `,(0,t.jsx)(r.default,{href:"https://github.com/BerriAI/litellm/discussions/32090",target:"_blank",rel:"noopener noreferrer",children:"deprecation discussion"}),"."]}),type:"info",showIcon:!0,closable:!0,style:{marginBottom:16}})])},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["LinkOutlined",0,n],596239)},776639,e=>{"use strict";var t=e.i(843476),r=e.i(353753),a=e.i(115504),i=e.i(519455),n=e.i(995926);function o({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...i}){return(0,t.jsx)(r.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...i})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:s,showCloseButton:d=!0,...c}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(r.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[s,d&&(0,t.jsxs)(r.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(i.Button,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...i}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...i})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:o,...l}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...l,children:[o,n&&(0,t.jsx)(r.Dialog.Close,{render:(0,t.jsx)(i.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2",e),...r})},"DialogTitle",0,function({className:e,...i}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.cn)("leading-none font-medium",e),...i})}])},768371,e=>{"use strict";let t,r;var a=e.i(247167);let i=/\{[^{}]+\}/g;function n(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function o(e,t,r){if(!t||"object"!=typeof t)return"";let a=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)a.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let i=a.join(",");switch(r.style){case"form":return`${e}=${i}`;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return i}}for(let i in t){let o="deepObject"===r.style?`${e}[${i}]`:i;a.push(n(o,t[i],r))}let o=a.join(i);return"label"===r.style||"matrix"===r.style?`${i}${o}`:o}function l(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",i=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(a);switch(r.style){case"simple":return i;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return`${e}=${i}`}}let a={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(let a of t)"simple"===r.style||"label"===r.style?i.push(!0===r.allowReserved?a:encodeURIComponent(a)):i.push(n(e,a,r));return"label"===r.style||"matrix"===r.style?`${a}${i.join(a)}`:i.join(a)}function s(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let a in t){let i=t[a];if(null!=i){if(Array.isArray(i)){if(0===i.length)continue;r.push(l(a,i,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof i){r.push(o(a,i,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(n(a,i,e))}}return r.join("&")}}function d(e,t){let r=e;for(let a of e.match(i)??[]){let e=a.substring(1,a.length-1),i=!1,s="simple";if(e.endsWith("*")&&(i=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(s="label",e=e.substring(1)):e.startsWith(";")&&(s="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let d=t[e];if(Array.isArray(d)){r=r.replace(a,l(e,d,{style:s,explode:i}));continue}if("object"==typeof d){r=r.replace(a,o(e,d,{style:s,explode:i}));continue}if("matrix"===s){r=r.replace(a,`;${n(e,d)}`);continue}r=r.replace(a,"label"===s?`.${encodeURIComponent(d)}`:encodeURIComponent(d))}return r}function c(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function u(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,a]of r instanceof Headers?r.entries():Object.entries(r))if(null===a)t.delete(e);else if(Array.isArray(a))for(let r of a)t.append(e,r);else void 0!==a&&t.set(e,a);return t}function f(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var p=e.i(954616),g=e.i(621482),h=e.i(869230),m=e.i(469637),v=e.i(254440),b=e.i(266027),x=e.i(431703),y=e.i(97198);let w=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),k=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:i=globalThis.fetch,querySerializer:n,bodySerializer:o,pathSerializer:l,headers:p,requestInitExt:g,...h}={...e};g="object"==typeof a.default&&Number.parseInt(a.default?.versions?.node?.substring(0,2))>=18&&a.default.versions.undici?g:void 0,t=f(t);let m=[];async function v(e,a){var v,b;let x,y,w,k,C,{baseUrl:j,fetch:E=i,Request:R=r,headers:_,params:S={},parseAs:N="json",querySerializer:O,bodySerializer:A=o??c,pathSerializer:T,body:I,middleware:z=[],...M}=a||{},D=t;j&&(D=f(j)??t);let $="function"==typeof n?n:s(n);O&&($="function"==typeof O?O:s({..."object"==typeof n?n:{},...O}));let P=T||l||d,L=void 0===I?void 0:A(I,u(p,_,S.header)),H=u(void 0===L||L instanceof FormData?{}:{"Content-Type":"application/json"},p,_,S.header),q=[...m,...z],U={redirect:"follow",...h,...M,body:L,headers:H},B=new R((v=e,b={baseUrl:D,params:S,querySerializer:$,pathSerializer:P},x=`${b.baseUrl}${v}`,b.params?.path&&(x=b.pathSerializer(x,b.params.path)),(y=b.querySerializer(b.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(x+=`?${y}`),x),U);for(let e in M)e in B||(B[e]=M[e]);if(q.length){for(let t of(w=Math.random().toString(36).slice(2,11),k=Object.freeze({baseUrl:D,fetch:E,parseAs:N,querySerializer:$,bodySerializer:A,pathSerializer:P}),q))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:B,schemaPath:e,params:S,options:k,id:w});if(r)if(r instanceof R)B=r;else if(r instanceof Response){C=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!C){try{C=await E(B,g)}catch(r){let t=r;if(q.length)for(let r=q.length-1;r>=0;r--){let a=q[r];if(a&&"object"==typeof a&&"function"==typeof a.onError){let r=await a.onError({request:B,error:t,schemaPath:e,params:S,options:k,id:w});if(r){if(r instanceof Response){t=void 0,C=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(q.length)for(let t=q.length-1;t>=0;t--){let r=q[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:B,response:C,schemaPath:e,params:S,options:k,id:w});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");C=t}}}}let V=C.headers.get("Content-Length");if(204===C.status||"HEAD"===B.method||"0"===V&&!C.headers.get("Transfer-Encoding")?.includes("chunked"))return C.ok?{data:void 0,response:C}:{error:void 0,response:C};if(C.ok){let e=async()=>{if("stream"===N)return C.body;if("json"===N&&!V){let e=await C.text();return e?JSON.parse(e):void 0}return await C[N]()};return{data:await e(),response:C}}let W=await C.text();try{W=JSON.parse(W)}catch{}return{error:W,response:C}}return{request:(e,t,r)=>v(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>v(e,{...t,method:"GET"}),PUT:(e,t)=>v(e,{...t,method:"PUT"}),POST:(e,t)=>v(e,{...t,method:"POST"}),DELETE:(e,t)=>v(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>v(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>v(e,{...t,method:"HEAD"}),PATCH:(e,t)=>v(e,{...t,method:"PATCH"}),TRACE:(e,t)=>v(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");m.push(t)}},eject(...e){for(let t of e){let e=m.indexOf(t);-1!==e&&m.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});k.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await w(e,((e,t)=>{let{pathname:r,search:a}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${a}`})(e.url,t)):e,a=(0,y.getAuthToken)();return a&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${a}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),a=r;try{a=JSON.parse(r),t=(0,x.deriveErrorMessage)(a)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new x.ApiError(t,e.status,a)}});let C=(t=async({queryKey:[e,t,r],signal:a})=>{let i=k[e.toUpperCase()],{data:n,error:o,response:l}=await i(t,{signal:a,...r});if(o)throw o;return 204===l.status||"0"===l.headers.get("Content-Length")?n??null:n},{queryOptions:r=(e,r,...[a,i])=>({queryKey:void 0===a?[e,r]:[e,r,a],queryFn:t,...i}),useQuery:(e,t,...[a,i,n])=>(0,b.useQuery)(r(e,t,a,i),n),useSuspenseQuery:(e,t,...[a,i,n])=>{var o;return o=r(e,t,a,i),(0,m.useBaseQuery)({...o,enabled:!0,suspense:!0,throwOnError:v.defaultThrowOnError,placeholderData:void 0},h.QueryObserver,n)},useInfiniteQuery:(e,t,a,i,n)=>{let{pageParamName:o="cursor",...l}=i,{queryKey:s}=r(e,t,a);return(0,g.useInfiniteQuery)({queryKey:s,queryFn:async({queryKey:[e,t,r],pageParam:a=0,signal:i})=>{let n=k[e.toUpperCase()],l={...r,signal:i,params:{...r?.params||{},query:{...r?.params?.query,[o]:a}}},{data:s,error:d}=await n(t,l);if(d)throw d;return s},...l},n)},useMutation:(e,t,r,a)=>(0,p.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let a=k[e.toUpperCase()],{data:i,error:n}=await a(t,r);if(n)throw n;return i},...r},a)});e.s(["$api",0,C,"fetchClient",0,k],768371)},990681,e=>{e.q("/litellm-asset-prefix/_next/static/media/postgresql.0a2k5oak2hvw5.svg")},319023,e=>{"use strict";let t=(0,e.i(475254).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",0,t],319023)},123287,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},582458,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["default",0,t])},439573,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=(0,a.cva)({base:"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:r,...n},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert",role:"alert",className:(0,a.cn)(i({variant:r}),e),...n}));n.displayName="Alert";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"alert-title",className:(0,a.cn)("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...r}));o.displayName="AlertTitle";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r}));l.displayName="AlertDescription";let s=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"alert-action",className:(0,a.cn)("absolute top-2.5 right-3",e),...r}));s.displayName="AlertAction",e.s(["Alert",0,n,"AlertAction",0,s,"AlertDescription",0,l,"AlertTitle",0,o])},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["KeyOutlined",0,n],438957)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["SaveOutlined",0,n],987432)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["MinusCircleOutlined",0,n],564897)},286536,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["Eye",0,t],286536)},77705,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["EyeOff",0,t],77705)},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},292335,122520,165615,779129,280024,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",OAUTH2_TOKEN_EXCHANGE:"oauth2_token_exchange",AWS_SIGV4:"aws_sigv4",TRUE_PASSTHROUGH:"true_passthrough",OAUTH_DELEGATE:"oauth_delegate"},r=e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE,a={INTERACTIVE:"interactive",M2M:"m2m"},i=e=>{let t=e.credentials??{};return JSON.stringify({url:"string"==typeof e.url?e.url:null,spec_path:"string"==typeof e.spec_path?e.spec_path:null,auth_type:e.auth_type??null,oauth_flow_type:e.oauth_flow_type??null,client_id:t.client_id??null,client_secret:t.client_secret??null,scopes:t.scopes??null,upstream_resource:t.upstream_resource??null,issuer:e.issuer??null,authorization_url:e.authorization_url??null,token_url:e.token_url??null,registration_url:e.registration_url??null})},n=["client_id","client_secret"],o=["upstream_resource"],l=["access_token","refresh_token","expires_in","scope"],s=(e,t)=>{if(!e)return;let r=Object.fromEntries(t.filter(t=>"string"==typeof e[t]&&""!==e[t]).map(t=>[t,e[t]]));return Object.keys(r).length>0?r:void 0},d="client_credentials",c={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};e.s(["ADMIN_CONFIG_CREDENTIAL_KEYS",0,o,"AUTH_TYPE",0,t,"CLEARED_ON_INVALIDATION",0,["credentials"],"MCP_OAUTH2_FLOW_INTERACTIVE",0,"authorization_code","MCP_OAUTH2_FLOW_M2M",0,d,"OAUTH_FLOW",0,a,"TRANSPORT",0,c,"credentialAuthClass",0,e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE?"client_forwarded":e??null,"gatewayMintsClientFor",0,e=>e.auth_type===t.TRUE_PASSTHROUGH||e.auth_type===t.OAUTH_DELEGATE&&!e.dcr_bridge,"getMcpOAuthMode",0,function(e){return e.auth_type===t.OAUTH2_TOKEN_EXCHANGE?"token_exchange":e.auth_type!==t.OAUTH2?null:e.oauth2_flow===d?"m2m":e.delegate_auth_to_upstream?"passthrough":"authorization_code"},"getOAuthAuthorizationIdentity",0,i,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?c.SSE:t&&e!==c.STDIO?c.OPENAPI:e,"isClientForwardedTokenMode",0,r,"isHeldOAuthTokenStale",0,(e,t)=>void 0!==t&&i(e)!==t,"isUnsupportedOnGatewayConnect",0,e=>r(e)||e===t.OAUTH2_TOKEN_EXCHANGE,"oauth2FlowToFormValue",0,function(e){return e===d?a.M2M:e?a.INTERACTIVE:void 0},"preservedAdminCredentials",0,e=>s(e,[...n,...o]),"preservedDeclaredAppCredentials",0,e=>s(e,n),"withoutMintedTokenCredentials",0,e=>{if(!e)return;let t=Object.fromEntries(Object.entries(e).filter(([e])=>!l.includes(e)));return Object.keys(t).length>0?t:void 0}],292335);var u=e.i(271645),f=e.i(602869),p=e.i(727749);function g(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["extractErrorMessage",0,g],122520);let h=e=>{let t=new Uint8Array(e),r="";return t.forEach(e=>r+=String.fromCharCode(e)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},m=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),h(e.buffer)},v=async e=>{let t=new TextEncoder().encode(e);return h(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,v,"generateCodeVerifier",0,m],165615);var b=e.i(434166);let x=()=>{{let e=window.location.pathname||"",t=e.indexOf("/ui"),r=t>=0?e.slice(0,t+3).replace(/\/+$/,""):"";return`${window.location.origin}${r}/mcp/oauth/callback`}},y=(...e)=>{e.forEach(e=>{try{window.sessionStorage.removeItem(e)}catch(e){}})};e.s(["TOOLS_OAUTH_UI_STATE_KEY",0,"litellm-mcp-oauth-tools-state","buildCallbackUrl",0,x,"clearStorage",0,y],779129);let w="litellm-user-mcp-oauth-flow-state",k="litellm-user-mcp-oauth-result",C=(e,t)=>{(0,b.setSecureItem)(e,t)},j=e=>(0,b.getSecureItem)(e);e.s(["useUserMcpOAuthFlow",0,({accessToken:e,serverId:t,serverAlias:r,scopes:a,clientId:i,onSuccess:n})=>{let[o,l]=(0,u.useState)("idle"),[s,d]=(0,u.useState)(null),c=(0,u.useRef)(!1),h=(0,u.useCallback)(async()=>{try{let n;l("authorizing"),d(null);let o=i??void 0;if(!o)try{let a=await (0,f.registerMcpOAuthClient)(e,t,{client_name:r||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"});o=a?.client_id,n=a?.client_secret}catch(e){}let s=m(),c=await v(s),u=crypto.randomUUID(),p=x(),g=a?.filter(e=>e.trim()).join(" "),h=(0,f.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:o,redirectUri:p,state:u,codeChallenge:c,scope:g}),b={state:u,codeVerifier:s,serverId:t,redirectUri:p,clientId:o,clientSecret:n,scopes:a};C(w,JSON.stringify(b));let y=new URL(window.location.href);y.searchParams.set("mcpOauthReturn","apps"),C("litellm-mcp-oauth-return-url",y.toString()),window.location.href=h}catch(t){let e=g(t);d(e),l("error"),p.default.error(e)}},[e,t,r,a,i]),b=(0,u.useCallback)(async()=>{if(c.current)return;let r=j(k);if(!r)return;let a=j(w);if(!a)return;try{let e=JSON.parse(a);if(e.serverId&&e.serverId!==t)return}catch(e){}c.current=!0,y(k);let i=null,o=null;try{i=JSON.parse(r);let e=j(w);o=e?JSON.parse(e):null}catch(e){d("Failed to resume OAuth flow. Please retry."),l("error"),c.current=!1,y(w);return}try{if(!o?.state||!o.codeVerifier||!o.serverId)throw Error("OAuth session state was lost. Please retry.");if(!i?.state||i.state!==o.state)throw Error("OAuth state mismatch. Please retry.");if(i.error)throw Error(i.error_description||i.error);if(!i.code)throw Error("Authorization code missing in callback.");l("exchanging");let t=await (0,f.exchangeMcpOAuthToken)({serverId:o.serverId,code:i.code,clientId:o.clientId,clientSecret:o.clientSecret,codeVerifier:o.codeVerifier,redirectUri:o.redirectUri,accessToken:e});await (0,f.storeMCPOAuthUserCredential)(e,o.serverId,{access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,scopes:o.scopes}),l("success"),d(null),p.default.success("Connected successfully"),n()}catch(t){let e=g(t);d(e),l("error"),p.default.error(e)}finally{y(w),setTimeout(()=>{c.current=!1},1e3)}},[e,t,n]);return(0,u.useEffect)(()=>{b()},[b]),{startOAuthFlow:h,status:o,error:s}}],280024)},89128,e=>{"use strict";var t=e.i(582458);e.s(["TriangleAlert",()=>t.default])},284629,e=>{"use strict";let t={src:e.i(990681).default,width:64,height:64,blurWidth:0,blurHeight:0};e.s(["default",0,t])},849550,e=>{"use strict";let t=(0,e.i(475254).default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);e.s(["default",0,t])},440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},251854,e=>{"use strict";let t=(0,e.i(475254).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["default",0,t])},221345,e=>{"use strict";let t=(0,e.i(475254).default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);e.s(["Link",0,t],221345)},101048,e=>{"use strict";var t=e.i(123287);e.s(["CircleCheck",()=>t.default])},707621,e=>{"use strict";var t=e.i(361653);e.s(["CircleAlert",()=>t.default])},703330,e=>{e.q("/litellm-asset-prefix/_next/static/media/github.01qi6qit7j89y.svg")},924056,e=>{e.q("/litellm-asset-prefix/_next/static/media/slack.01ebucngfr3lq.svg")},806471,e=>{e.q("/litellm-asset-prefix/_next/static/media/notion.3ve1izxfth6xd.svg")},67456,e=>{e.q("/litellm-asset-prefix/_next/static/media/linear.0r-vgi7wxinhb.svg")},459465,e=>{e.q("/litellm-asset-prefix/_next/static/media/jira.266jkt8otu3z6.svg")},283873,e=>{e.q("/litellm-asset-prefix/_next/static/media/figma.3-gfkcs78xixl.svg")},88313,e=>{e.q("/litellm-asset-prefix/_next/static/media/gmail.2kxy7ehty9j4p.svg")},243999,e=>{e.q("/litellm-asset-prefix/_next/static/media/google_drive.0t6j-2z4psaod.svg")},798962,e=>{e.q("/litellm-asset-prefix/_next/static/media/stripe.3583qhnprkybz.svg")},762217,e=>{e.q("/litellm-asset-prefix/_next/static/media/shopify.25i2if4d3gr23.svg")},758618,e=>{e.q("/litellm-asset-prefix/_next/static/media/salesforce.20dxbd6cxoyl2.svg")},333191,e=>{e.q("/litellm-asset-prefix/_next/static/media/hubspot.21ls0k94wst4x.svg")},675865,e=>{e.q("/litellm-asset-prefix/_next/static/media/twilio.1vmsvt7mb88__.svg")},301873,e=>{e.q("/litellm-asset-prefix/_next/static/media/sentry.0i-7ujykfedjd.svg")},72982,e=>{e.q("/litellm-asset-prefix/_next/static/media/zapier.3q67ovovgk_25.svg")},521442,e=>{e.q("/litellm-asset-prefix/_next/static/media/gitlab.2a2utw-6akshk.svg")},756788,e=>{e.q("/litellm-asset-prefix/_next/static/media/mcp_logo.008pk5gd77gim.png")},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},266537,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ArrowRightOutlined",0,n],266537)},988846,181692,438100,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default],988846);let r=(0,e.i(475254).default)("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"}]]);e.s(["default",0,r],181692),e.s(["KeyIcon",0,r],438100)},302202,e=>{"use strict";var t=e.i(953651);e.s(["ServerIcon",()=>t.default])},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},758472,634831,e=>{"use strict";let t=(0,e.i(475254).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,t],758472);var r=e.i(546467);e.s(["ExternalLinkIcon",()=>r.default],634831)},611052,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(212931),i=e.i(311451),n=e.i(790848),o=e.i(888259),l=e.i(768371),s=e.i(431703),d=e.i(438957);e.i(247167);var c=e.i(931067);let u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};var f=e.i(9583),p=r.forwardRef(function(e,t){return r.createElement(f.default,(0,c.default)({},e,{ref:t,icon:u}))}),g=e.i(492030),h=e.i(266537),m=e.i(447566),v=e.i(149192),b=e.i(596239);e.s(["ByokCredentialModal",0,({server:e,open:c,onClose:u,onSuccess:f})=>{let[x,y]=(0,r.useState)(1),[w,k]=(0,r.useState)(""),[C,j]=(0,r.useState)(!0),[E,R]=(0,r.useState)(!1),_=e.alias||e.server_name||"Service",S=_.charAt(0).toUpperCase(),N=()=>{y(1),k(""),j(!0),R(!1),u()},O=async()=>{if(!w.trim())return void o.default.error("Please enter your API key");R(!0);try{await l.fetchClient.POST("/v1/mcp/server/{server_id}/user-credential",{params:{path:{server_id:e.server_id}},body:{credential:w.trim(),save:C}}),o.default.success(`Connected to ${_}`),f(e.server_id),N()}catch(e){o.default.error((e=>{if(e instanceof s.ApiError){let t=e.body?.detail?.error;if(t)return t}return e instanceof Error&&e.message?e.message:"Failed to connect"})(e))}finally{R(!1)}};return(0,t.jsx)(a.Modal,{open:c,onCancel:N,footer:null,width:480,closeIcon:null,className:"byok-modal",children:(0,t.jsxs)("div",{className:"relative p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[2===x?(0,t.jsxs)("button",{onClick:()=>y(1),className:"flex items-center gap-1 text-gray-500 hover:text-gray-800 text-sm",children:[(0,t.jsx)(m.ArrowLeftOutlined,{})," Back"]}):(0,t.jsx)("div",{}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${1===x?"bg-blue-500":"bg-gray-300"}`}),(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${2===x?"bg-blue-500":"bg-gray-300"}`})]}),(0,t.jsx)("button",{onClick:N,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)(v.CloseOutlined,{})})]}),1===x?(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-6",children:[(0,t.jsx)("div",{className:"w-14 h-14 rounded-xl bg-linear-to-br from-teal-400 to-cyan-600 flex items-center justify-center text-white font-bold text-xl shadow-sm",children:"L"}),(0,t.jsx)(h.ArrowRightOutlined,{className:"text-gray-400 text-lg"}),(0,t.jsx)("div",{className:"w-14 h-14 rounded-xl bg-linear-to-br from-blue-600 to-indigo-800 flex items-center justify-center text-white font-bold text-xl shadow-sm",children:S})]}),(0,t.jsxs)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:["Connect ",_]}),(0,t.jsxs)("p",{className:"text-gray-500 mb-6",children:["LiteLLM needs access to ",_," to complete your request."]}),(0,t.jsx)("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-0.5",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-500",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 4v16M16 4v16",stroke:"currentColor",strokeWidth:"2"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-gray-800 mb-1",children:"How it works"}),(0,t.jsxs)("p",{className:"text-gray-500 text-sm",children:["LiteLLM acts as a secure bridge. Your requests are routed through our MCP client directly to"," ",_,"'s API."]})]})]})}),e.byok_description&&e.byok_description.length>0&&(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-6",children:[(0,t.jsxs)("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-widest mb-3 flex items-center gap-2",children:[(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:"text-green-500",children:[(0,t.jsx)("path",{d:"M12 2L12 22M2 12L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2"})]}),"Requested Access"]}),(0,t.jsx)("ul",{className:"space-y-2",children:e.byok_description.map((e,r)=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-sm text-gray-700",children:[(0,t.jsx)(g.CheckOutlined,{className:"text-green-500 shrink-0"}),e]},r))})]}),(0,t.jsxs)("button",{onClick:()=>y(2),className:"w-full bg-gray-900 hover:bg-gray-700 text-white font-medium py-3 px-6 rounded-xl flex items-center justify-center gap-2 transition-colors",children:["Continue to Authentication ",(0,t.jsx)(h.ArrowRightOutlined,{})]}),(0,t.jsx)("button",{onClick:N,className:"mt-3 w-full text-gray-400 hover:text-gray-600 text-sm py-2",children:"Cancel"})]}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-blue-50 flex items-center justify-center mb-4",children:(0,t.jsx)(d.KeyOutlined,{className:"text-blue-400 text-xl"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Provide API Key"}),(0,t.jsxs)("p",{className:"text-gray-500 mb-6",children:["Enter your ",_," API key to authorize this connection."]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-800 mb-2",children:[_," API Key"]}),(0,t.jsx)(i.Input.Password,{placeholder:"Enter your API key",value:w,onChange:e=>k(e.target.value),size:"large",className:"rounded-lg"}),e.byok_api_key_help_url&&(0,t.jsxs)("a",{href:e.byok_api_key_help_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 text-sm mt-2 flex items-center gap-1",children:["Where do I find my API key? ",(0,t.jsx)(b.LinkOutlined,{})]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-500",children:(0,t.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z",fill:"currentColor"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"Save key for future use"})]}),(0,t.jsx)(n.Switch,{checked:C,onChange:j})]}),(0,t.jsxs)("div",{className:"bg-blue-50 rounded-xl p-4 flex items-start gap-3 mb-6",children:[(0,t.jsx)(p,{className:"text-blue-400 mt-0.5 shrink-0"}),(0,t.jsx)("p",{className:"text-sm text-blue-700",children:"Your key is stored securely and transmitted over HTTPS. It is never shared with third parties."})]}),(0,t.jsxs)("button",{onClick:O,disabled:E,className:"w-full bg-blue-500 hover:bg-blue-600 disabled:opacity-60 text-white font-medium py-3 px-6 rounded-xl flex items-center justify-center gap-2 transition-colors",children:[(0,t.jsx)(p,{}),"Connect & Authorize"]})]})]})})}],611052)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0euektnkbx78f.js b/litellm/proxy/_experimental/out/_next/static/chunks/0euektnkbx78f.js
deleted file mode 100644
index 54a8805d071..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0euektnkbx78f.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,539677,370410,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"};var r=e.i(9583),a=s.forwardRef(function(e,a){return s.createElement(r.default,(0,t.default)({},e,{ref:a,icon:l}))});e.s(["BranchesOutlined",0,a],539677);var i=e.i(602869),o=e.i(727749);let n=async(e,t,s,l)=>{try{let r;"complexity_router"===e.model_type?r={model_name:e.auto_router_name,litellm_params:{model:"auto_router/complexity_router",complexity_router_config:e.complexity_router_config,complexity_router_default_model:e.auto_router_default_model},model_info:{}}:(r={model_name:e.auto_router_name,litellm_params:{model:`auto_router/${e.auto_router_name}`,auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}},e.auto_router_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model)),e.team_id&&(r.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(r.model_info.access_groups=e.model_access_group),await (0,i.modelCreateCall)(t,r);let a="complexity_router"===e.model_type?"Auto Router":"Semantic Router";o.default.success(`Successfully created ${a}: ${e.auto_router_name}`),s.resetFields(),l&&l()}catch(e){console.error("Failed to add auto router:",e),o.default.fromBackend("Failed to add auto router: "+e)}};e.s(["handleAddAutoRouterSubmit",0,n],370410)},492881,491115,304720,155964,e=>{"use strict";var t=e.i(843476),s=e.i(955135),l=e.i(827252),r=e.i(646563),a=e.i(199133),i=e.i(464571),o=e.i(175712),n=e.i(362024),d=e.i(312361),c=e.i(21548),m=e.i(525720),u=e.i(311451),h=e.i(28651),p=e.i(770914),g=e.i(592968),x=e.i(898586),y=e.i(271645);let{Text:f}=x.Typography,{TextArea:j}=u.Input;e.s(["default",0,({modelInfo:e,value:u,onChange:_})=>{let[b,v]=(0,y.useState)([]),[w,S]=(0,y.useState)(!1),[C,T]=(0,y.useState)([]);(0,y.useEffect)(()=>{let e=u?.routes;if(e){let t=[];v(s=>e.map((e,l)=>{let r=s[l],a=r?.id||e.id||`route-${l}-${Date.now()}`;return t.push(a),{id:a,model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold??.5}})),T(t)}else v([]),T([])},[u]);let k=(e,t,s)=>{let l=b.map(l=>l.id===e?{...l,[t]:s}:l);v(l),N(l)},N=e=>{let t={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};_?.(t)},E=e.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(m.Flex,{justify:"space-between",align:"center",gap:"middle",style:{width:"100%",marginBottom:24},children:[(0,t.jsxs)(p.Space,{align:"center",children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Routes Configuration"}),(0,t.jsx)(g.Tooltip,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(i.Button,{type:"primary",icon:(0,t.jsx)(r.PlusOutlined,{}),onClick:()=>{let e=`route-${Date.now()}`,t=[...b,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];v(t),N(t),T(t=>[...t,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===b.length?(0,t.jsx)(o.Card,{children:(0,t.jsx)(c.Empty,{description:'No routes configured. Click "Add Route" to get started.'})}):(0,t.jsx)(n.Collapse,{activeKey:C,onChange:e=>T(Array.isArray(e)?e:[e].filter(Boolean)),style:{width:"100%"},items:b.map((e,r)=>({key:e.id,label:(0,t.jsxs)(f,{style:{fontSize:16},children:["Route ",r+1,": ",e.model||"Unnamed"]}),extra:(0,t.jsx)(i.Button,{type:"text",danger:!0,size:"small",icon:(0,t.jsx)(s.DeleteOutlined,{}),onClick:t=>{var s;let l;t.stopPropagation(),s=e.id,v(l=b.filter(e=>e.id!==s)),N(l),T(e=>e.filter(e=>e!==s))}}),children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(f,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,t.jsx)(a.Select,{value:e.model,onChange:t=>k(e.id,"model",t),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:E})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(f,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,t.jsx)(j,{value:e.description,onChange:t=>k(e.id,"description",t.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(f,{className:"text-sm font-medium",children:"Score Threshold"}),(0,t.jsx)(g.Tooltip,{title:"Minimum similarity score to route to this model (0-1)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(h.InputNumber,{value:e.score_threshold,onChange:t=>k(e.id,"score_threshold",t||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(f,{className:"text-sm font-medium",children:"Example Utterances"}),(0,t.jsx)(g.Tooltip,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(f,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,t.jsx)(a.Select,{mode:"tags",value:e.utterances,onChange:t=>k(e.id,"utterances",t),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]},e.id)}))}),(0,t.jsx)(d.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,t.jsx)(f,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,t.jsx)(i.Button,{type:"link",onClick:()=>S(!w),className:"text-blue-600 p-0",children:w?"Hide":"Show"})]}),w&&(0,t.jsx)(o.Card,{className:"bg-gray-50 w-full",children:(0,t.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:b.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})}],492881),e.s(["DEFAULT_ADAPTIVE_WEIGHTS",()=>q,"DEFAULT_CLASSIFIER_TIMEOUT_MS",()=>O,"DEFAULT_TIER_DISTANCE_PENALTY",()=>B,"default",()=>D],155964);var _=e.i(790848),b=e.i(91739),v=e.i(850627);let{Text:w}=x.Typography,S=({value:e,onChange:s})=>{let l=e.adaptive_weights??q,r=e.adaptive_eligible??"all",a=e.tier_distance_penalty??B;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(_.Switch,{checked:e.adaptive??!1,onChange:t=>{s({...e,adaptive:t,adaptive_weights:l,adaptive_eligible:r,tier_distance_penalty:a})}}),(0,t.jsx)(w,{strong:!0,children:"Enable adaptive bandit selection"})]}),(0,t.jsx)(w,{type:"secondary",style:{display:"block",fontSize:12},children:"When disabled, each request always uses the model assigned to its classified tier."}),(0,t.jsxs)(o.Card,{className:"bg-gray-50 mt-4",children:[(0,t.jsx)(w,{strong:!0,style:{display:"block",marginBottom:8},children:"How Adaptive Routing Works"}),(0,t.jsx)(w,{type:"secondary",style:{fontSize:13},children:"It learns from how each conversation actually goes: does the user have to rephrase or correct the model, does it get stuck repeating itself, does it run out of tool calls, does the user seem satisfied. Combined with cost, this live feedback shifts future routing toward the models that are actually working well, and improves as more conversations come in. Until there's enough feedback, it defaults to the classified tier's model."})]}),e.adaptive&&(0,t.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(w,{strong:!0,style:{display:"block",marginBottom:4},children:["Quality vs. Cost (",Math.round(100*l.quality),"% quality /"," ",Math.round(100*l.cost),"% cost)"]}),(0,t.jsx)(v.Slider,{min:0,max:100,value:Math.round(100*l.quality),onChange:t=>{let l=t/100;s({...e,adaptive_weights:{quality:l,cost:Math.round((1-l)*100)/100}})},tooltip:{formatter:e=>`${e}% quality / ${100-(e??0)}% cost`}}),(0,t.jsx)(w,{type:"secondary",style:{fontSize:12},children:"Higher quality weight favors more capable (pricier) models; higher cost weight favors cheaper models when the bandit has feedback to act on. Recommended: 30% quality / 70% cost split."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(w,{strong:!0,style:{display:"block",marginBottom:4},children:"Eligible Model Pool"}),(0,t.jsx)(b.Radio.Group,{value:r,onChange:t=>{var l;return l=t.target.value,void s({...e,adaptive_eligible:l})},className:"w-full",children:(0,t.jsxs)(p.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(b.Radio,{value:"all",children:[(0,t.jsx)(w,{strong:!0,children:"All tiers (soft floor)"})," ",(0,t.jsx)(w,{type:"secondary",children:"— router can pick across tiers, depending on the best fit for the prompt"})]}),(0,t.jsxs)(b.Radio,{value:"classified_tier",children:[(0,t.jsx)(w,{strong:!0,children:"Classified tier only"})," ",(0,t.jsx)(w,{type:"secondary",children:"— router can only pick models within tier"})]})]})})]}),"all"===r&&(0,t.jsxs)("div",{children:[(0,t.jsx)(w,{strong:!0,style:{display:"block",marginBottom:4},children:"Tier Distance Penalty"}),(0,t.jsx)(h.InputNumber,{value:a,onChange:t=>{s({...e,tier_distance_penalty:t??B})},min:0,step:.1,style:{width:"100%"}}),(0,t.jsx)(w,{type:"secondary",style:{fontSize:12},children:"Score penalty applied per tier-step away from the classified tier."})]})]})]})},{Text:C}=x.Typography,T=({value:e,onChange:s,modelOptions:r,customTechnicalKeywords:i,onCustomTechnicalKeywordsChange:n,showValidationErrors:d=!1})=>{let c=d&&"llm"===e.classifier_type&&!e.classifier_llm_config?.model;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.Radio.Group,{value:e.classifier_type,onChange:t=>{var l;return l=t.target.value,void s({...e,classifier_type:l,classifier_llm_config:"llm"===l?e.classifier_llm_config??{model:"",timeout_ms:O}:void 0})},className:"w-full",children:(0,t.jsxs)(p.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(b.Radio,{value:"heuristic",children:[(0,t.jsx)(C,{strong:!0,children:"Heuristic"})," ",(0,t.jsx)(C,{type:"secondary",children:"(default) — rule-based scoring, no API calls, <1ms latency"})]}),(0,t.jsxs)(b.Radio,{value:"llm",children:[(0,t.jsx)(C,{strong:!0,children:"LLM Classifier"})," ",(0,t.jsx)(C,{type:"secondary",children:"— use a model to decide the tier (e.g. a small/fast model)"})]})]})}),"llm"===e.classifier_type&&(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(C,{strong:!0,style:{display:"block",marginBottom:4},children:"Classifier Model"}),(0,t.jsx)(a.Select,{value:e.classifier_llm_config?.model||void 0,onChange:t=>{s({...e,classifier_llm_config:{model:t,timeout_ms:e.classifier_llm_config?.timeout_ms??O}})},placeholder:"Select the model that will classify request complexity",showSearch:!0,style:{width:"100%"},options:r,status:c?"error":void 0}),c&&(0,t.jsx)(C,{type:"danger",style:{fontSize:12},children:"A classifier model is required"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(C,{strong:!0,style:{display:"block",marginBottom:4},children:"Timeout (ms)"}),(0,t.jsx)(h.InputNumber,{value:e.classifier_llm_config?.timeout_ms??O,onChange:t=>{s({...e,classifier_llm_config:{model:e.classifier_llm_config?.model??"",timeout_ms:t??O}})},min:1,style:{width:"100%"}}),(0,t.jsx)(C,{type:"secondary",style:{fontSize:12},children:"Falls back to the heuristic scorer if the classifier call errors, times out, or returns an unparseable response."})]})]}),"heuristic"===e.classifier_type&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(C,{strong:!0,children:"Custom Technical Keywords"}),(0,t.jsx)(g.Tooltip,{title:"Domain-specific terms appended to the built-in technical keyword list. Prompts containing these terms score higher on the technical dimension and route to more capable models.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(C,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:"Optional: Add terms to the built-in list to improve classification accuracy on the technical dimension. (e.g., udp, kafka, terraform)."}),(0,t.jsx)(a.Select,{mode:"tags",value:i??[],onChange:e=>n?.(e),placeholder:"Type a keyword and press Enter, or paste a comma-separated list",tokenSeparators:[","],open:!1,suffixIcon:null,style:{width:"100%"},allowClear:!0})]}),(0,t.jsxs)(o.Card,{className:"bg-gray-50 mt-4",children:[(0,t.jsx)(C,{strong:!0,style:{display:"block",marginBottom:8},children:"How Classification Works"}),(0,t.jsx)(C,{type:"secondary",style:{fontSize:13},children:"The router scores each request across 7 dimensions: token count, code presence, reasoning markers, technical terms, simple indicators, multi-step patterns, and question complexity. The weighted score determines the tier:"}),(0,t.jsxs)("ul",{style:{marginTop:8,marginBottom:0,paddingLeft:20,fontSize:13,color:"rgba(0, 0, 0, 0.45)"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"SIMPLE"}),": Score < 0.15"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"MEDIUM"}),": Score 0.15 - 0.35"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"COMPLEX"}),": Score 0.35 - 0.60"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"REASONING"}),": Score > 0.60 (or 2+ reasoning markers)"]})]})]})]})},{Text:k}=x.Typography,N=({keywords:e,onChange:s})=>(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Escalation Keywords"}),(0,t.jsx)(g.Tooltip,{title:"Case-sensitive phrases a user can include in their message to force a bump to the next-higher complexity tier when they aren't happy with results. They can force a stronger model, but not choose which one.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(k,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:'Optional: when a user message contains one of these phrases, the request is bumped one tier higher than it would otherwise route to. Matching is case-sensitive, so "LITELLM ESCALATE" only fires on the exact, shouted form. Leave empty to disable.'}),(0,t.jsx)(a.Select,{mode:"tags",value:e,onChange:s,placeholder:"e.g., LITELLM ESCALATE",tokenSeparators:[","],open:!1,suffixIcon:null,style:{width:"100%"},allowClear:!0})]});e.s(["DEFAULT_ESCALATION_KEYWORDS",0,["LITELLM ESCALATE"],"default",0,N],491115);let{Text:E}=x.Typography,A=[{value:"SIMPLE",label:"Simple"},{value:"MEDIUM",label:"Medium"},{value:"COMPLEX",label:"Complex"},{value:"REASONING",label:"Reasoning"}],M=({rules:e,onChange:n})=>{let d=(t,s)=>{n(e.map(e=>e.id===t?{...e,...s}:e))};return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Keyword Tier Overrides"}),(0,t.jsx)(g.Tooltip,{title:"Match known terms and force the request straight to a chosen complexity tier, bypassing rule-based scoring.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(i.Button,{icon:(0,t.jsx)(r.PlusOutlined,{}),onClick:()=>{n([...e,{id:`${Date.now()}`,keywords:[],tier:"COMPLEX"}])},children:"Add keyword rule"})]}),(0,t.jsx)(E,{type:"secondary",style:{display:"block",marginBottom:16},children:'Optional: route requests containing specific keywords directly to a tier, e.g. route "invoice, refund, billing" to the medium tier.'}),0===e.length?(0,t.jsx)(o.Card,{className:"bg-gray-50",children:(0,t.jsx)(c.Empty,{image:c.Empty.PRESENTED_IMAGE_SIMPLE,description:"No keyword tier overrides configured"})}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map((l,r)=>(0,t.jsx)(o.Card,{size:"small",children:(0,t.jsxs)("div",{className:"flex items-end gap-3",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)(E,{strong:!0,style:{display:"block",marginBottom:8},children:["Keywords ",r+1]}),(0,t.jsx)(a.Select,{mode:"tags",value:l.keywords,onChange:e=>d(l.id,{keywords:e}),placeholder:"e.g., invoice, refund, billing",tokenSeparators:[","],open:!1,suffixIcon:null,style:{width:"100%"},allowClear:!0})]}),(0,t.jsxs)("div",{style:{width:220},children:[(0,t.jsx)(E,{strong:!0,style:{display:"block",marginBottom:8},children:"Route to tier"}),(0,t.jsx)(a.Select,{value:l.tier,onChange:e=>d(l.id,{tier:e}),options:A,style:{width:"100%"}})]}),(0,t.jsx)(i.Button,{danger:!0,type:"text",icon:(0,t.jsx)(s.DeleteOutlined,{}),"aria-label":`Remove keyword rule ${r+1}`,onClick:()=>{var t;return t=l.id,void n(e.filter(e=>e.id!==t))}})]})},l.id))})]})},{Text:R}=x.Typography,I=({enabled:e,onEnabledChange:s,embeddingModel:r,onEmbeddingModelChange:i,matchThreshold:o,onMatchThresholdChange:n,modelInfo:d,showValidationErrors:c=!1})=>{let m=Array.from(new Set(d.filter(e=>"embedding"===e.mode).map(e=>e.model_group))).map(e=>({value:e,label:e})),u=c&&!r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(R,{className:"font-medium",children:"Semantic keyword matching"}),(0,t.jsx)(g.Tooltip,{title:"Recognize related phrasing beyond exact keyword matches by comparing embeddings instead of plain text. Overrides direct keyword matching",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(R,{className:"text-gray-500 text-sm",children:"Uses same keyword-tier pairs as above and overrides direct keyword matching. Adds latency based on embedding model network request."})]}),(0,t.jsx)(_.Switch,{checked:e,onChange:s,"aria-label":"Semantic keyword matching"})]}),e&&(0,t.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 mt-4 pt-4 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{className:"text-sm font-medium mb-1 block",children:"Embedding model"}),(0,t.jsx)(a.Select,{value:r,onChange:i,placeholder:"Select an embedding model",showSearch:!0,style:{width:"100%"},options:m,status:u?"error":void 0}),u&&(0,t.jsx)(R,{type:"danger",style:{fontSize:12},children:"An embedding model is required"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{className:"text-sm font-medium mb-1 block",children:"Minimum match score"}),(0,t.jsx)(h.InputNumber,{value:o,onChange:e=>n(e??.5),min:0,max:1,step:.05,style:{width:"100%"}}),(0,t.jsx)(R,{className:"text-gray-500 text-xs mt-1 block",children:"Match only at or above this similarity score."})]})]})]})};e.s(["DEFAULT_MATCH_THRESHOLD",0,.5,"default",0,I],304720);let{Text:L}=x.Typography,O=3e3,B=.5,q={quality:.3,cost:.7},P={SIMPLE:{label:"Simple",description:"Basic questions, greetings, simple factual queries",examples:'"Hello!", "What is Python?", "Thanks!"'},MEDIUM:{label:"Medium",description:"Standard queries requiring some reasoning or explanation",examples:'"Explain how REST APIs work", "Debug this error"'},COMPLEX:{label:"Complex",description:"Technical, multi-part requests requiring deep knowledge",examples:'"Design a microservices architecture", "Implement a rate limiter"'},REASONING:{label:"Reasoning",description:"Chain-of-thought, analysis, explicit reasoning requests",examples:'"Think step by step...", "Analyze the pros and cons..."'}},D=({modelInfo:e,value:s,onChange:r,customTechnicalKeywords:i,onCustomTechnicalKeywordsChange:c,keywordTierRules:m=[],onKeywordTierRulesChange:u,semanticMatchingEnabled:h=!1,onSemanticMatchingEnabledChange:y,embeddingModel:f,onEmbeddingModelChange:j=()=>{},matchThreshold:b=.5,onMatchThresholdChange:v=()=>{},escalationKeywords:w=[],onEscalationKeywordsChange:C,showValidationErrors:k=!1})=>{let E=e.filter(e=>"embedding"!==e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(p.Space,{align:"center",style:{marginBottom:16},children:[(0,t.jsx)(x.Typography.Title,{level:4,style:{margin:0},children:"Complexity Tier Configuration"}),(0,t.jsx)(g.Tooltip,{title:"Map each complexity tier to one or more models. Simple queries use cheaper/faster models, complex queries use more capable models.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(L,{type:"secondary",style:{display:"block",marginBottom:24},children:"The complexity router automatically classifies requests by complexity using rule-based scoring (no API calls, <1ms latency). Configure which model(s) handle each tier."}),(0,t.jsx)(o.Card,{children:Object.keys(P).map((e,i)=>{let o=P[e],n=k&&0===s.tiers[e].length;return(0,t.jsxs)("div",{children:[i>0&&(0,t.jsx)(d.Divider,{style:{margin:"16px 0"}}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsxs)(L,{strong:!0,style:{fontSize:16},children:[o.label," Tier"]}),(0,t.jsx)(g.Tooltip,{title:o.description,children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)(L,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:["Examples: ",o.examples]}),(0,t.jsx)(a.Select,{mode:"multiple",value:s.tiers[e],onChange:t=>{r({...s,tiers:{...s.tiers,[e]:t}})},placeholder:`Select model(s) for ${o.label.toLowerCase()} queries`,showSearch:!0,style:{width:"100%"},options:E,status:n?"error":void 0}),s.tiers[e].length>1&&(0,t.jsx)(L,{type:"secondary",style:{fontSize:12},children:"Multiple models selected — the router randomly picks among them per request (or Thompson-samples within the pool when adaptive routing is on)."}),n&&(0,t.jsx)(L,{type:"danger",style:{fontSize:12},children:"This tier is required"})]})]},e)})}),(0,t.jsx)(d.Divider,{}),(0,t.jsx)(n.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"classifier",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Classification Method"}),children:(0,t.jsx)(T,{value:s,onChange:r,modelOptions:E,customTechnicalKeywords:i,onCustomTechnicalKeywordsChange:c,showValidationErrors:k})},{key:"adaptive",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Adaptive Routing"}),children:(0,t.jsx)(S,{value:s,onChange:r})},{key:"response",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Response Format"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(_.Switch,{checked:s.return_raw_model_name??!1,onChange:e=>r({...s,return_raw_model_name:e})}),(0,t.jsx)(L,{strong:!0,children:"Return raw model name"})]}),(0,t.jsx)(L,{type:"secondary",style:{display:"block",fontSize:12},children:"Return the resolved underlying model name in responses instead of the autorouter alias."})]})},...C?[{key:"escalation",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Escalation Keywords"}),children:(0,t.jsx)(N,{keywords:w,onChange:C})}]:[],...u||y?[{key:"keyword-semantic",label:(0,t.jsx)(L,{strong:!0,style:{color:"#374151"},children:"Advanced: Keyword/Semantic Matching"}),children:(0,t.jsxs)(t.Fragment,{children:[u&&(0,t.jsx)(M,{rules:m,onChange:u}),u&&y&&(0,t.jsx)(d.Divider,{style:{margin:"16px 0"}}),y&&(0,t.jsx)(I,{enabled:h,onEnabledChange:y,embeddingModel:f,onEmbeddingModelChange:j,matchThreshold:b,onMatchThresholdChange:v,modelInfo:e,showValidationErrors:k})]})}]:[]]})]})}},848573,e=>{"use strict";let t=["SIMPLE","MEDIUM","COMPLEX","REASONING"];e.s(["buildComplexityRouterConfig",0,({tiers:e,classifierType:t,classifierLlmConfig:s,customTechnicalKeywords:l,keywordTierRules:r,semanticMatchingEnabled:a,embeddingModel:i,matchThreshold:o,escalationKeywords:n,adaptive:d,adaptiveWeights:c,tierDistancePenalty:m,adaptiveEligible:u,returnRawModelName:h})=>{let p=n.map(e=>e.trim()).filter(Boolean),g=r.map(e=>({keywords:e.keywords.map(e=>e.trim()).filter(Boolean),tier:e.tier})).filter(e=>e.keywords.length>0);return{tiers:e,classifier_type:t,..."llm"===t&&s&&{classifier_llm_config:s},...l.length>0&&{custom_technical_keywords:l},...g.length>0&&{keyword_tier_rules:g},escalation_keywords:p,...a&&{semantic_keyword_matching:!0,embedding_model:i,match_threshold:o},...d&&{adaptive:!0,adaptive_weights:c,..."all"===u&&{tier_distance_penalty:m},adaptive_eligible:u},...h&&{return_raw_model_name:!0}}},"getMissingTiersError",0,e=>{let s=t.filter(t=>0===e[t].length);return 0===s.length?null:`Select a model for the following tier(s): ${s.join(", ")}`},"getSemanticConfigError",0,({semanticMatchingEnabled:e,embeddingModel:t,keywordTierRules:s})=>e?t?0===s.length?"Add at least one keyword tier rule to use semantic keyword matching":s.some(e=>!e.keywords.some(e=>e.trim()))?"Every keyword tier rule needs at least one keyword":null:"Select an embedding model to use semantic keyword matching":null])},120566,e=>{"use strict";let t=["SIMPLE","MEDIUM","COMPLEX","REASONING"];e.s(["buildAutoRouterTestTargets",0,({tiers:e,semanticMatchingEnabled:s,embeddingModel:l})=>[...Object.entries(t.reduce((t,s)=>(e[s]??[]).reduce((e,t)=>{let l=t?.trim();return l?{...e,[l]:[...e[l]??[],s]}:e},t),{})).map(([e,t])=>({labels:t,modelGroup:e,mode:"chat"})),...s&&l?.trim()?[{labels:["Embedding"],modelGroup:l.trim(),mode:"embedding"}]:[]]])},838748,e=>{"use strict";e.s(["getSemanticRouterError",0,({defaultModel:e,embeddingModel:t,routerConfig:s})=>e?s?.routes&&0!==s.routes.length?t?s.routes.some(e=>!e.name||!e.description||(e.utterances?.length??0)===0)?"Please ensure all routes have a target model, description, and at least one utterance":null:"Please select an Embedding Model":"Please configure at least one route for the auto router":"Please select a Default Model"])},165776,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(898586);e.i(247167);var r=e.i(931067);let a={icon:function(e,t){return{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",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm193.4 225.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 5 25.9 13.3l71.2 98.8 157.2-218c6-8.4 15.7-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.4 12.7z",fill:t}},{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",fill:e}}]}},name:"check-circle",theme:"twotone"};var i=e.i(9583),o=s.forwardRef(function(e,t){return s.createElement(i.default,(0,r.default)({},e,{ref:t,icon:a}))});let n={icon:function(e,t){return{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",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.2 0 4.5-3.6 8-8 8l-66-.3-99.3-118.4-99.3 118.5-66.1.3c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2L471 512.3l-130.1-155a8.32 8.32 0 01-1.9-5.2c0-4.5 3.6-8 8-8l66.1.3 99.3 118.4 99.4-118.5 66-.3c4.4 0 8 3.6 8 8 0 1.9-.6 3.8-1.8 5.2l-130.1 155 129.9 154.9z",fill:t}},{tag:"path",attrs:{d:"M685.8 352c0-4.4-3.6-8-8-8l-66 .3-99.4 118.5-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155-130.1 154.9a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3 99.3-118.5L611.7 680l66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.9 512.2l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z",fill:e}}]}},name:"close-circle",theme:"twotone"};var d=s.forwardRef(function(e,t){return s.createElement(i.default,(0,r.default)({},e,{ref:t,icon:n}))}),c=e.i(56456),m=e.i(602869);let{Text:u}=l.Typography;e.s(["default",0,({accessToken:e,targets:l,onTestComplete:r})=>{let[a,i]=s.default.useState(()=>l.map(()=>({status:"pending"})));return(s.default.useEffect(()=>{let t=!1;return(async()=>{await Promise.all(l.map(async(s,l)=>{let r=await (0,m.testModelGroupConnection)(e,s.modelGroup,s.mode);if(t)return;let a="error"===r.status?{status:"error",error:r.error.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,"")}:r;i(e=>e.map((e,t)=>t===l?a:e))})),!t&&r&&r()})(),()=>{t=!0}},[]),0===l.length)?(0,t.jsx)(u,{type:"secondary",children:"No complexity tiers are configured yet, so there is nothing to test."}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(u,{type:"secondary",style:{display:"block",marginBottom:8},children:"Each configured tier routes to a saved model group. Test Connection sends a minimal request through the proxy to each one, exactly as the auto router would."}),l.map((e,s)=>{let l=a[s]??{status:"pending"};return(0,t.jsxs)("div",{"data-testid":"auto-router-test-row",style:{border:"1px solid #e5e7eb",borderRadius:8,padding:"12px 16px",display:"flex",alignItems:"flex-start",gap:12},children:[(0,t.jsxs)("div",{style:{fontSize:18,lineHeight:"24px"},children:["pending"===l.status&&(0,t.jsx)(c.LoadingOutlined,{"data-testid":"test-status-pending"}),"success"===l.status&&(0,t.jsx)(o,{twoToneColor:"#52c41a","data-testid":"test-status-success"}),"error"===l.status&&(0,t.jsx)(d,{twoToneColor:"#ff4d4f","data-testid":"test-status-error"})]}),(0,t.jsxs)("div",{style:{flex:1},children:[(0,t.jsx)(u,{strong:!0,children:e.labels.join(", ")})," ",(0,t.jsxs)(u,{type:"secondary",children:["->"," ",e.modelGroup,"embedding"===e.mode?" (embedding)":""]}),"error"===l.status&&(0,t.jsx)(u,{type:"danger","data-testid":"test-error-message",style:{display:"block",marginTop:4,fontSize:13},children:l.error})]})]},`${e.modelGroup}-${e.mode}`)})]})}],165776)},69509,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(175712),r=e.i(808613),a=e.i(464571),i=e.i(592968),o=e.i(898586),n=e.i(199133),d=e.i(91739),c=e.i(906579),m=e.i(770914),u=e.i(212931),h=e.i(962944),p=e.i(539677),g=e.i(599724),x=e.i(779241),y=e.i(602869),f=e.i(708347),j=e.i(370410),_=e.i(695411),b=e.i(492881),v=e.i(155964),w=e.i(491115),S=e.i(304720),C=e.i(848573),T=e.i(120566),k=e.i(838748),N=e.i(165776),E=e.i(727749);let{Title:A}=o.Typography;e.s(["default",0,({form:e,handleOk:M,accessToken:R,userRole:I})=>{let[L,O]=(0,s.useState)([]),[B,q]=(0,s.useState)([]),[P,D]=(0,s.useState)("recommended"),[F,z]=(0,s.useState)({tiers:{SIMPLE:[],MEDIUM:[],COMPLEX:[],REASONING:[]},classifier_type:"heuristic"}),[U,G]=(0,s.useState)([]),[H,K]=(0,s.useState)([]),[V,$]=(0,s.useState)(!1),[W,X]=(0,s.useState)(void 0),[Y,J]=(0,s.useState)(S.DEFAULT_MATCH_THRESHOLD),[Q,Z]=(0,s.useState)(w.DEFAULT_ESCALATION_KEYWORDS),[ee,et]=(0,s.useState)(!1),[es,el]=(0,s.useState)(null),[er,ea]=(0,s.useState)(!1),[ei,eo]=(0,s.useState)(!1),[en,ed]=(0,s.useState)(0),[ec,em]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{O((await (0,y.modelAvailableCall)(R,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[R]),(0,s.useEffect)(()=>{(async()=>{try{let e=await (0,_.fetchAvailableModels)(R);q(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[R]);let eu=f.all_admin_roles.includes(I),eh=Array.from(new Set(B.map(e=>e.model_group))).map(e=>({value:e,label:e})),ep=()=>{let t=e.getFieldValue("auto_router_name");if(!t){et(!0),e.validateFields(["auto_router_name"]).catch(()=>void 0),E.default.fromBackend("Please enter an Auto Router Name");return}if("recommended"===P)(t=>{let{tiers:s,classifier_type:l,classifier_llm_config:r,adaptive:a=!1,adaptive_weights:i=v.DEFAULT_ADAPTIVE_WEIGHTS,tier_distance_penalty:o=v.DEFAULT_TIER_DISTANCE_PENALTY,adaptive_eligible:n="all",return_raw_model_name:d=!1}=F,c=(0,C.getMissingTiersError)(s);if(c){et(!0),E.default.fromBackend(c);return}if("llm"===l&&!r?.model){et(!0),E.default.fromBackend("Please select a classifier model, or switch back to Heuristic");return}let m=(0,C.getSemanticConfigError)({semanticMatchingEnabled:V,embeddingModel:W,keywordTierRules:H});if(m){et(!0),E.default.fromBackend(m);return}let u=s.MEDIUM[0]||s.SIMPLE[0]||s.COMPLEX[0]||s.REASONING[0];e.setFieldsValue({custom_llm_provider:"auto_router",model:t,api_key:"not_required_for_auto_router",auto_router_default_model:u}),e.validateFields(["auto_router_name"]).then(c=>{let m={...c,auto_router_name:t,auto_router_default_model:u,model_type:"complexity_router",complexity_router_config:(0,C.buildComplexityRouterConfig)({tiers:s,classifierType:l,classifierLlmConfig:r,customTechnicalKeywords:U,keywordTierRules:H,semanticMatchingEnabled:V,embeddingModel:W,matchThreshold:Y,escalationKeywords:Q,adaptive:a,adaptiveWeights:i,tierDistancePenalty:o,adaptiveEligible:n,returnRawModelName:d}),model_access_group:e.getFieldValue("model_access_group")};(0,j.handleAddAutoRouterSubmit)(m,R,e,M)}).catch(e=>{console.error("Validation failed:",e),E.default.fromBackend("Please fill in all required fields")})})(t);else{let s;(s=(0,k.getSemanticRouterError)({defaultModel:e.getFieldValue("auto_router_default_model"),embeddingModel:e.getFieldValue("auto_router_embedding_model"),routerConfig:es}))?E.default.fromBackend(s):(e.setFieldsValue({custom_llm_provider:"auto_router",model:t,api_key:"not_required_for_auto_router"}),e.validateFields().then(s=>{let l={...s,auto_router_name:t,auto_router_config:es,model_type:"semantic_router"};(0,j.handleAddAutoRouterSubmit)(l,R,e,M)}).catch(e=>{console.error("Validation failed:",e),E.default.fromBackend("Please fill in all required fields")}))}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{level:2,children:"Add Auto Router"}),(0,t.jsx)(g.Text,{className:"text-gray-600 mb-6",children:"Create an auto router that automatically selects the best model based on request complexity or semantic matching. Use in place of a single default model."}),(0,t.jsx)(l.Card,{className:"mb-4",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium mb-2 block",children:"Router Type"}),(0,t.jsx)(d.Radio.Group,{value:P,onChange:e=>{D(e.target.value),et(!1)},className:"w-full",children:(0,t.jsxs)(m.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(d.Radio,{value:"recommended",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.ThunderboltOutlined,{className:"text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Auto-Router v2"}),(0,t.jsx)(c.Badge,{count:"Recommended",style:{backgroundColor:"#52c41a",fontSize:"10px",padding:"0 6px"}})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes by request complexity across four tiers, with optional keyword-to-tier overrides and semantic keyword matching. No training data needed."})]}),(0,t.jsxs)(d.Radio,{value:"semantic",className:"w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.BranchesOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Semantic Router [to be deprecated]"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes based on semantic similarity to example utterances. Requires an embedding model and example utterances."})]})]})})]})}),(0,t.jsx)(l.Card,{children:(0,t.jsxs)(r.Form,{form:e,onFinish:ep,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(r.Form.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(x.TextInput,{placeholder:"e.g., smart_router, auto_router_1"})}),"recommended"===P?(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(v.default,{modelInfo:B,value:F,onChange:z,customTechnicalKeywords:U,onCustomTechnicalKeywordsChange:G,keywordTierRules:H,onKeywordTierRulesChange:K,semanticMatchingEnabled:V,onSemanticMatchingEnabledChange:$,embeddingModel:W,onEmbeddingModelChange:X,matchThreshold:Y,onMatchThresholdChange:J,escalationKeywords:Q,onEscalationKeywordsChange:Z,showValidationErrors:ee})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(b.default,{modelInfo:B,value:es,onChange:t=>{el(t),e.setFieldValue("auto_router_config",t)}})}),(0,t.jsx)(r.Form.Item,{rules:[{required:!0,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(n.Select,{placeholder:"Select a default model",options:eh,style:{width:"100%"},showSearch:!0})}),(0,t.jsx)(r.Form.Item,{rules:[{required:!0,message:"Embedding model is required"}],label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(n.Select,{placeholder:"Select an embedding model",options:eh,style:{width:"100%"},showSearch:!0})})]}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,t.jsx)("div",{className:"grow border-t border-gray-200"})]}),eu&&(0,t.jsx)(r.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,t.jsx)(n.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:L.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(i.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(o.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:["recommended"===P&&(0,t.jsx)(a.Button,{"data-testid":"auto-router-test-connect-btn",onClick:()=>{let e=(0,T.buildAutoRouterTestTargets)({tiers:F.tiers,semanticMatchingEnabled:V,embeddingModel:W});0===e.length?E.default.fromBackend("Please select at least one model for a complexity tier"):(em(e),ed(e=>e+1),eo(!0),ea(!0))},loading:ei,children:"Test Connection"}),(0,t.jsx)(a.Button,{type:"primary",onClick:()=>{ep()},children:"Add Auto Router"})]})]})]})}),(0,t.jsx)(u.Modal,{title:"Connection Test Results",open:er,onCancel:()=>{ea(!1),eo(!1)},footer:[(0,t.jsx)(a.Button,{onClick:()=>{ea(!1),eo(!1)},children:"Close"},"close")],width:700,children:er&&(0,t.jsx)(N.default,{accessToken:R,targets:ec,onTestComplete:()=>eo(!1)},en)})]})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0f_bhylcfohcm.js b/litellm/proxy/_experimental/out/_next/static/chunks/0f_bhylcfohcm.js
deleted file mode 100644
index b654e26791c..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0f_bhylcfohcm.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731),a=e.i(95779),n=e.i(444755),s=e.i(673706);let l=(0,s.makeClassName)("Card"),i=r.default.forwardRef((e,i)=>{let{decoration:c="",decorationColor:d,children:u,className:m}=e,f=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,n.tremorTwMerge)(l("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,s.getColorClassNames)(d,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case o.HorizontalPositions.Left:return"border-l-4";case o.VerticalPositions.Top:return"border-t-4";case o.HorizontalPositions.Right:return"border-r-4";case o.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),m)},f),u)});i.displayName="Card",e.s(["Card",0,i],304967)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),o=e.i(271645);let a=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:a[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,l=(e,t,r,o,a)=>{clearTimeout(o.current);let s=n(e);t(s),r.current=s,a&&a({current:s})};var i=e.i(480731),c=e.i(444755),d=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return o.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),o.default.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var m=e.i(95779);let f={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},g=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,d.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,c.tremorTwMerge)((0,d.getColorClassNames)(t,m.colorPalette.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,d.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:a,needMargin:n,transitionStatus:s})=>{let l=n?r===i.HorizontalPositions.Left?(0,c.tremorTwMerge)("-ml-1","mr-1.5"):(0,c.tremorTwMerge)("-mr-1","ml-1.5"):"",d=(0,c.tremorTwMerge)("w-0 h-0"),m={default:d,entering:d,entered:t,exiting:t,exited:d};return e?o.default.createElement(u,{className:(0,c.tremorTwMerge)(p("icon"),"animate-spin shrink-0",l,m.default,m[s]),style:{transition:"width 150ms"}}):o.default.createElement(a,{className:(0,c.tremorTwMerge)(p("icon"),"shrink-0",t,l)})},h=o.default.forwardRef((e,a)=>{let{icon:u,iconPosition:m=i.HorizontalPositions.Left,size:h=i.Sizes.SM,color:x,variant:v="primary",disabled:C,loading:y=!1,loadingText:k,children:w,tooltip:E,className:T}=e,N=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),S=y||C,P=void 0!==u||y,$=y&&k,I=!(!w&&!$),M=(0,c.tremorTwMerge)(f[h].height,f[h].width),R="light"!==v?(0,c.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",F=g(v,x),O=("light"!==v?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}})[h],{tooltipProps:B,getReferenceProps:A}=(0,r.useTooltip)(300),[j,D]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:a,timeout:i,initialEntered:c,mountOnEnter:d,unmountOnExit:u,onStateChange:m}={})=>{let[f,g]=(0,o.useState)(()=>n(c?2:s(d))),p=(0,o.useRef)(f),b=(0,o.useRef)(0),[h,x]="object"==typeof i?[i.enter,i.exit]:[i,i],v=(0,o.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(t)}})(p.current._s,u);e&&l(e,g,p,b,m)},[m,u]);return[f,(0,o.useCallback)(o=>{let n=e=>{switch(l(e,g,p,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(v,h));break;case 4:x>=0&&(b.current=((...e)=>setTimeout(...e))(v,x));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},i=p.current.isEnter;"boolean"!=typeof o&&(o=!i),o?i||n(e?+!r:2):i&&n(t?a?3:4:s(u))},[v,m,e,t,r,a,h,x,u]),v]})({timeout:50});return(0,o.useEffect)(()=>{D(y)},[y]),o.default.createElement("button",Object.assign({ref:(0,d.mergeRefs)([a,B.refs.setReference]),className:(0,c.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,O.paddingX,O.paddingY,O.fontSize,F.textColor,F.bgColor,F.borderColor,F.hoverBorderColor,S?"opacity-50 cursor-not-allowed":(0,c.tremorTwMerge)(g(v,x).hoverTextColor,g(v,x).hoverBgColor,g(v,x).hoverBorderColor),T),disabled:S},A,N),o.default.createElement(r.default,Object.assign({text:E},B)),P&&m!==i.HorizontalPositions.Right?o.default.createElement(b,{loading:y,iconSize:M,iconPosition:m,Icon:u,transitionStatus:j.status,needMargin:I}):null,$||w?o.default.createElement("span",{className:(0,c.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},$?k:w):null,P&&m===i.HorizontalPositions.Right?o.default.createElement(b,{loading:y,iconSize:M,iconPosition:m,Icon:u,transitionStatus:j.status,needMargin:I}):null)});h.displayName="Button",e.s(["Button",0,h],994388)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},95779,e=>{"use strict";var t=e.i(480731);t.BaseColors.Blue,t.BaseColors.Cyan,t.BaseColors.Sky,t.BaseColors.Indigo,t.BaseColors.Violet,t.BaseColors.Purple,t.BaseColors.Fuchsia,t.BaseColors.Slate,t.BaseColors.Gray,t.BaseColors.Zinc,t.BaseColors.Neutral,t.BaseColors.Stone,t.BaseColors.Red,t.BaseColors.Orange,t.BaseColors.Amber,t.BaseColors.Yellow,t.BaseColors.Lime,t.BaseColors.Green,t.BaseColors.Emerald,t.BaseColors.Teal,t.BaseColors.Pink,t.BaseColors.Rose,e.s(["colorPalette",0,{canvasBackground:50,lightBackground:100,background:500,darkBackground:600,darkestBackground:800,lightBorder:200,border:500,darkBorder:700,lightRing:200,ring:300,iconRing:500,lightText:400,text:500,iconText:600,darkText:700,darkestText:900,icon:500}])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),o=e.i(673706),a=e.i(271645);let n=a.default.forwardRef((e,n)=>{let{color:s,className:l,children:i}=e;return a.default.createElement("p",{ref:n,className:(0,r.tremorTwMerge)("text-tremor-default",s?(0,o.getColorClassNames)(s,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},i)});n.displayName="Text",e.s(["default",0,n],936325),e.s(["Text",0,n],599724)},553521,e=>{"use strict";var t=e.i(271645),r=e.i(835696);e.s(["useIsMounted",0,function(){let e=(0,t.useRef)(!1);return(0,r.useIsoMorphicEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}])},2788,e=>{"use strict";let t;var r=e.i(700020),o=((t=o||{})[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t);let a=(0,r.forwardRefWithAs)(function(e,t){var o;let{features:a=1,...n}=e,s={ref:t,"aria-hidden":(2&a)==2||(null!=(o=n["aria-hidden"])?o:void 0),hidden:(4&a)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&a)==4&&(2&a)!=2&&{display:"none"}}};return(0,r.useRender)()({ourProps:s,theirProps:n,slot:{},defaultTag:"span",name:"Hidden"})});e.s(["Hidden",0,a,"HiddenFeatures",0,o])},652265,e=>{"use strict";let t,r,o,a,n;e.i(544508);var s=e.i(397701),l=e.i(402155);let i=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),c=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var d=((t=d||{})[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t),u=((r=u||{})[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r),m=((o=m||{})[o.Previous=-1]="Previous",o[o.Next=1]="Next",o);function f(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(i)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var g=((a=g||{})[a.Strict=0]="Strict",a[a.Loose=1]="Loose",a),p=((n=p||{})[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n);function b(e,t=e=>e){return e.slice().sort((e,r)=>{let o=t(e),a=t(r);if(null===o||null===a)return 0;let n=o.compareDocumentPosition(a);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function h(e,t,{sorted:r=!0,relativeTo:o=null,skipElements:a=[]}={}){var n,s,l;let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,d=Array.isArray(e)?r?b(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(c)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):f(e);a.length>0&&d.length>1&&(d=d.filter(e=>!a.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),o=null!=o?o:i.activeElement;let u=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,d.indexOf(o))-1;if(4&t)return Math.max(0,d.indexOf(o))+1;if(8&t)return d.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=32&t?{preventScroll:!0}:{},p=0,x=d.length,v;do{if(p>=x||p+x<=0)return 0;let e=m+p;if(16&t)e=(e+x)%x;else{if(e<0)return 3;if(e>=x)return 1}null==(v=d[e])||v.focus(g),p+=u}while(v!==i.activeElement)return 6&t&&null!=(l=null==(s=null==(n=v)?void 0:n.matches)?void 0:s.call(n,"textarea,input"))&&l&&v.select(),2}"u">typeof window&&"u">typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["Focus",0,d,"FocusResult",0,u,"FocusableMode",0,g,"focusFrom",0,function(e,t){return h(f(),t,{relativeTo:e})},"focusIn",0,h,"getFocusableElements",0,f,"isFocusableElement",0,function(e,t=0){var r;return e!==(null==(r=(0,l.getOwnerDocument)(e))?void 0:r.body)&&(0,s.match)(t,{0:()=>e.matches(i),1(){let t=e;for(;null!==t;){if(t.matches(i))return!0;t=t.parentElement}return!1}})},"sortByDomNode",0,b])},970554,e=>{"use strict";let t,r,o;var a=e.i(783222),n=e.i(433336),s=e.i(271645),l=e.i(394487),i=e.i(914189),c=e.i(835696),d=e.i(941444),u=e.i(144279),m=e.i(294316),f=e.i(553521),g=e.i(2788);function p({onFocus:e}){let[t,r]=(0,s.useState)(!0),o=(0,f.useIsMounted)();return t?s.default.createElement(g.Hidden,{as:"button",type:"button",features:g.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let a,n=50;a=requestAnimationFrame(function t(){if(n--<=0){a&&cancelAnimationFrame(a);return}if(e()){if(cancelAnimationFrame(a),!o.current)return;r(!1);return}a=requestAnimationFrame(t)})}}):null}var b=e.i(652265),h=e.i(397701),x=e.i(368578),v=e.i(402155),C=e.i(700020);let y=s.createContext(null);function k({children:e}){let t=s.useRef({groups:new Map,get(e,t){var r;let o=this.groups.get(e);o||(o=new Map,this.groups.set(e,o));let a=null!=(r=o.get(t))?r:0;return o.set(t,a+1),[Array.from(o.keys()).indexOf(t),function(){let e=o.get(t);e>1?o.set(t,e-1):o.delete(t)}]}});return s.createElement(y.Provider,{value:t},e)}function w(e){let t=s.useContext(y);if(!t)throw Error("You must wrap your component in a ");let r=s.useId(),[o,a]=t.current.get(e,r);return s.useEffect(()=>a,[]),o}var E=e.i(998348),T=((t=T||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),N=((r=N||{})[r.Less=-1]="Less",r[r.Equal=0]="Equal",r[r.Greater=1]="Greater",r),S=((o=S||{})[o.SetSelectedIndex=0]="SetSelectedIndex",o[o.RegisterTab=1]="RegisterTab",o[o.UnregisterTab=2]="UnregisterTab",o[o.RegisterPanel=3]="RegisterPanel",o[o.UnregisterPanel=4]="UnregisterPanel",o);let P={0(e,t){var r;let o=(0,b.sortByDomNode)(e.tabs,e=>e.current),a=(0,b.sortByDomNode)(e.panels,e=>e.current),n=o.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),s={...e,tabs:o,panels:a};if(t.index<0||t.index>o.length-1){let r=(0,h.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,h.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===n.length)return s;let a=(0,h.match)(r,{0:()=>o.indexOf(n[0]),1:()=>o.indexOf(n[n.length-1])});return{...s,selectedIndex:-1===a?e.selectedIndex:a}}let l=o.slice(0,t.index),i=[...o.slice(t.index),...l].find(e=>n.includes(e));if(!i)return s;let c=null!=(r=o.indexOf(i))?r:e.selectedIndex;return -1===c&&(c=e.selectedIndex),{...s,selectedIndex:c}},1(e,t){if(e.tabs.includes(t.tab))return e;let r=e.tabs[e.selectedIndex],o=(0,b.sortByDomNode)([...e.tabs,t.tab],e=>e.current),a=e.selectedIndex;return e.info.current.isControlled||-1===(a=o.indexOf(r))&&(a=e.selectedIndex),{...e,tabs:o,selectedIndex:a}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,b.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},$=(0,s.createContext)(null);function I(e){let t=(0,s.useContext)($);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,I),t}return t}$.displayName="TabsDataContext";let M=(0,s.createContext)(null);function R(e){let t=(0,s.useContext)(M);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,R),t}return t}function F(e,t){return(0,h.match)(t.type,P,e,t)}M.displayName="TabsActionsContext";let O=C.RenderFeatures.RenderStrategy|C.RenderFeatures.Static,B=Object.assign((0,C.forwardRefWithAs)(function(e,t){var r,o;let d=(0,s.useId)(),{id:f=`headlessui-tabs-tab-${d}`,disabled:g=!1,autoFocus:p=!1,...y}=e,{orientation:k,activation:T,selectedIndex:N,tabs:S,panels:P}=I("Tab"),$=R("Tab"),M=I("Tab"),[F,O]=(0,s.useState)(null),B=(0,s.useRef)(null),A=(0,m.useSyncRefs)(B,t,O);(0,c.useIsoMorphicEffect)(()=>$.registerTab(B),[$,B]);let j=w("tabs"),D=S.indexOf(B);-1===D&&(D=j);let z=D===N,L=(0,i.useEvent)(e=>{var t;let r=e();if(r===b.FocusResult.Success&&"auto"===T){let e=null==(t=(0,v.getOwnerDocument)(B))?void 0:t.activeElement,r=M.tabs.findIndex(t=>t.current===e);-1!==r&&$.change(r)}return r}),_=(0,i.useEvent)(e=>{let t=S.map(e=>e.current).filter(Boolean);if(e.key===E.Keys.Space||e.key===E.Keys.Enter){e.preventDefault(),e.stopPropagation(),$.change(D);return}switch(e.key){case E.Keys.Home:case E.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),L(()=>(0,b.focusIn)(t,b.Focus.First));case E.Keys.End:case E.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),L(()=>(0,b.focusIn)(t,b.Focus.Last))}if(L(()=>(0,h.match)(k,{vertical:()=>e.key===E.Keys.ArrowUp?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===E.Keys.ArrowDown?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error,horizontal:()=>e.key===E.Keys.ArrowLeft?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===E.Keys.ArrowRight?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error}))===b.FocusResult.Success)return e.preventDefault()}),W=(0,s.useRef)(!1),X=(0,i.useEvent)(()=>{var e;W.current||(W.current=!0,null==(e=B.current)||e.focus({preventScroll:!0}),$.change(D),(0,x.microTask)(()=>{W.current=!1}))}),H=(0,i.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:K,focusProps:V}=(0,a.useFocusRing)({autoFocus:p}),{isHovered:G,hoverProps:Y}=(0,n.useHover)({isDisabled:g}),{pressed:U,pressProps:q}=(0,l.useActivePress)({disabled:g}),Q=(0,s.useMemo)(()=>({selected:z,hover:G,active:U,focus:K,autofocus:p,disabled:g}),[z,G,K,U,p,g]),Z=(0,C.mergeProps)({ref:A,onKeyDown:_,onMouseDown:H,onClick:X,id:f,role:"tab",type:(0,u.useResolveButtonType)(e,F),"aria-controls":null==(o=null==(r=P[D])?void 0:r.current)?void 0:o.id,"aria-selected":z,tabIndex:z?0:-1,disabled:g||void 0,autoFocus:p},V,Y,q);return(0,C.useRender)()({ourProps:Z,theirProps:y,slot:Q,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,C.forwardRefWithAs)(function(e,t){let{defaultIndex:r=0,vertical:o=!1,manual:a=!1,onChange:n,selectedIndex:l=null,...u}=e,f=o?"vertical":"horizontal",g=a?"manual":"auto",h=null!==l,x=(0,d.useLatestValue)({isControlled:h}),v=(0,m.useSyncRefs)(t),[y,w]=(0,s.useReducer)(F,{info:x,selectedIndex:null!=l?l:r,tabs:[],panels:[]}),E=(0,s.useMemo)(()=>({selectedIndex:y.selectedIndex}),[y.selectedIndex]),T=(0,d.useLatestValue)(n||(()=>{})),N=(0,d.useLatestValue)(y.tabs),S=(0,s.useMemo)(()=>({orientation:f,activation:g,...y}),[f,g,y]),P=(0,i.useEvent)(e=>(w({type:1,tab:e}),()=>w({type:2,tab:e}))),I=(0,i.useEvent)(e=>(w({type:3,panel:e}),()=>w({type:4,panel:e}))),R=(0,i.useEvent)(e=>{O.current!==e&&T.current(e),h||w({type:0,index:e})}),O=(0,d.useLatestValue)(h?e.selectedIndex:y.selectedIndex),B=(0,s.useMemo)(()=>({registerTab:P,registerPanel:I,change:R}),[]);(0,c.useIsoMorphicEffect)(()=>{w({type:0,index:null!=l?l:r})},[l]),(0,c.useIsoMorphicEffect)(()=>{if(void 0===O.current||y.tabs.length<=0)return;let e=(0,b.sortByDomNode)(y.tabs,e=>e.current);e.some((e,t)=>y.tabs[t]!==e)&&R(e.indexOf(y.tabs[O.current]))});let A=(0,C.useRender)();return s.default.createElement(k,null,s.default.createElement(M.Provider,{value:B},s.default.createElement($.Provider,{value:S},S.tabs.length<=0&&s.default.createElement(p,{onFocus:()=>{var e,t;for(let r of N.current)if((null==(e=r.current)?void 0:e.tabIndex)===0)return null==(t=r.current)||t.focus(),!0;return!1}}),A({ourProps:{ref:v},theirProps:u,slot:E,defaultTag:"div",name:"Tabs"}))))}),List:(0,C.forwardRefWithAs)(function(e,t){let{orientation:r,selectedIndex:o}=I("Tab.List"),a=(0,m.useSyncRefs)(t),n=(0,s.useMemo)(()=>({selectedIndex:o}),[o]);return(0,C.useRender)()({ourProps:{ref:a,role:"tablist","aria-orientation":r},theirProps:e,slot:n,defaultTag:"div",name:"Tabs.List"})}),Panels:(0,C.forwardRefWithAs)(function(e,t){let{selectedIndex:r}=I("Tab.Panels"),o=(0,m.useSyncRefs)(t),a=(0,s.useMemo)(()=>({selectedIndex:r}),[r]);return(0,C.useRender)()({ourProps:{ref:o},theirProps:e,slot:a,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,C.forwardRefWithAs)(function(e,t){var r,o,n,l;let i=(0,s.useId)(),{id:d=`headlessui-tabs-panel-${i}`,tabIndex:u=0,...f}=e,{selectedIndex:p,tabs:b,panels:h}=I("Tab.Panel"),x=R("Tab.Panel"),v=(0,s.useRef)(null),y=(0,m.useSyncRefs)(v,t);(0,c.useIsoMorphicEffect)(()=>x.registerPanel(v),[x,v]);let k=w("panels"),E=h.indexOf(v);-1===E&&(E=k);let T=E===p,{isFocusVisible:N,focusProps:S}=(0,a.useFocusRing)(),P=(0,s.useMemo)(()=>({selected:T,focus:N}),[T,N]),$=(0,C.mergeProps)({ref:y,id:d,role:"tabpanel","aria-labelledby":null==(o=null==(r=b[E])?void 0:r.current)?void 0:o.id,tabIndex:T?u:-1},S),M=(0,C.useRender)();return T||null!=(n=f.unmount)&&!n||null!=(l=f.static)&&l?M({ourProps:$,theirProps:f,slot:P,defaultTag:"div",features:O,visible:T,name:"Tabs.Panel"}):s.default.createElement(g.Hidden,{"aria-hidden":"true",...$})})});e.s(["Tab",0,B],970554)},405371,910342,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731);let a=(0,r.createContext)(o.BaseColors.Blue);e.s(["default",0,a],910342);var n=e.i(970554),s=e.i(444755);let l=(0,e.i(673706).makeClassName)("TabList"),i=(0,r.createContext)("line"),c={line:(0,s.tremorTwMerge)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,s.tremorTwMerge)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},d=r.default.forwardRef((e,o)=>{let{color:d,variant:u="line",children:m,className:f}=e,g=(0,t.__rest)(e,["color","variant","children","className"]);return r.default.createElement(n.Tab.List,Object.assign({ref:o,className:(0,s.tremorTwMerge)(l("root"),"justify-start overflow-x-clip",c[u],f)},g),r.default.createElement(i.Provider,{value:u},r.default.createElement(a.Provider,{value:d},m)))});d.displayName="TabList",e.s(["TabVariantContext",0,i,"default",0,d],405371)},197647,e=>{"use strict";var t=e.i(290571),r=e.i(970554),o=e.i(95779),a=e.i(444755),n=e.i(673706),s=e.i(271645),l=e.i(405371),i=e.i(910342);let c=(0,n.makeClassName)("Tab"),d=s.default.forwardRef((e,d)=>{let{icon:u,className:m,children:f}=e,g=(0,t.__rest)(e,["icon","className","children"]),p=(0,s.useContext)(l.TabVariantContext),b=(0,s.useContext)(i.default);return s.default.createElement(r.Tab,Object.assign({ref:d,className:(0,a.tremorTwMerge)(c("root"),"flex whitespace-nowrap truncate max-w-xs outline-none data-focus-visible:ring text-tremor-default transition duration-100",function(e,t){switch(e){case"line":return(0,a.tremorTwMerge)("data-[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","[&:not([data-selected])]:dark:hover:border-dark-tremor-content-emphasis [&:not([data-selected])]:dark:hover:text-dark-tremor-content-emphasis [&:not([data-selected])]:dark:text-dark-tremor-content",t?(0,n.getColorClassNames)(t,o.colorPalette.border).selectBorderColor:["data-[selected]:border-tremor-brand data-[selected]:text-tremor-brand","data-[selected]:dark:border-dark-tremor-brand data-[selected]:dark:text-dark-tremor-brand"]);case"solid":return(0,a.tremorTwMerge)("border-transparent border rounded-tremor-small px-2.5 py-1","data-[selected]:border-tremor-border data-[selected]:bg-tremor-background data-[selected]:shadow-tremor-input [&:not([data-selected])]:hover:text-tremor-content-emphasis data-[selected]:text-tremor-brand [&:not([data-selected])]:text-tremor-content","dark:data-[selected]:border-dark-tremor-border dark:data-[selected]:bg-dark-tremor-background dark:data-[selected]:shadow-dark-tremor-input dark:[&:not([data-selected])]:hover:text-dark-tremor-content-emphasis dark:data-[selected]:text-dark-tremor-brand dark:[&:not([data-selected])]:text-dark-tremor-content",t?(0,n.getColorClassNames)(t,o.colorPalette.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(p,b),m,b&&(0,n.getColorClassNames)(b,o.colorPalette.text).selectTextColor)},g),u?s.default.createElement(u,{className:(0,a.tremorTwMerge)(c("icon"),"flex-none h-5 w-5",f?"mr-2":"")}):null,f?s.default.createElement("span",null,f):null)});d.displayName="Tab",e.s(["Tab",0,d],197647)},653824,e=>{"use strict";var t=e.i(290571),r=e.i(970554),o=e.i(444755),a=e.i(673706),n=e.i(271645);let s=(0,a.makeClassName)("TabGroup"),l=n.default.forwardRef((e,a)=>{let{defaultIndex:l,index:i,onIndexChange:c,children:d,className:u}=e,m=(0,t.__rest)(e,["defaultIndex","index","onIndexChange","children","className"]);return n.default.createElement(r.Tab.Group,Object.assign({as:"div",ref:a,defaultIndex:l,selectedIndex:i,onChange:c,className:(0,o.tremorTwMerge)(s("root"),"w-full",u)},m),d)});l.displayName="TabGroup",e.s(["TabGroup",0,l],653824)},881073,e=>{"use strict";var t=e.i(405371);e.s(["TabList",()=>t.default])},751734,144582,e=>{"use strict";var t=e.i(271645);let r=(0,t.createContext)(0);e.s(["default",0,r],751734);let o=(0,t.createContext)({selectedValue:void 0,handleValueChange:void 0});e.s(["default",0,o],144582)},404206,e=>{"use strict";var t=e.i(290571),r=e.i(751734),o=e.i(144582),a=e.i(444755),n=e.i(673706),s=e.i(271645);let l=(0,n.makeClassName)("TabPanel"),i=s.default.forwardRef((e,n)=>{let{children:i,className:c}=e,d=(0,t.__rest)(e,["children","className"]),{selectedValue:u}=(0,s.useContext)(o.default),m=u===(0,s.useContext)(r.default);return s.default.createElement("div",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"w-full mt-2",m?"":"hidden",c),"aria-selected":m?"true":"false"},d),i)});i.displayName="TabPanel",e.s(["TabPanel",0,i],404206)},723731,e=>{"use strict";var t=e.i(290571),r=e.i(970554),o=e.i(751734),a=e.i(144582),n=e.i(444755),s=e.i(673706),l=e.i(271645);let i=(0,s.makeClassName)("TabPanels"),c=l.default.forwardRef((e,s)=>{let{children:c,className:d}=e,u=(0,t.__rest)(e,["children","className"]);return l.default.createElement(r.Tab.Panels,Object.assign({as:"div",ref:s,className:(0,n.tremorTwMerge)(i("root"),"w-full",d)},u),({selectedIndex:e})=>l.default.createElement(a.default.Provider,{value:{selectedValue:e}},l.default.Children.map(c,(e,t)=>l.default.createElement(o.default.Provider,{value:t},e))))});c.displayName="TabPanels",e.s(["TabPanels",0,c],723731)},309821,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(135551),o=e.i(201072),a=e.i(121229),n=e.i(726289),s=e.i(864517),l=e.i(343794),i=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),m=e.i(703923),f={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},g=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var a=e.style;a.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(a.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),e.current},p=e.i(410160),b=e.i(392221),h=e.i(654310),x=0,v=(0,h.default)();let C=function(e){var r=t.useState(),o=(0,b.default)(r,2),a=o[0],n=o[1];return t.useEffect(function(){var e;n("rc_progress_".concat((v?(e=x,x+=1):e="TEST_OR_SSR",e)))},[]),e||a};var y=function(e){var r=e.bg,o=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},o)};function k(e,t){return Object.keys(e).map(function(r){var o=parseFloat(r),a="".concat(Math.floor(o*t),"%");return"".concat(e[r]," ").concat(a)})}var w=t.forwardRef(function(e,r){var o=e.prefixCls,a=e.color,n=e.gradientId,s=e.radius,l=e.style,i=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,m=e.gapDegree,f=a&&"object"===(0,p.default)(a),g=u/2,b=t.createElement("circle",{className:"".concat(o,"-circle-path"),r:s,cx:g,cy:g,stroke:f?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==i),style:l,ref:r});if(!f)return b;var h="".concat(n,"-conic"),x=k(a,(360-m)/360),v=k(a,1),C="conic-gradient(from ".concat(m?"".concat(180+m/2,"deg"):"0deg",", ").concat(x.join(", "),")"),w="linear-gradient(to ".concat(m?"bottom":"top",", ").concat(v.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:h},b),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(h,")")},t.createElement(y,{bg:w},t.createElement(y,{bg:C}))))}),E=function(e,t,r,o,a,n,s,l,i,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-o)/100*t;return"round"===i&&100!==o&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(a+r/100*360*((360-n)/360)+(0===n?0:({bottom:0,top:180,left:90,right:-90})[s]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},T=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function N(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let S=function(e){var r,o,a,n,s=(0,u.default)((0,u.default)({},f),e),i=s.id,c=s.prefixCls,b=s.steps,h=s.strokeWidth,x=s.trailWidth,v=s.gapDegree,y=void 0===v?0:v,k=s.gapPosition,S=s.trailColor,P=s.strokeLinecap,$=s.style,I=s.className,M=s.strokeColor,R=s.percent,F=(0,m.default)(s,T),O=C(i),B="".concat(O,"-gradient"),A=50-h/2,j=2*Math.PI*A,D=y>0?90+y/2:-90,z=(360-y)/360*j,L="object"===(0,p.default)(b)?b:{count:b,gap:2},_=L.count,W=L.gap,X=N(R),H=N(M),K=H.find(function(e){return e&&"object"===(0,p.default)(e)}),V=K&&"object"===(0,p.default)(K)?"butt":P,G=E(j,z,0,100,D,y,k,S,V,h),Y=g();return t.createElement("svg",(0,d.default)({className:(0,l.default)("".concat(c,"-circle"),I),viewBox:"0 0 ".concat(100," ").concat(100),style:$,id:i,role:"presentation"},F),!_&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:A,cx:50,cy:50,stroke:S,strokeLinecap:V,strokeWidth:x||h,style:G}),_?(r=Math.round(_*(X[0]/100)),o=100/_,a=0,Array(_).fill(null).map(function(e,n){var s=n<=r-1?H[0]:S,l=s&&"object"===(0,p.default)(s)?"url(#".concat(B,")"):void 0,i=E(j,z,a,o,D,y,k,s,"butt",h,W);return a+=(z-i.strokeDashoffset+W)*100/z,t.createElement("circle",{key:n,className:"".concat(c,"-circle-path"),r:A,cx:50,cy:50,stroke:l,strokeWidth:h,opacity:1,style:i,ref:function(e){Y[n]=e}})})):(n=0,X.map(function(e,r){var o=H[r]||H[H.length-1],a=E(j,z,n,e,D,y,k,o,V,h);return n+=e,t.createElement(w,{key:r,color:o,ptg:e,radius:A,prefixCls:c,gradientId:B,style:a,strokeLinecap:V,strokeWidth:h,gapDegree:y,ref:function(e){Y[r]=e},size:100})}).reverse()))};var P=e.i(491816);e.i(765846);var $=e.i(896091);function I(e){return!e||e<0?0:e>100?100:e}function M({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let R=(e,t,r)=>{var o,a,n,s;let l=-1,i=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(l="small"===e?2:14,i=null!=o?o:8):"number"==typeof e?[l,i]=[e,e]:[l=14,i=8]=Array.isArray(e)?e:[e.width,e.height],l*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?i=t||("small"===e?6:8):"number"==typeof e?[l,i]=[e,e]:[l=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[l,i]="small"===e?[60,60]:[120,120]:"number"==typeof e?[l,i]=[e,e]:Array.isArray(e)&&(l=null!=(a=null!=(o=e[0])?o:e[1])?a:120,i=null!=(s=null!=(n=e[0])?n:e[1])?s:120));return[l,i]},F=e=>{let{prefixCls:r,trailColor:o=null,strokeLinecap:a="round",gapPosition:n,gapDegree:s,width:i=120,type:c,children:d,success:u,size:m=i,steps:f}=e,[g,p]=R(m,"circle"),{strokeWidth:b}=e;void 0===b&&(b=Math.max(3/g*100,6));let h=t.useMemo(()=>s||0===s?s:"dashboard"===c?75:void 0,[s,c]),x=(({percent:e,success:t,successPercent:r})=>{let o=I(M({success:t,successPercent:r}));return[o,I(I(e)-o)]})(e),v="[object Object]"===Object.prototype.toString.call(e.strokeColor),C=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||$.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),y=(0,l.default)(`${r}-inner`,{[`${r}-circle-gradient`]:v}),k=t.createElement(S,{steps:f,percent:f?x[1]:x,strokeWidth:b,trailWidth:b,strokeColor:f?C[1]:C,strokeLinecap:a,trailColor:o,prefixCls:r,gapDegree:h,gapPosition:n||"dashboard"===c&&"bottom"||void 0}),w=g<=20,E=t.createElement("div",{className:y,style:{width:g,height:p,fontSize:.15*g+6}},k,!w&&d);return w?t.createElement(P.default,{title:d},E):E};e.i(296059);var O=e.i(694758),B=e.i(915654),A=e.i(183293),j=e.i(246422),D=e.i(838378);let z="--progress-line-stroke-color",L="--progress-percent",_=e=>{let t=e?"100%":"-100%";return new O.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},W=(0,j.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,D.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${z})`]},height:"100%",width:`calc(1 / var(${L}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,B.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:_(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:_(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var X=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let H=e=>{let{prefixCls:r,direction:o,percent:a,size:n,strokeWidth:s,strokeColor:i,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:m,success:f}=e,{align:g,type:p}=m,b=i&&"string"!=typeof i?((e,t)=>{let{from:r=$.presetPrimaryColors.blue,to:o=$.presetPrimaryColors.blue,direction:a="rtl"===t?"to left":"to right"}=e,n=X(e,["from","to","direction"]);if(0!==Object.keys(n).length){let e,t=(e=[],Object.keys(n).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:n[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${a}, ${t})`;return{background:r,[z]:r}}let s=`linear-gradient(${a}, ${r}, ${o})`;return{background:s,[z]:s}})(i,o):{[z]:i,background:i},h="square"===c||"butt"===c?0:void 0,[x,v]=R(null!=n?n:[-1,s||("small"===n?6:8)],"line",{strokeWidth:s}),C=Object.assign(Object.assign({width:`${I(a)}%`,height:v,borderRadius:h},b),{[L]:I(a)/100}),y=M(e),k={width:`${I(y)}%`,height:v,borderRadius:h,backgroundColor:null==f?void 0:f.strokeColor},w=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:h}},t.createElement("div",{className:(0,l.default)(`${r}-bg`,`${r}-bg-${p}`),style:C},"inner"===p&&d),void 0!==y&&t.createElement("div",{className:`${r}-success-bg`,style:k})),E="outer"===p&&"start"===g,T="outer"===p&&"end"===g;return"outer"===p&&"center"===g?t.createElement("div",{className:`${r}-layout-bottom`},w,d):t.createElement("div",{className:`${r}-outer`,style:{width:x<0?"100%":x}},E&&d,w,T&&d)},K=e=>{let{size:r,steps:o,rounding:a=Math.round,percent:n=0,strokeWidth:s=8,strokeColor:i,trailColor:c=null,prefixCls:d,children:u}=e,m=a(n/100*o),[f,g]=R(null!=r?r:["small"===r?2:14,s],"step",{steps:o,strokeWidth:s}),p=f/o,b=Array.from({length:o});for(let e=0;et.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let G=["normal","exception","active","success"],Y=t.forwardRef((e,d)=>{let u,{prefixCls:m,className:f,rootClassName:g,steps:p,strokeColor:b,percent:h=0,size:x="default",showInfo:v=!0,type:C="line",status:y,format:k,style:w,percentPosition:E={}}=e,T=V(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:N="end",type:S="outer"}=E,P=Array.isArray(b)?b[0]:b,$="string"==typeof b||Array.isArray(b)?b:void 0,O=t.useMemo(()=>{if(P){let e="string"==typeof P?P:Object.values(P)[0];return new r.FastColor(e).isLight()}return!1},[b]),B=t.useMemo(()=>{var t,r;let o=M(e);return Number.parseInt(void 0!==o?null==(t=null!=o?o:0)?void 0:t.toString():null==(r=null!=h?h:0)?void 0:r.toString(),10)},[h,e.success,e.successPercent]),A=t.useMemo(()=>!G.includes(y)&&B>=100?"success":y||"normal",[y,B]),{getPrefixCls:j,direction:D,progress:z}=t.useContext(c.ConfigContext),L=j("progress",m),[_,X,Y]=W(L),U="line"===C,q=U&&!p,Q=t.useMemo(()=>{let r;if(!v)return null;let i=M(e),c=k||(e=>`${e}%`),d=U&&O&&"inner"===S;return"inner"===S||k||"exception"!==A&&"success"!==A?r=c(I(h),I(i)):"exception"===A?r=U?t.createElement(n.default,null):t.createElement(s.default,null):"success"===A&&(r=U?t.createElement(o.default,null):t.createElement(a.default,null)),t.createElement("span",{className:(0,l.default)(`${L}-text`,{[`${L}-text-bright`]:d,[`${L}-text-${N}`]:q,[`${L}-text-${S}`]:q}),title:"string"==typeof r?r:void 0},r)},[v,h,B,A,C,L,k]);"line"===C?u=p?t.createElement(K,Object.assign({},e,{strokeColor:$,prefixCls:L,steps:"object"==typeof p?p.count:p}),Q):t.createElement(H,Object.assign({},e,{strokeColor:P,prefixCls:L,direction:D,percentPosition:{align:N,type:S}}),Q):("circle"===C||"dashboard"===C)&&(u=t.createElement(F,Object.assign({},e,{strokeColor:P,prefixCls:L,progressStatus:A}),Q));let Z=(0,l.default)(L,`${L}-status-${A}`,{[`${L}-${"dashboard"===C&&"circle"||C}`]:"line"!==C,[`${L}-inline-circle`]:"circle"===C&&R(x,"circle")[0]<=20,[`${L}-line`]:q,[`${L}-line-align-${N}`]:q,[`${L}-line-position-${S}`]:q,[`${L}-steps`]:p,[`${L}-show-info`]:v,[`${L}-${x}`]:"string"==typeof x,[`${L}-rtl`]:"rtl"===D},null==z?void 0:z.className,f,g,X,Y);return _(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==z?void 0:z.style),w),className:Z,role:"progressbar","aria-valuenow":B,"aria-valuemin":0,"aria-valuemax":100},(0,i.default)(T,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Y],309821)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3jgsbd_1fz8l8.js b/litellm/proxy/_experimental/out/_next/static/chunks/0gylheyn-59ow.js
similarity index 57%
rename from litellm/proxy/_experimental/out/_next/static/chunks/3jgsbd_1fz8l8.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0gylheyn-59ow.js
index 59b7ab1c31e..a2aed590fc0 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3jgsbd_1fz8l8.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0gylheyn-59ow.js
@@ -1,8 +1,8 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,784774,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{ref:r,"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";let l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("thead",{ref:r,"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...a}));l.displayName="TableHeader";let o=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tbody",{ref:r,"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...a}));o.displayName="TableBody";let i=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));i.displayName="TableFooter";let s=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tr",{ref:r,"data-slot":"table-row",className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));s.displayName="TableRow";let d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("th",{ref:r,"data-slot":"table-head",className:(0,n.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));d.displayName="TableHead";let u=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("td",{ref:r,"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));u.displayName="TableCell",a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("caption",{ref:r,"data-slot":"table-caption",className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...a})).displayName="TableCaption",e.s(["Table",0,r,"TableBody",0,o,"TableCell",0,u,"TableFooter",0,i,"TableHead",0,d,"TableHeader",0,l,"TableRow",0,s])},302747,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-accent",e),...a}));r.displayName="Skeleton",e.s(["Skeleton",0,r])},108821,e=>{"use strict";var t=e.i(733332),a=e.i(271645);let n=a.createContext(!1),r=a.createContext(void 0);e.s(["DialogRootContext",0,r,"IsDrawerContext",0,n,"useDialogRootContext",0,function(e){let n=a.useContext(r);if(!1===e&&void 0===n)throw Error((0,t.default)(27));return n}])},402820,156736,209793,625834,784324,264951,e=>{"use strict";e.i(247167);var t,a,n=e.i(271645),r=e.i(108821),l=e.i(552245),o=e.i(405005),i=e.i(209407);let s={...o.popupStateMapping,...i.transitionStatusMapping},d=n.forwardRef(function(e,t){let{render:a,className:n,style:o,forceRender:i=!1,...d}=e,{store:u}=(0,r.useDialogRootContext)(),c=u.useState("open"),p=u.useState("nested"),g=u.useState("mounted"),m=u.useState("transitionStatus");return(0,l.useRenderElement)("div",e,{state:{open:c,transitionStatus:m},ref:[u.context.backdropRef,t],stateAttributesMapping:s,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:i||!p})});e.s(["DialogBackdrop",0,d],402820);var u=e.i(540886),c=e.i(675606),p=e.i(56434);let g=n.forwardRef(function(e,t){let{render:a,className:n,style:o,disabled:i=!1,nativeButton:s=!0,...d}=e,{store:g}=(0,r.useDialogRootContext)(),m=g.useState("open"),{getButtonProps:f,buttonRef:b}=(0,u.useButton)({disabled:i,native:s});return(0,l.useRenderElement)("button",e,{state:{disabled:i},ref:[t,b],props:[{onClick:function(e){m&&g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.closePress,e.nativeEvent))}},d,f]})});e.s(["DialogClose",0,g],156736);var m=e.i(788015);let f=n.forwardRef(function(e,t){let{render:a,className:n,style:o,id:i,...s}=e,{store:d}=(0,r.useDialogRootContext)(),u=(0,m.useBaseUiId)(i);return d.useSyncedValueWithCleanup("descriptionElementId",u),(0,l.useRenderElement)("p",e,{ref:t,props:[{id:u},s]})});e.s(["DialogDescription",0,f],209793);var b=e.i(61487);let x=((t={}).nestedDialogs="--nested-dialogs",t),h=((a={})[a.open=o.CommonPopupDataAttributes.open]="open",a[a.closed=o.CommonPopupDataAttributes.closed]="closed",a[a.startingStyle=o.CommonPopupDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=o.CommonPopupDataAttributes.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a);var y=e.i(733332);let C=n.createContext(void 0);function v(){let e=n.useContext(C);if(void 0===e)throw Error((0,y.default)(26));return e}e.s(["DialogPortalContext",0,C,"useDialogPortalContext",0,v],625834);var S=e.i(137584),w=e.i(673327),$=e.i(264111),D=e.i(843476);let j={...o.popupStateMapping,...i.transitionStatusMapping,nestedDialogOpen:e=>e?{[h.nestedDialogOpen]:""}:null},R=n.forwardRef(function(e,t){let{render:a,className:n,style:o,finalFocus:i,initialFocus:s,...d}=e,{store:u}=(0,r.useDialogRootContext)(),c=u.useState("descriptionElementId"),p=u.useState("disablePointerDismissal"),g=u.useState("floatingRootContext"),m=u.useState("popupProps"),f=u.useState("modal"),h=u.useState("mounted"),y=u.useState("nested"),C=u.useState("nestedOpenDialogCount"),R=u.useState("open"),O=u.useState("openMethod"),N=u.useState("titleElementId"),k=u.useState("transitionStatus"),E=u.useState("role"),M=g.useState("floatingId"),P=d.id??M;v(),(0,S.useOpenChangeComplete)({open:R,ref:u.context.popupRef,onComplete(){R&&u.context.onOpenChangeComplete?.(!0)}});let T=void 0===s?(0,$.createDefaultInitialFocus)(u.context.popupRef):s,I=u.useStateSetter("popupElement"),A=(0,l.useRenderElement)("div",e,{state:{open:R,nested:y,transitionStatus:k,nestedDialogOpen:C>0},props:[m,{id:P,"aria-labelledby":N??void 0,"aria-describedby":c??void 0,role:E,...$.FOCUSABLE_POPUP_PROPS,hidden:!h,onKeyDown(e){w.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[x.nestedDialogs]:C}},d],ref:[t,u.context.popupRef,I],stateAttributesMapping:j});return(0,D.jsx)(b.FloatingFocusManager,{context:g,openInteractionType:O,disabled:!h,closeOnFocusOut:!p,initialFocus:T,returnFocus:i,modal:!1!==f,restoreFocus:"popup",children:A})});e.s(["DialogPopup",0,R],784324);var O=e.i(144394),N=e.i(726674),k=e.i(426);let E=n.forwardRef(function(e,t){let{keepMounted:a=!1,...n}=e,{store:l}=(0,r.useDialogRootContext)(),o=l.useState("mounted"),i=l.useState("modal"),s=l.useState("open");return o||a?(0,D.jsx)(C.Provider,{value:a,children:(0,D.jsxs)(N.FloatingPortal,{ref:t,...n,children:[o&&!0===i&&(0,D.jsx)(k.InternalBackdrop,{ref:l.context.internalBackdropRef,inert:(0,O.inertValue)(!s)}),e.children]})}):null});e.s(["DialogPortal",0,E],264951)},67530,e=>{"use strict";var t=e.i(271645),a=e.i(145484),n=e.i(956789),r=e.i(17989),l=e.i(647554),o=e.i(675606),i=e.i(56434),s=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:o,isDrawer:i}){let d=e.useState("open"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),p=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,f]=t.useState(0),[b,x]=t.useState(0),h=0===m,y=(0,r.useDismiss)(g,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===c?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let a=(0,l.getTarget)(t);return!!h&&!u&&(!c||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===a||e.context.backdropRef.current===a||(0,l.contains)(a,p)&&!a?.hasAttribute("data-base-ui-portal"))},escapeKey:h});(0,a.useScrollLock)(d&&!0===c,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{f(e),x(t)}),e.useContextCallback("onNestedDialogClose",()=>{f(0),x(0)}),t.useEffect(()=>(o?.onNestedDialogOpen&&d&&o.onNestedDialogOpen(m+1,b+ +!!i),o?.onNestedDialogClose&&!d&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&d&&o.onNestedDialogClose()}),[i,d,m,b,o]);let C=y.reference??n.EMPTY_OBJECT,v=y.trigger??n.EMPTY_OBJECT,S=y.floating??n.EMPTY_OBJECT;return(0,s.usePopupInteractionProps)(e,{activeTriggerProps:C,inactiveTriggerProps:v,popupProps:S,nestedOpenDialogCount:m,nestedOpenDrawerCount:b}),null},"useDialogRoot",0,function(e){let{store:a,actionsRef:n}=e,r=a.useState("open");(0,s.usePopupRootSync)(a,r),(0,s.useImplicitActiveTrigger)(a);let{forceUnmount:l}=(0,s.useOpenStateTransitions)(r,a),d=t.useCallback(()=>{a.setOpen(!1,(0,o.createChangeEventDetails)(i.REASONS.imperativeAction))},[a]);t.useImperativeHandle(n,()=>({unmount:l,close:d}),[l,d])}])},366250,301807,e=>{"use strict";var t=e.i(271645),a=e.i(713203),n=e.i(67530),r=e.i(108821),l=e.i(616269),o=e.i(301252),i=e.i(116786),s=e.i(990627),d=e.i(264111);let u={...i.popupStoreSelectors,modal:(0,l.createSelector)(e=>e.modal),nested:(0,l.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,l.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,l.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,l.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,l.createSelector)(e=>e.openMethod),descriptionElementId:(0,l.createSelector)(e=>e.descriptionElementId),titleElementId:(0,l.createSelector)(e=>e.titleElementId),viewportElement:(0,l.createSelector)(e=>e.viewportElement),role:(0,l.createSelector)(e=>e.role)};class c extends o.ReactStore{constructor(e,a,n=!1){const r=new s.PopupTriggerMap,l=function(e={}){return{...(0,i.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);l.floatingRootContext=(0,i.createPopupFloatingRootContext)(r,a,n),super(l,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},u)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a={open:e};(0,d.setPopupOpenState)(a,e,t.trigger),this.update(a)};static useStore(e,t){return(0,d.usePopupStore)(e,(e,a)=>new c(t,e,a),!0).store}}e.s(["DialogStore",0,c],301807);var p=e.i(843476);e.s(["useRenderDialogRoot",0,function(e,l="dialog"){let{children:o,open:i,defaultOpen:s=!1,onOpenChange:d,onOpenChangeComplete:u,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:f,handle:b,triggerId:x,defaultTriggerId:h=null}=e,y="alert-dialog"===l,C=(0,r.useDialogRootContext)(!0),v={modal:!!y||m,disablePointerDismissal:y||g,nested:!!C,role:y?"alertdialog":"dialog"},S=c.useStore(b?.store,{open:s,openProp:i,activeTriggerId:h,triggerIdProp:x,...v});(0,a.useOnFirstRender)(()=>{let e=void 0===i&&!1===S.state.open&&!0===s?{open:!0,activeTriggerId:h}:null;y?S.update(e?{...v,...e}:v):e&&S.update(e)}),S.useControlledProp("openProp",i),S.useControlledProp("triggerIdProp",x),S.useSyncedValues(v),S.useContextCallback("onOpenChange",d),S.useContextCallback("onOpenChangeComplete",u);let w=S.useState("open"),$=S.useState("mounted"),D=S.useState("payload");(0,n.useDialogRoot)({store:S,actionsRef:f});let j=t.useMemo(()=>({store:S}),[S]);return(0,p.jsx)(r.IsDrawerContext.Provider,{value:!1,children:(0,p.jsxs)(r.DialogRootContext.Provider,{value:j,children:[(w||$)&&(0,p.jsx)(n.DialogInteractions,{store:S,parentContext:C?.store.context,isDrawer:"drawer"===l}),"function"==typeof o?o({payload:D}):o]})})}],366250)},974217,e=>{"use strict";e.i(247167);var t,a=e.i(271645),n=e.i(552245),r=e.i(405005),l=e.i(209407),o=e.i(108821),i=e.i(625834);let s=((t={})[t.open=r.CommonPopupDataAttributes.open]="open",t[t.closed=r.CommonPopupDataAttributes.closed]="closed",t[t.startingStyle=r.CommonPopupDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=r.CommonPopupDataAttributes.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t),d={...r.popupStateMapping,...l.transitionStatusMapping,nested:e=>e?{[s.nested]:""}:null,nestedDialogOpen:e=>e?{[s.nestedDialogOpen]:""}:null},u=a.forwardRef(function(e,t){let{render:a,className:r,style:l,children:s,...u}=e,c=(0,i.useDialogPortalContext)(),{store:p}=(0,o.useDialogRootContext)(),g=p.useState("open"),m=p.useState("nested"),f=p.useState("transitionStatus"),b=p.useState("nestedOpenDialogCount"),x=p.useState("mounted"),h=p.useStateSetter("viewportElement");return(0,n.useRenderElement)("div",e,{enabled:c||x,state:{open:g,nested:m,transitionStatus:f,nestedDialogOpen:b>0},ref:[t,h],stateAttributesMapping:d,props:[{role:"presentation",hidden:!x,style:{pointerEvents:g?void 0:"none"},children:s},u]})});e.s(["DialogViewport",0,u],974217)},77173,313488,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(108821),n=e.i(552245),r=e.i(788015);let l=t.forwardRef(function(e,t){let{render:l,className:o,style:i,id:s,...d}=e,{store:u}=(0,a.useDialogRootContext)(),c=(0,r.useBaseUiId)(s);return u.useSyncedValueWithCleanup("titleElementId",c),(0,n.useRenderElement)("h2",e,{ref:t,props:[{id:c},d]})});e.s(["DialogTitle",0,l],77173);var o=e.i(733332),i=e.i(540886),s=e.i(405005),d=e.i(638396),u=e.i(264111),c=e.i(385689),p=e.i(32199);let g=t.forwardRef(function(e,l){let{render:g,className:m,style:f,disabled:b=!1,nativeButton:x=!0,id:h,payload:y,handle:C,...v}=e,S=(0,a.useDialogRootContext)(!0),w=C?.store??S?.store;if(!w)throw Error((0,o.default)(79));let $=(0,r.useBaseUiId)(h),D=w.useState("floatingRootContext"),j=w.useState("isOpenedByTrigger",$),R=w.useState("triggerPopupId",$),O=t.useRef(null),{registerTrigger:N,isMountedByThisTrigger:k}=(0,u.useTriggerDataForwarding)($,O,w,{payload:y}),{getButtonProps:E,buttonRef:M}=(0,i.useButton)({disabled:b,native:x}),P=(0,c.useClick)(D,{enabled:null!=D}),T=(0,p.useOpenMethodTriggerProps)(()=>w.select("open"),e=>{w.set("openMethod",e)}),I=w.useState("triggerProps",k);return(0,n.useRenderElement)("button",e,{state:{disabled:b,open:j},ref:[M,l,N,O],props:[P.reference,I,T,{[d.CLICK_TRIGGER_IDENTIFIER]:"",id:$,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":R},v,E],stateAttributesMapping:s.triggerOpenStateMapping})});e.s(["DialogTrigger",0,g],313488)},325326,e=>{"use strict";var t=e.i(301807),a=e.i(675606),n=e.i(56434);class r{constructor(e){this.store=e??new t.DialogStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["DialogHandle",0,r,"createDialogHandle",0,function(){return new r}])},353753,e=>{"use strict";e.s([],914651),e.i(914651);var t=e.i(402820),a=e.i(156736),n=e.i(209793),r=e.i(784324),l=e.i(264951),o=e.i(271645),i=e.i(108821),s=e.i(366250),d=e.i(974217),u=e.i(77173),c=e.i(313488),p=e.i(325326);e.s(["Backdrop",()=>t.DialogBackdrop,"Close",()=>a.DialogClose,"Description",()=>n.DialogDescription,"Handle",()=>p.DialogHandle,"Popup",()=>r.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){let t=o.useContext(i.IsDrawerContext)?"drawer":"dialog";return(0,s.useRenderDialogRoot)(e,t)},"Title",()=>u.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>d.DialogViewport,"createHandle",()=>p.createDialogHandle],828376);var g=e.i(828376);e.s(["Dialog",0,g],353753)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("label",{ref:r,"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));r.displayName="Label",e.s(["Label",0,r])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),n=e.i(242064),r=e.i(529681);let l=e=>{let{prefixCls:n,className:r,style:l,size:o,shape:i}=e,s=(0,a.default)({[`${n}-lg`]:"large"===o,[`${n}-sm`]:"small"===o}),d=(0,a.default)({[`${n}-circle`]:"circle"===i,[`${n}-square`]:"square"===i,[`${n}-round`]:"round"===i}),u=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,a.default)(n,s,d,r),style:Object.assign(Object.assign({},u),l)})};e.i(296059);var o=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let u=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),c=e=>({height:e,lineHeight:(0,i.unit)(e)}),p=e=>Object.assign({width:e},c(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},c(e)),m=e=>Object.assign({width:e},c(e)),f=(e,t,a)=>{let{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},c(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:c,gradientFromColor:x,padding:h,marginSM:y,borderRadius:C,titleHeight:v,blockRadius:S,paragraphLiHeight:w,controlHeightXS:$,paragraphMarginTop:D}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},p(d)),[`${a}-sm`]:Object.assign({},p(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:v,background:x,borderRadius:S,[`+ ${r}`]:{marginBlockStart:c}},[r]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:y,[`+ ${r}`]:{marginBlockStart:D}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:i(n).mul(2).equal(),minWidth:i(n).mul(2).equal()},b(n,i))},f(e,n,a)),{[`${a}-lg`]:Object.assign({},b(r,i))}),f(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},b(l,i))}),f(e,l,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},p(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(r)),[`${t}${t}-sm`]:Object.assign({},p(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:a},g(t,i)),[`${n}-lg`]:Object.assign({},g(r,i)),[`${n}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},m(l(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},m(a)),{maxWidth:l(a).mul(4).equal(),maxHeight:l(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,784774,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{ref:r,"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";let l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("thead",{ref:r,"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...a}));l.displayName="TableHeader";let o=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tbody",{ref:r,"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...a}));o.displayName="TableBody";let i=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));i.displayName="TableFooter";let s=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tr",{ref:r,"data-slot":"table-row",className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));s.displayName="TableRow";let u=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("th",{ref:r,"data-slot":"table-head",className:(0,n.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));u.displayName="TableHead";let d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("td",{ref:r,"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));d.displayName="TableCell",a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("caption",{ref:r,"data-slot":"table-caption",className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...a})).displayName="TableCaption",e.s(["Table",0,r,"TableBody",0,o,"TableCell",0,d,"TableFooter",0,i,"TableHead",0,u,"TableHeader",0,l,"TableRow",0,s])},302747,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-accent",e),...a}));r.displayName="Skeleton",e.s(["Skeleton",0,r])},108821,e=>{"use strict";var t=e.i(733332),a=e.i(271645);let n=a.createContext(!1),r=a.createContext(void 0);e.s(["DialogRootContext",0,r,"IsDrawerContext",0,n,"useDialogRootContext",0,function(e){let n=a.useContext(r);if(!1===e&&void 0===n)throw Error((0,t.default)(27));return n}])},402820,156736,209793,625834,784324,264951,e=>{"use strict";e.i(247167);var t,a,n=e.i(271645),r=e.i(108821),l=e.i(552245),o=e.i(405005),i=e.i(209407);let s={...o.popupStateMapping,...i.transitionStatusMapping},u=n.forwardRef(function(e,t){let{render:a,className:n,style:o,forceRender:i=!1,...u}=e,{store:d}=(0,r.useDialogRootContext)(),c=d.useState("open"),p=d.useState("nested"),g=d.useState("mounted"),m=d.useState("transitionStatus");return(0,l.useRenderElement)("div",e,{state:{open:c,transitionStatus:m},ref:[d.context.backdropRef,t],stateAttributesMapping:s,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:i||!p})});e.s(["DialogBackdrop",0,u],402820);var d=e.i(540886),c=e.i(675606),p=e.i(56434);let g=n.forwardRef(function(e,t){let{render:a,className:n,style:o,disabled:i=!1,nativeButton:s=!0,...u}=e,{store:g}=(0,r.useDialogRootContext)(),m=g.useState("open"),{getButtonProps:f,buttonRef:b}=(0,d.useButton)({disabled:i,native:s});return(0,l.useRenderElement)("button",e,{state:{disabled:i},ref:[t,b],props:[{onClick:function(e){m&&g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.closePress,e.nativeEvent))}},u,f]})});e.s(["DialogClose",0,g],156736);var m=e.i(788015);let f=n.forwardRef(function(e,t){let{render:a,className:n,style:o,id:i,...s}=e,{store:u}=(0,r.useDialogRootContext)(),d=(0,m.useBaseUiId)(i);return u.useSyncedValueWithCleanup("descriptionElementId",d),(0,l.useRenderElement)("p",e,{ref:t,props:[{id:d},s]})});e.s(["DialogDescription",0,f],209793);var b=e.i(61487);let x=((t={}).nestedDialogs="--nested-dialogs",t),h=((a={})[a.open=o.CommonPopupDataAttributes.open]="open",a[a.closed=o.CommonPopupDataAttributes.closed]="closed",a[a.startingStyle=o.CommonPopupDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=o.CommonPopupDataAttributes.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a);var y=e.i(733332);let C=n.createContext(void 0);function v(){let e=n.useContext(C);if(void 0===e)throw Error((0,y.default)(26));return e}e.s(["DialogPortalContext",0,C,"useDialogPortalContext",0,v],625834);var S=e.i(137584),w=e.i(673327),$=e.i(264111),D=e.i(843476);let j={...o.popupStateMapping,...i.transitionStatusMapping,nestedDialogOpen:e=>e?{[h.nestedDialogOpen]:""}:null},R=n.forwardRef(function(e,t){let{render:a,className:n,style:o,finalFocus:i,initialFocus:s,...u}=e,{store:d}=(0,r.useDialogRootContext)(),c=d.useState("descriptionElementId"),p=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),m=d.useState("popupProps"),f=d.useState("modal"),h=d.useState("mounted"),y=d.useState("nested"),C=d.useState("nestedOpenDialogCount"),R=d.useState("open"),O=d.useState("openMethod"),N=d.useState("titleElementId"),k=d.useState("transitionStatus"),E=d.useState("role"),M=g.useState("floatingId"),P=u.id??M;v(),(0,S.useOpenChangeComplete)({open:R,ref:d.context.popupRef,onComplete(){R&&d.context.onOpenChangeComplete?.(!0)}});let T=void 0===s?(0,$.createDefaultInitialFocus)(d.context.popupRef):s,A=d.useStateSetter("popupElement"),I=(0,l.useRenderElement)("div",e,{state:{open:R,nested:y,transitionStatus:k,nestedDialogOpen:C>0},props:[m,{id:P,"aria-labelledby":N??void 0,"aria-describedby":c??void 0,role:E,...$.FOCUSABLE_POPUP_PROPS,hidden:!h,onKeyDown(e){w.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[x.nestedDialogs]:C}},u],ref:[t,d.context.popupRef,A],stateAttributesMapping:j});return(0,D.jsx)(b.FloatingFocusManager,{context:g,openInteractionType:O,disabled:!h,closeOnFocusOut:!p,initialFocus:T,returnFocus:i,modal:!1!==f,restoreFocus:"popup",children:I})});e.s(["DialogPopup",0,R],784324);var O=e.i(144394),N=e.i(726674),k=e.i(426);let E=n.forwardRef(function(e,t){let{keepMounted:a=!1,...n}=e,{store:l}=(0,r.useDialogRootContext)(),o=l.useState("mounted"),i=l.useState("modal"),s=l.useState("open");return o||a?(0,D.jsx)(C.Provider,{value:a,children:(0,D.jsxs)(N.FloatingPortal,{ref:t,...n,children:[o&&!0===i&&(0,D.jsx)(k.InternalBackdrop,{ref:l.context.internalBackdropRef,inert:(0,O.inertValue)(!s)}),e.children]})}):null});e.s(["DialogPortal",0,E],264951)},67530,e=>{"use strict";var t=e.i(271645),a=e.i(145484),n=e.i(956789),r=e.i(17989),l=e.i(647554),o=e.i(675606),i=e.i(56434),s=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:o,isDrawer:i}){let u=e.useState("open"),d=e.useState("disablePointerDismissal"),c=e.useState("modal"),p=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,f]=t.useState(0),[b,x]=t.useState(0),h=0===m,y=(0,r.useDismiss)(g,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===c?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let a=(0,l.getTarget)(t);return!!h&&!d&&(!c||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===a||e.context.backdropRef.current===a||(0,l.contains)(a,p)&&!a?.hasAttribute("data-base-ui-portal"))},escapeKey:h});(0,a.useScrollLock)(u&&!0===c,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{f(e),x(t)}),e.useContextCallback("onNestedDialogClose",()=>{f(0),x(0)}),t.useEffect(()=>(o?.onNestedDialogOpen&&u&&o.onNestedDialogOpen(m+1,b+ +!!i),o?.onNestedDialogClose&&!u&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&u&&o.onNestedDialogClose()}),[i,u,m,b,o]);let C=y.reference??n.EMPTY_OBJECT,v=y.trigger??n.EMPTY_OBJECT,S=y.floating??n.EMPTY_OBJECT;return(0,s.usePopupInteractionProps)(e,{activeTriggerProps:C,inactiveTriggerProps:v,popupProps:S,nestedOpenDialogCount:m,nestedOpenDrawerCount:b}),null},"useDialogRoot",0,function(e){let{store:a,actionsRef:n}=e,r=a.useState("open");(0,s.usePopupRootSync)(a,r),(0,s.useImplicitActiveTrigger)(a);let{forceUnmount:l}=(0,s.useOpenStateTransitions)(r,a),u=t.useCallback(()=>{a.setOpen(!1,(0,o.createChangeEventDetails)(i.REASONS.imperativeAction))},[a]);t.useImperativeHandle(n,()=>({unmount:l,close:u}),[l,u])}])},366250,301807,e=>{"use strict";var t=e.i(271645),a=e.i(713203),n=e.i(67530),r=e.i(108821),l=e.i(616269),o=e.i(301252),i=e.i(116786),s=e.i(990627),u=e.i(264111);let d={...i.popupStoreSelectors,modal:(0,l.createSelector)(e=>e.modal),nested:(0,l.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,l.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,l.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,l.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,l.createSelector)(e=>e.openMethod),descriptionElementId:(0,l.createSelector)(e=>e.descriptionElementId),titleElementId:(0,l.createSelector)(e=>e.titleElementId),viewportElement:(0,l.createSelector)(e=>e.viewportElement),role:(0,l.createSelector)(e=>e.role)};class c extends o.ReactStore{constructor(e,a,n=!1){const r=new s.PopupTriggerMap,l=function(e={}){return{...(0,i.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);l.floatingRootContext=(0,i.createPopupFloatingRootContext)(r,a,n),super(l,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},d)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a={open:e};(0,u.setPopupOpenState)(a,e,t.trigger),this.update(a)};static useStore(e,t){return(0,u.usePopupStore)(e,(e,a)=>new c(t,e,a),!0).store}}e.s(["DialogStore",0,c],301807);var p=e.i(843476);e.s(["useRenderDialogRoot",0,function(e,l="dialog"){let{children:o,open:i,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:d,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:f,handle:b,triggerId:x,defaultTriggerId:h=null}=e,y="alert-dialog"===l,C=(0,r.useDialogRootContext)(!0),v={modal:!!y||m,disablePointerDismissal:y||g,nested:!!C,role:y?"alertdialog":"dialog"},S=c.useStore(b?.store,{open:s,openProp:i,activeTriggerId:h,triggerIdProp:x,...v});(0,a.useOnFirstRender)(()=>{let e=void 0===i&&!1===S.state.open&&!0===s?{open:!0,activeTriggerId:h}:null;y?S.update(e?{...v,...e}:v):e&&S.update(e)}),S.useControlledProp("openProp",i),S.useControlledProp("triggerIdProp",x),S.useSyncedValues(v),S.useContextCallback("onOpenChange",u),S.useContextCallback("onOpenChangeComplete",d);let w=S.useState("open"),$=S.useState("mounted"),D=S.useState("payload");(0,n.useDialogRoot)({store:S,actionsRef:f});let j=t.useMemo(()=>({store:S}),[S]);return(0,p.jsx)(r.IsDrawerContext.Provider,{value:!1,children:(0,p.jsxs)(r.DialogRootContext.Provider,{value:j,children:[(w||$)&&(0,p.jsx)(n.DialogInteractions,{store:S,parentContext:C?.store.context,isDrawer:"drawer"===l}),"function"==typeof o?o({payload:D}):o]})})}],366250)},974217,e=>{"use strict";e.i(247167);var t,a=e.i(271645),n=e.i(552245),r=e.i(405005),l=e.i(209407),o=e.i(108821),i=e.i(625834);let s=((t={})[t.open=r.CommonPopupDataAttributes.open]="open",t[t.closed=r.CommonPopupDataAttributes.closed]="closed",t[t.startingStyle=r.CommonPopupDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=r.CommonPopupDataAttributes.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t),u={...r.popupStateMapping,...l.transitionStatusMapping,nested:e=>e?{[s.nested]:""}:null,nestedDialogOpen:e=>e?{[s.nestedDialogOpen]:""}:null},d=a.forwardRef(function(e,t){let{render:a,className:r,style:l,children:s,...d}=e,c=(0,i.useDialogPortalContext)(),{store:p}=(0,o.useDialogRootContext)(),g=p.useState("open"),m=p.useState("nested"),f=p.useState("transitionStatus"),b=p.useState("nestedOpenDialogCount"),x=p.useState("mounted"),h=p.useStateSetter("viewportElement");return(0,n.useRenderElement)("div",e,{enabled:c||x,state:{open:g,nested:m,transitionStatus:f,nestedDialogOpen:b>0},ref:[t,h],stateAttributesMapping:u,props:[{role:"presentation",hidden:!x,style:{pointerEvents:g?void 0:"none"},children:s},d]})});e.s(["DialogViewport",0,d],974217)},77173,313488,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(108821),n=e.i(552245),r=e.i(788015);let l=t.forwardRef(function(e,t){let{render:l,className:o,style:i,id:s,...u}=e,{store:d}=(0,a.useDialogRootContext)(),c=(0,r.useBaseUiId)(s);return d.useSyncedValueWithCleanup("titleElementId",c),(0,n.useRenderElement)("h2",e,{ref:t,props:[{id:c},u]})});e.s(["DialogTitle",0,l],77173);var o=e.i(733332),i=e.i(540886),s=e.i(405005),u=e.i(638396),d=e.i(264111),c=e.i(385689),p=e.i(32199);let g=t.forwardRef(function(e,l){let{render:g,className:m,style:f,disabled:b=!1,nativeButton:x=!0,id:h,payload:y,handle:C,...v}=e,S=(0,a.useDialogRootContext)(!0),w=C?.store??S?.store;if(!w)throw Error((0,o.default)(79));let $=(0,r.useBaseUiId)(h),D=w.useState("floatingRootContext"),j=w.useState("isOpenedByTrigger",$),R=w.useState("triggerPopupId",$),O=t.useRef(null),{registerTrigger:N,isMountedByThisTrigger:k}=(0,d.useTriggerDataForwarding)($,O,w,{payload:y}),{getButtonProps:E,buttonRef:M}=(0,i.useButton)({disabled:b,native:x}),P=(0,c.useClick)(D,{enabled:null!=D}),T=(0,p.useOpenMethodTriggerProps)(()=>w.select("open"),e=>{w.set("openMethod",e)}),A=w.useState("triggerProps",k);return(0,n.useRenderElement)("button",e,{state:{disabled:b,open:j},ref:[M,l,N,O],props:[P.reference,A,T,{[u.CLICK_TRIGGER_IDENTIFIER]:"",id:$,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":R},v,E],stateAttributesMapping:s.triggerOpenStateMapping})});e.s(["DialogTrigger",0,g],313488)},325326,e=>{"use strict";var t=e.i(301807),a=e.i(675606),n=e.i(56434);class r{constructor(e){this.store=e??new t.DialogStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["DialogHandle",0,r,"createDialogHandle",0,function(){return new r}])},353753,e=>{"use strict";e.s([],914651),e.i(914651);var t=e.i(402820),a=e.i(156736),n=e.i(209793),r=e.i(784324),l=e.i(264951),o=e.i(271645),i=e.i(108821),s=e.i(366250),u=e.i(974217),d=e.i(77173),c=e.i(313488),p=e.i(325326);e.s(["Backdrop",()=>t.DialogBackdrop,"Close",()=>a.DialogClose,"Description",()=>n.DialogDescription,"Handle",()=>p.DialogHandle,"Popup",()=>r.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){let t=o.useContext(i.IsDrawerContext)?"drawer":"dialog";return(0,s.useRenderDialogRoot)(e,t)},"Title",()=>d.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>u.DialogViewport,"createHandle",()=>p.createDialogHandle],828376);var g=e.i(828376);e.s(["Dialog",0,g],353753)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("label",{ref:r,"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));r.displayName="Label",e.s(["Label",0,r])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),n=e.i(242064),r=e.i(529681);let l=e=>{let{prefixCls:n,className:r,style:l,size:o,shape:i}=e,s=(0,a.default)({[`${n}-lg`]:"large"===o,[`${n}-sm`]:"small"===o}),u=(0,a.default)({[`${n}-circle`]:"circle"===i,[`${n}-square`]:"square"===i,[`${n}-round`]:"round"===i}),d=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,a.default)(n,s,u,r),style:Object.assign(Object.assign({},d),l)})};e.i(296059);var o=e.i(694758),i=e.i(915654),s=e.i(246422),u=e.i(838378);let d=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),c=e=>({height:e,lineHeight:(0,i.unit)(e)}),p=e=>Object.assign({width:e},c(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},c(e)),m=e=>Object.assign({width:e},c(e)),f=(e,t,a)=>{let{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},c(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:i,controlHeight:s,controlHeightLG:u,controlHeightSM:c,gradientFromColor:x,padding:h,marginSM:y,borderRadius:C,titleHeight:v,blockRadius:S,paragraphLiHeight:w,controlHeightXS:$,paragraphMarginTop:D}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},p(u)),[`${a}-sm`]:Object.assign({},p(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:v,background:x,borderRadius:S,[`+ ${r}`]:{marginBlockStart:c}},[r]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:y,[`+ ${r}`]:{marginBlockStart:D}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:i(n).mul(2).equal(),minWidth:i(n).mul(2).equal()},b(n,i))},f(e,n,a)),{[`${a}-lg`]:Object.assign({},b(r,i))}),f(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},b(l,i))}),f(e,l,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},p(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(r)),[`${t}${t}-sm`]:Object.assign({},p(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:a},g(t,i)),[`${n}-lg`]:Object.assign({},g(r,i)),[`${n}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},m(l(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},m(a)),{maxWidth:l(a).mul(4).equal(),maxHeight:l(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
${n},
${r} > li,
${a},
${l},
${o},
${i}
- `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:u,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),h=e=>{let{prefixCls:n,className:r,style:l,rows:o=0}=e,i=Array.from({length:o}).map((a,n)=>t.createElement("li",{key:n,style:{width:((e,t)=>{let{width:a,rows:n=2}=t;return Array.isArray(a)?a[e]:n-1===e?a:void 0})(n,e)}}));return t.createElement("ul",{className:(0,a.default)(n,r),style:l},i)},y=({prefixCls:e,className:n,width:r,style:l})=>t.createElement("h3",{className:(0,a.default)(e,n),style:Object.assign({width:r},l)});function C(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:r,loading:o,className:i,rootClassName:s,style:d,children:u,avatar:c=!1,title:p=!0,paragraph:g=!0,active:m,round:f}=e,{getPrefixCls:b,direction:v,className:S,style:w}=(0,n.useComponentConfig)("skeleton"),$=b("skeleton",r),[D,j,R]=x($);if(o||!("loading"in e)){let e,n,r=!!c,o=!!p,u=!!g;if(r){let a=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(c));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},a)))}if(o||u){let e,a;if(o){let a=Object.assign(Object.assign({prefixCls:`${$}-title`},!r&&u?{width:"38%"}:r&&u?{width:"50%"}:{}),C(p));e=t.createElement(y,Object.assign({},a))}if(u){let e,n=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},r&&o||(e.width="61%"),!r&&o?e.rows=3:e.rows=2,e)),C(g));a=t.createElement(h,Object.assign({},n))}n=t.createElement("div",{className:`${$}-content`},e,a)}let b=(0,a.default)($,{[`${$}-with-avatar`]:r,[`${$}-active`]:m,[`${$}-rtl`]:"rtl"===v,[`${$}-round`]:f},S,i,s,j,R);return D(t.createElement("div",{className:b,style:Object.assign(Object.assign({},w),d)},e,n))}return null!=u?u:null};v.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:u=!1,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:c},h))))},v.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,shape:u="circle",size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls","className"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:u,size:c},h))))},v.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:u,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:c},h))))},v.Image=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(n.ConfigContext),u=d("skeleton",r),[c,p,g]=x(u),m=(0,a.default)(u,`${u}-element`,{[`${u}-active`]:s},l,o,p,g);return c(t.createElement("div",{className:m},t.createElement("div",{className:(0,a.default)(`${u}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${u}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${u}-image-path`})))))},v.Node=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s,children:d}=e,{getPrefixCls:u}=t.useContext(n.ConfigContext),c=u("skeleton",r),[p,g,m]=x(c),f=(0,a.default)(c,`${c}-element`,{[`${c}-active`]:s},g,l,o,m);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,a.default)(`${c}-image`,l),style:i},d)))},e.s(["default",0,v],185793)},922611,e=>{"use strict";var t=e.i(271645),a=e.i(175066);function n(){}let r=t.createContext({add:n,remove:n});e.s(["usePanelRef",0,function(e){let n=t.useContext(r),l=t.useRef(null);return(0,a.default)(t=>{if(t){let a=e?t.querySelector(e):t;a&&(n.add(a),l.current=a)}else n.remove(l.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let a=(e,t=0,a=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let r={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",r);let l=e<0?"-":"",o=Math.abs(e),i=o,s="";return o>=1e6?(i=o/1e6,s="M"):o>=1e3&&(i=o/1e3,s="K"),`${l}${i.toLocaleString("en-US",r)}${s}`},n=async(e,a="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return r(e,a);try{return await navigator.clipboard.writeText(e),t.default.success(a),!0}catch(t){return console.error("Clipboard API failed: ",t),r(e,a)}},r=(e,a)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let r=document.execCommand("copy");if(document.body.removeChild(n),r)return t.default.success(a),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,n,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let n=a(e,t,!1,!1);if(0===Number(n.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${n}`},"updateExistingKeys",0,function(e,t){let a=structuredClone(e);for(let[e,n]of Object.entries(t))e in a&&(a[e]=n);return a}])},112179,581070,e=>{"use strict";var t=e.i(843476),a=e.i(487486),n=e.i(115504),r=e.i(746798);function l({content:e,trigger:a}){return(0,t.jsx)(r.TooltipProvider,{delay:300,children:(0,t.jsxs)(r.Tooltip,{children:[(0,t.jsx)(r.TooltipTrigger,{render:a}),(0,t.jsx)(r.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,l],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:r,tooltip:i,dataTestId:s}){let d=(0,t.jsx)(a.Badge,{variant:"outline","data-testid":s,className:(0,n.cn)("whitespace-nowrap font-normal",o[e]),children:r});return i?(0,t.jsx)(l,{content:i,trigger:d}):d}],112179)},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),n=e.i(243652),r=e.i(602869),l=e.i(135214);let o=(0,n.createQueryKeys)("models"),i=(0,n.createQueryKeys)("modelHub"),s=(0,n.createQueryKeys)("autoRouterModelGroups"),d=(0,n.createQueryKeys)("allProxyModels");(0,n.createQueryKeys)("selectedTeamModels");let u=(0,n.createQueryKeys)("infiniteModels"),c=(0,n.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),m=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),f=async(e,t,a)=>{let n=await (0,r.modelInfoCall)(e,t,a,1,1e3),l=n?.total_pages??1;return[n,...await Promise.all(Array.from({length:Math.max(0,l-1)},(n,l)=>(0,r.modelInfoCall)(e,t,a,l+2,1e3)))].flatMap(e=>e?.data??[])};e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,l.default)();return(0,t.useQuery)({queryKey:d.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,a,n,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&n)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,l.default)(),{data:r}=(0,t.useQuery)({queryKey:s.list({filters:{...a&&{userId:a},...n&&{userRole:n}}}),queryFn:async()=>await f(e,a,n),enabled:!!(e&&a&&n),select:m});return r??p},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:n,userId:o,userRole:i}=(0,l.default)();return(0,a.useInfiniteQuery)({queryKey:u.list({filters:{...o&&{userId:o},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,r.modelInfoCall)(n,o,i,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,n,i,s,d,u)=>{let{accessToken:c,userId:p,userRole:g}=(0,l.default)();return(0,t.useQuery)({queryKey:o.list({filters:{...p&&{userId:p},...g&&{userRole:g},page:e,size:a,...n&&{search:n},...i&&{modelId:i},...s&&{teamId:s},...d&&{sortBy:d},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,p,g,e,a,n,i,s,d,u),enabled:!!(c&&p&&g)})},"useUserModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,l.default)();return(0,t.useQuery)({queryKey:c.list({}),queryFn:async()=>(await (0,r.modelAvailableCall)(e,a,n)).data.map(e=>e.id),enabled:!!(e&&a&&n)})}])},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(199931),r=e.i(625901),l=e.i(487486),o=e.i(115504);let i=new Set,s=(0,a.createContext)(i);function d(e){let t=(0,a.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:a}){return(0,t.jsx)(n.Waypoints,{size:e,className:a,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let a=(0,r.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:a,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:a}){return d(e)?(0,t.jsxs)(l.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",a),children:[(0,t.jsx)(n.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,d],548151);var u=e.i(581070);let c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${c[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${c[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:a="datetime",fallback:n="-"}){let r,l,o,i=e?new Date(e):null;return!i||Number.isNaN(i.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:n}):(0,t.jsx)(u.CellTooltip,{content:(r=Intl.DateTimeFormat().resolvedOptions().timeZone,l=`${c[i.getMonth()]} ${i.getDate()}, ${i.getFullYear()}`,o=`${p(i.getHours())}:${p(i.getMinutes())}:${p(i.getSeconds())}`,`${l}, ${o} (${r})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(i,a)})})},"formatCellDate",0,g],200208);var m=e.i(174886),f=e.i(500330);let b={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:a="pill",onClick:n,copyable:r=!1,truncate:l=!0,fallback:i="-",tooltip:s,disabled:d=!1,dataTestId:c,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:i});let g=!!n&&!d,x=(0,o.cn)(b[a].base,g&&b[a].clickable,l&&"block max-w-[15ch] truncate",d&&"opacity-50",p),h=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":c,onClick:()=>n(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":c,children:e}),y=(0,t.jsx)(u.CellTooltip,{content:s??e,trigger:h});return r?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[y,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,f.copyToClipboard)(e)},children:(0,t.jsx)(m.Copy,{className:"size-3"})})]}):y}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:a,badge:n,onClick:r,className:l,titleClassName:i}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",i),children:e}),(null!=a&&""!==a||null!=n)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=a&&""!==a&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:a}),n]})]});return null!=r?(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",l),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",l),children:s})}],997422);let h={hasModelAccess:!1,label:"Management"},y={hasModelAccess:!1,label:"Read-only"},C={hasModelAccess:!1,label:"SCIM"},v={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),w=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?h:"read_only"===t?y:Array.isArray(e)&&0!==e.length?e.every(S)?C:w(e,"management_routes")?h:w(e,"info_routes")?y:v:v],146512)},355619,e=>{"use strict";var t=e.i(602869);let a=async(e,a,n)=>{try{if(null===e||null===a)return;if(null!==n){let r=(await (0,t.modelAvailableCall)(n,e,a,!0,null,!0)).data.map(e=>e.id),l=[],o=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):o.push(e)}),[...l,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,a,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let a=[],n=[];return e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));n.push(...l),a.push(e)}else n.push(e)}),[...a,...n].filter((e,t,a)=>a.indexOf(e)===t)}])},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var a=e.i(843476),n=e.i(146512),r=e.i(355619),l=e.i(487486);let o="all-proxy-models",i=e=>{if(e===o)return"All Proxy Models";let t=(0,r.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:r=3,allowedRoutes:s,keyType:d}){if(!Array.isArray(e)||0===e.length){let e=(0,n.deriveKeyModelScope)(s,d);return e.hasModelAccess?(0,a.jsx)(l.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,a.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,a.jsx)(l.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let u=e.slice(0,r),c=e.slice(r);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[u.map((e,t)=>(0,a.jsx)(l.Badge,{variant:e===o?"secondary":"outline",children:i(e)},t)),c.length>0&&(0,a.jsx)(t.CellTooltip,{content:(0,a.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:c.map((e,t)=>(0,a.jsx)("span",{children:i(e)},t))}),trigger:(0,a.jsxs)(l.Badge,{variant:"outline",className:"cursor-default",children:["+",c.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:n="-",showZero:r=!1}){return null==e||Number.isNaN(e)?(0,a.jsx)("span",{className:"text-muted-foreground",children:n}):0===e?r?(0,a.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,a.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var d=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:n}){let r="number"!=typeof e||Number.isNaN(e)?0:e,l=t??n??null,o=null==t&&null!=n,i="number"==typeof l&&l>0,u=i?r/l*100:0,c=r>0?(0,s.getSpendString)(r,4):"$0.00",p=null===l?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(l)}${o?" (Team)":""}`;return(0,a.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,a.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,a.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:c})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:p})]}),i&&(0,a.jsx)(d.Meter,{value:r,max:l,"aria-valuetext":`${c} of $${(0,s.formatNumberWithCommas)(l)}`,children:(0,a.jsx)(d.MeterTrack,{children:(0,a.jsx)(d.MeterIndicator,{tone:u>100?"over":u>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)},233565,e=>{"use strict";var t=e.i(246349);e.s(["ChevronRightIcon",()=>t.default])}]);
\ No newline at end of file
+ `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,u.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),h=e=>{let{prefixCls:n,className:r,style:l,rows:o=0}=e,i=Array.from({length:o}).map((a,n)=>t.createElement("li",{key:n,style:{width:((e,t)=>{let{width:a,rows:n=2}=t;return Array.isArray(a)?a[e]:n-1===e?a:void 0})(n,e)}}));return t.createElement("ul",{className:(0,a.default)(n,r),style:l},i)},y=({prefixCls:e,className:n,width:r,style:l})=>t.createElement("h3",{className:(0,a.default)(e,n),style:Object.assign({width:r},l)});function C(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:r,loading:o,className:i,rootClassName:s,style:u,children:d,avatar:c=!1,title:p=!0,paragraph:g=!0,active:m,round:f}=e,{getPrefixCls:b,direction:v,className:S,style:w}=(0,n.useComponentConfig)("skeleton"),$=b("skeleton",r),[D,j,R]=x($);if(o||!("loading"in e)){let e,n,r=!!c,o=!!p,d=!!g;if(r){let a=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(c));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},a)))}if(o||d){let e,a;if(o){let a=Object.assign(Object.assign({prefixCls:`${$}-title`},!r&&d?{width:"38%"}:r&&d?{width:"50%"}:{}),C(p));e=t.createElement(y,Object.assign({},a))}if(d){let e,n=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},r&&o||(e.width="61%"),!r&&o?e.rows=3:e.rows=2,e)),C(g));a=t.createElement(h,Object.assign({},n))}n=t.createElement("div",{className:`${$}-content`},e,a)}let b=(0,a.default)($,{[`${$}-with-avatar`]:r,[`${$}-active`]:m,[`${$}-rtl`]:"rtl"===v,[`${$}-round`]:f},S,i,s,j,R);return D(t.createElement("div",{className:b,style:Object.assign(Object.assign({},w),u)},e,n))}return null!=d?d:null};v.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,block:d=!1,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:c},h))))},v.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,shape:d="circle",size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls","className"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:d,size:c},h))))},v.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,block:d,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:c},h))))},v.Image=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s}=e,{getPrefixCls:u}=t.useContext(n.ConfigContext),d=u("skeleton",r),[c,p,g]=x(d),m=(0,a.default)(d,`${d}-element`,{[`${d}-active`]:s},l,o,p,g);return c(t.createElement("div",{className:m},t.createElement("div",{className:(0,a.default)(`${d}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},v.Node=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s,children:u}=e,{getPrefixCls:d}=t.useContext(n.ConfigContext),c=d("skeleton",r),[p,g,m]=x(c),f=(0,a.default)(c,`${c}-element`,{[`${c}-active`]:s},g,l,o,m);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,a.default)(`${c}-image`,l),style:i},u)))},e.s(["default",0,v],185793)},922611,e=>{"use strict";var t=e.i(271645),a=e.i(175066);function n(){}let r=t.createContext({add:n,remove:n});e.s(["usePanelRef",0,function(e){let n=t.useContext(r),l=t.useRef(null);return(0,a.default)(t=>{if(t){let a=e?t.querySelector(e):t;a&&(n.add(a),l.current=a)}else n.remove(l.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let a=(e,t=0,a=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let r={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",r);let l=e<0?"-":"",o=Math.abs(e),i=o,s="";return o>=1e6?(i=o/1e6,s="M"):o>=1e3&&(i=o/1e3,s="K"),`${l}${i.toLocaleString("en-US",r)}${s}`},n=async(e,a="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return r(e,a);try{return await navigator.clipboard.writeText(e),t.default.success(a),!0}catch(t){return console.error("Clipboard API failed: ",t),r(e,a)}},r=(e,a)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let r=document.execCommand("copy");if(document.body.removeChild(n),r)return t.default.success(a),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,n,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let n=a(e,t,!1,!1);if(0===Number(n.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${n}`},"updateExistingKeys",0,function(e,t){let a=structuredClone(e);for(let[e,n]of Object.entries(t))e in a&&(a[e]=n);return a}])},112179,581070,e=>{"use strict";var t=e.i(843476),a=e.i(487486),n=e.i(115504),r=e.i(746798);function l({content:e,trigger:a}){return(0,t.jsx)(r.TooltipProvider,{delay:300,children:(0,t.jsxs)(r.Tooltip,{children:[(0,t.jsx)(r.TooltipTrigger,{render:a}),(0,t.jsx)(r.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,l],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:r,tooltip:i,dataTestId:s}){let u=(0,t.jsx)(a.Badge,{variant:"outline","data-testid":s,className:(0,n.cn)("whitespace-nowrap font-normal",o[e]),children:r});return i?(0,t.jsx)(l,{content:i,trigger:u}):u}],112179)},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),n=e.i(912598),r=e.i(243652),l=e.i(602869),o=e.i(135214);let i=(0,r.createQueryKeys)("models"),s=(0,r.createQueryKeys)("modelHub"),u=(0,r.createQueryKeys)("allProxyModels");(0,r.createQueryKeys)("selectedTeamModels");let d=(0,r.createQueryKeys)("infiniteModels"),c=(0,r.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),m=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),f=e=>e.filter(g),b=async(e,t,a)=>{let n=await (0,l.modelInfoCall)(e,t,a,1,1e3),r=n?.total_pages??1;return[n,...await Promise.all(Array.from({length:Math.max(0,r-1)},(n,r)=>(0,l.modelInfoCall)(e,t,a,r+2,1e3)))].flatMap(e=>e?.data??[])},x=(e,t)=>i.list({filters:{scope:"autoRouters",...e&&{userId:e},...t&&{userRole:t}}});e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,a,n,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&n)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)(),{data:r}=(0,t.useQuery)({queryKey:x(a,n),queryFn:async()=>await b(e,a,n),enabled:!!(e&&a&&n),select:m});return r??p},"useAutoRouters",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:x(a,n),queryFn:async()=>await b(e,a,n),enabled:!!(e&&a&&n),select:f})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:n,userId:r,userRole:i}=(0,o.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...r&&{userId:r},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,l.modelInfoCall)(n,r,i,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let e=(0,n.useQueryClient)();return async()=>{await e.invalidateQueries({queryKey:i.lists()})}},"useModelHub",0,()=>{let{accessToken:e}=(0,o.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,n,r,s,u,d,c=!1)=>{let{accessToken:p,userId:g,userRole:m}=(0,o.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...g&&{userId:g},...m&&{userRole:m},page:e,size:a,...n&&{search:n},...r&&{modelId:r},...s&&{teamId:s},...u&&{sortBy:u},...d&&{sortOrder:d},...c&&{excludeAutoRouters:"true"}}}),queryFn:async()=>await (0,l.modelInfoCall)(p,g,m,e,a,n,r,s,u,d,c),enabled:!!(p&&g&&m)})},"useUserModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:c.list({}),queryFn:async()=>(await (0,l.modelAvailableCall)(e,a,n)).data.map(e=>e.id),enabled:!!(e&&a&&n)})}])},355619,e=>{"use strict";var t=e.i(602869);let a=async(e,a,n)=>{try{if(null===e||null===a)return;if(null!==n){let r=(await (0,t.modelAvailableCall)(n,e,a,!0,null,!0)).data.map(e=>e.id),l=[],o=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):o.push(e)}),[...l,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,a,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let a=[],n=[];return e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));n.push(...l),a.push(e)}else n.push(e)}),[...a,...n].filter((e,t,a)=>a.indexOf(e)===t)}])},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(199931),r=e.i(625901),l=e.i(487486),o=e.i(115504);let i=new Set,s=(0,a.createContext)(i);function u(e){let t=(0,a.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:a}){return(0,t.jsx)(n.Waypoints,{size:e,className:a,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let a=(0,r.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:a,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:a}){return u(e)?(0,t.jsxs)(l.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",a),children:[(0,t.jsx)(n.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,u],548151);var d=e.i(581070);let c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${c[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${c[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:a="datetime",fallback:n="-"}){let r,l,o,i=e?new Date(e):null;return!i||Number.isNaN(i.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:n}):(0,t.jsx)(d.CellTooltip,{content:(r=Intl.DateTimeFormat().resolvedOptions().timeZone,l=`${c[i.getMonth()]} ${i.getDate()}, ${i.getFullYear()}`,o=`${p(i.getHours())}:${p(i.getMinutes())}:${p(i.getSeconds())}`,`${l}, ${o} (${r})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(i,a)})})},"formatCellDate",0,g],200208);var m=e.i(174886),f=e.i(500330);let b={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:a="pill",onClick:n,copyable:r=!1,truncate:l=!0,fallback:i="-",tooltip:s,disabled:u=!1,dataTestId:c,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:i});let g=!!n&&!u,x=(0,o.cn)(b[a].base,g&&b[a].clickable,l&&"block max-w-[15ch] truncate",u&&"opacity-50",p),h=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":c,onClick:()=>n(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":c,children:e}),y=(0,t.jsx)(d.CellTooltip,{content:s??e,trigger:h});return r?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[y,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,f.copyToClipboard)(e)},children:(0,t.jsx)(m.Copy,{className:"size-3"})})]}):y}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:a,badge:n,onClick:r,className:l,titleClassName:i}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",i),children:e}),(null!=a&&""!==a||null!=n)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=a&&""!==a&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:a}),n]})]});return null!=r?(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",l),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",l),children:s})}],997422);let h={hasModelAccess:!1,label:"Management"},y={hasModelAccess:!1,label:"Read-only"},C={hasModelAccess:!1,label:"SCIM"},v={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),w=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?h:"read_only"===t?y:Array.isArray(e)&&0!==e.length?e.every(S)?C:w(e,"management_routes")?h:w(e,"info_routes")?y:v:v],146512)},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var a=e.i(843476),n=e.i(146512),r=e.i(355619),l=e.i(487486);let o="all-proxy-models",i=e=>{if(e===o)return"All Proxy Models";let t=(0,r.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:r=3,allowedRoutes:s,keyType:u}){if(!Array.isArray(e)||0===e.length){let e=(0,n.deriveKeyModelScope)(s,u);return e.hasModelAccess?(0,a.jsx)(l.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,a.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,a.jsx)(l.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let d=e.slice(0,r),c=e.slice(r);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[d.map((e,t)=>(0,a.jsx)(l.Badge,{variant:e===o?"secondary":"outline",children:i(e)},t)),c.length>0&&(0,a.jsx)(t.CellTooltip,{content:(0,a.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:c.map((e,t)=>(0,a.jsx)("span",{children:i(e)},t))}),trigger:(0,a.jsxs)(l.Badge,{variant:"outline",className:"cursor-default",children:["+",c.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:n="-",showZero:r=!1}){return null==e||Number.isNaN(e)?(0,a.jsx)("span",{className:"text-muted-foreground",children:n}):0===e?r?(0,a.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,a.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var u=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:n}){let r="number"!=typeof e||Number.isNaN(e)?0:e,l=t??n??null,o=null==t&&null!=n,i="number"==typeof l&&l>0,d=i?r/l*100:0,c=r>0?(0,s.getSpendString)(r,4):"$0.00",p=null===l?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(l)}${o?" (Team)":""}`;return(0,a.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,a.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,a.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:c})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:p})]}),i&&(0,a.jsx)(u.Meter,{value:r,max:l,"aria-valuetext":`${c} of $${(0,s.formatNumberWithCommas)(l)}`,children:(0,a.jsx)(u.MeterTrack,{children:(0,a.jsx)(u.MeterIndicator,{tone:d>100?"over":d>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)},233565,e=>{"use strict";var t=e.i(246349);e.s(["ChevronRightIcon",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js b/litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js
deleted file mode 100644
index fc1511d3d2a..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let n=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));l.displayName="CardTitle";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));s.displayName="CardDescription";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));i.displayName="CardAction";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,i,"CardContent",0,d,"CardDescription",0,s,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,l])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:o=0,side:n="bottom",sideOffset:l=4,className:s,...i}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:n,sideOffset:l,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...i})})})},"DropdownMenuItem",0,function({className:e,inset:o,variant:n="default",...l}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...l})},"DropdownMenuSeparator",0,function({className:e,...o}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...o})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},677572,370359,405934,e=>{"use strict";var t,r,a,o=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),l=e.i(951437),s=e.i(146376),i=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let m=n.createContext(void 0);function h(){let e=n.useContext(m);if(void 0===e)throw Error((0,u.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),p={tabActivationDirection:e=>({[g.activationDirection]:e})};var f=e.i(675606),b=e.i(56434);let x=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:h="horizontal",render:g,value:x,style:k,...y}=e,C=void 0!==e.defaultValue,w=n.useRef([]),[j,N]=n.useState(()=>new Map),[T,S]=(0,l.useControlled)({controlled:x,default:a,name:"Tabs",state:"value"}),M=void 0!==x,[R,_]=n.useState(()=>new Map),D=n.useRef(void 0),E=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of R.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[R]),[L,P]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:O}=L,z=O,A=!1;I!==T&&(z=v(I,T,h,R),A=null!=I&&null!=T&&null==E(T));let Y=A?I:T,H=I!==Y||O!==z;(0,s.useIsoLayoutEffect)(()=>{H&&P({previousValue:Y,tabActivationDirection:z})},[Y,H,z]);let F=(0,i.useStableCallback)((e,t)=>{t.activationDirection=v(T,e,h,R),u?.(e,t),t.isCanceled||S(e)}),B=(0,i.useStableCallback)((e,t)=>{u?.(e,(0,f.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,i.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),W=(0,i.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),$=n.useCallback(e=>j.get(e),[j]),q=n.useCallback(e=>{for(let t of R.values())if(e===t?.value)return t?.id},[R]),K=n.useMemo(()=>({getTabElementBySelectedValue:E,getTabIdByPanelValue:q,getTabPanelIdByValue:$,onValueChange:F,orientation:h,registerMountedTabPanel:V,setTabMap:_,unregisterMountedTabPanel:W,tabActivationDirection:z,value:T}),[E,q,$,F,h,V,_,W,z,T]),U=n.useMemo(()=>{for(let e of R.values())if(null!=e&&e.value===T)return e},[R,T]),G=n.useMemo(()=>{for(let e of R.values())if(null!=e&&!e.disabled)return e.value},[R]),X=n.useRef(!C),J=n.useRef(a),Q=n.useRef(C),Z=n.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(M)return;function e(e,t){S(e),P(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),X.current=!1}if(0===R.size){Z.current&&null!==T&&!D.current?.isConnected&&e(null,b.REASONS.missing);return}Z.current=!0,D.current=R.keys().next().value;let t=U?.disabled,r=null==U&&null!==T;if(t||T!==J.current||(Q.current=!1),Q.current&&t&&T===J.current)return;let a=X.current;if(t||r){let r=G??null;if(T===r){X.current=!1;return}let o=b.REASONS.missing;a?o=b.REASONS.initial:t&&(o=b.REASONS.disabled),e(r,o);return}a&&null!=U&&(B(T,b.REASONS.initial),X.current=!1)},[G,M,B,U,S,R,T]);let ee={orientation:h,tabActivationDirection:z},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:p});return(0,o.jsx)(m.Provider,{value:K,children:(0,o.jsx)(c.CompositeList,{elementsRef:w,children:et})})});function v(e,t,r,a){if(null==e||null==t)return"none";let o=null,n=null;for(let[r,l]of a.entries()){if(null==l)continue;let a=l.value??l.index;if(e===a&&(o=r),t===a&&(n=r),null!=o&&null!=n)break}if(null==o||null==n)return o!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let l=o.getBoundingClientRect(),s=n.getBoundingClientRect();if("horizontal"===r){if(s.leftl.left)return"right"}else{if(s.topl.top)return"down"}return"none"}var k=e.i(108868),y=e.i(788015),C=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var j=e.i(395530);let N=n.createContext(void 0);function T(){let e=n.useContext(N);if(void 0===e)throw Error((0,u.default)(65));return e}var S=e.i(647554);let M=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:o,value:l,id:i,nativeButton:c=!0,style:u,...m}=e,{value:g,getTabPanelIdByValue:x,orientation:v,tabActivationDirection:N}=h(),{activateOnFocus:M,highlightedTabIndex:R,onTabActivation:_,registerTabResizeObserverElement:D,setHighlightedTabIndex:E,tabsListElement:L}=T(),P=(0,y.useBaseUiId)(i),I=n.useMemo(()=>({disabled:a,id:P,value:l}),[a,P,l]),{compositeProps:O,compositeRef:z,index:A}=(0,j.useCompositeItem)({metadata:I}),Y=l===g,H=n.useRef(!1),F=n.useRef(null);(0,s.useIsoLayoutEffect)(()=>{let e=F.current;if(e)return D(e)},[D]),(0,s.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(Y&&A>-1&&R!==A){if(null!=L){let e=(0,S.activeElement)((0,k.ownerDocument)(L));if(e&&(0,S.contains)(L,e))return}a||E(A)}},[Y,A,R,E,a,L]);let{getButtonProps:B,buttonRef:V}=(0,C.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),W=x(l),$=n.useRef(!1),q=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:Y,orientation:v,tabActivationDirection:N},ref:[t,V,z,F],props:[O,{role:"tab","aria-controls":W,"aria-selected":Y,id:P,onClick:function(e){Y||a||_(l,(0,f.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){Y||(A>-1&&!a&&E(A),!a&&M&&(!$.current||$.current&&q.current)&&_(l,(0,f.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){Y||a||($.current=!0,e.button&&0!==e.button||(q.current=!0,(0,k.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){$.current=!1,q.current=!1},{once:!0})))},[w]:Y?"":void 0,onKeyDownCapture(){H.current=!0}},m,B],stateAttributesMapping:p})});var R=e.i(73364),_=e.i(802239),D=e.i(956789);function E(){return D.NOOP}function L(){return!1}function P(){return!0}let I=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var O=e.i(172410);let z={...p,activeTabPosition:()=>null,activeTabSize:()=>null},A=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:l=!1,style:s,...i}=e,{nonce:c}=(0,O.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:m,tabActivationDirection:g,value:p}=h(),{tabsListElement:f,registerIndicatorUpdateListener:b}=T(),x=(0,_.useSyncExternalStore)(E,L,P),v=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>b(v),[b,v]);let k=0,y=0,C=0,w=0,j=0,N=0,S=!1;if(null!=p&&null!=f){let e=u(p);if(null!=e){S=!0;let{width:t,height:r}=(0,R.getCssDimensions)(e),{width:a,height:o}=(0,R.getCssDimensions)(f),n=e.getBoundingClientRect(),l=f.getBoundingClientRect(),s=a>0?l.width/a:1,i=o>0?l.height/o:1;if(Math.abs(s)>Number.EPSILON&&Math.abs(i)>Number.EPSILON){let e=n.left-l.left,t=n.top-l.top;k=e/s+f.scrollLeft-f.clientLeft,C=t/i+f.scrollTop-f.clientTop}else k=e.offsetLeft,C=e.offsetTop;j=t,N=r,y=f.scrollWidth-k-j,w=f.scrollHeight-C-N}}let M=S?{left:k,right:y,top:C,bottom:w}:null,D=S?{width:j,height:N}:null,A=S?{[I.activeTabLeft]:`${k}px`,[I.activeTabRight]:`${y}px`,[I.activeTabTop]:`${C}px`,[I.activeTabBottom]:`${w}px`,[I.activeTabWidth]:`${j}px`,[I.activeTabHeight]:`${N}px`}:void 0,Y=S&&j>0&&N>0,H=(0,d.useRenderElement)("span",e,{state:{orientation:m,activeTabPosition:M,activeTabSize:D,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:A,hidden:!Y},i,{suppressHydrationWarning:!0}],stateAttributesMapping:z});return null==p?null:(0,o.jsxs)(n.Fragment,{children:[H,x&&l&&(0,o.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var Y=e.i(144394),H=e.i(209407),F=e.i(137584),B=e.i(223910),V=e.i(673553);let W=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),$={...p,...H.transitionStatusMapping},q=n.forwardRef(function(e,t){let{className:r,value:a,render:o,keepMounted:l=!1,style:i,...c}=e,{value:u,getTabIdByPanelValue:m,orientation:g,tabActivationDirection:p,registerMountedTabPanel:f,unregisterMountedTabPanel:b}=h(),x=(0,y.useBaseUiId)(),v=n.useMemo(()=>({id:x,value:a}),[x,a]),{ref:k,index:C}=(0,V.useCompositeListItem)({metadata:v}),w=a===u,{mounted:j,transitionStatus:N,setMounted:T}=(0,B.useTransitionStatus)(w),S=!j,M=m(a),R=n.useRef(null),_=(0,d.useRenderElement)("div",e,{state:{hidden:S,orientation:g,tabActivationDirection:p,transitionStatus:N},ref:[t,k,R],props:[{"aria-labelledby":M,hidden:S,id:x,role:"tabpanel",tabIndex:w?0:-1,inert:(0,Y.inertValue)(!w),[W.index]:C},c],stateAttributesMapping:$});return((0,F.useOpenChangeComplete)({open:w,ref:R,onComplete(){w||T(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if((!S||l)&&null!=x)return f(a,x),()=>{b(a,x)}},[S,l,a,x,f,b]),l||j)?_:null});var K=e.i(590803),U=e.i(828918),G=e.i(673327),X=e.i(621082);let J=[];var Q=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:l=D.EMPTY_ARRAY,props:u=D.EMPTY_ARRAY,state:m=D.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:g,onHighlightedIndexChange:p,orientation:f,grid:b,loopFocus:x,onLoop:v,enableHomeAndEndKeys:k,onMapChange:y,stopEventPropagation:C=!0,rootRef:j,disabledIndices:N,modifierKeys:T,highlightItemOnHover:M=!1,tag:R="div",..._}=e,{props:E,highlightedIndex:L,onHighlightedIndexChange:P,elementsRef:I,onMapChange:O,relayKeyboardEvent:z}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:o,direction:l,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:m=!1,stopEventPropagation:h=!1,disabledIndices:g,modifierKeys:p=J}=e,[f,b]=n.useState(0),x=null!=a,v=n.useRef(null),k=(0,U.useMergedRefs)(v,u),y=n.useRef([]),C=n.useRef(!1),j=d??f,N=(0,i.useStableCallback)((e,t=!1)=>{if((c??b)(e),t){let t=y.current[e];(0,G.scrollIntoViewIfNeeded)(v.current,t,l,r)}}),T=(0,i.useStableCallback)(e=>{if(0===e.size||C.current)return;C.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(w))??null,o=a?t.indexOf(a):-1;if(-1!==o)N(o);else if((0,X.isListIndexDisabled)(t,j,g)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,G.scrollIntoViewIfNeeded)(v.current,a,l,r)});(0,s.useIsoLayoutEffect)(()=>{if(null==g||null!=d||!C.current)return;let e=y.current;if((0,X.isListIndexDisabled)(e,j,g)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[g,d,j,y,N]);let M=(0,i.useStableCallback)((e,t,r)=>o?o(e,t,r,y):r),R=(0,i.useStableCallback)(e=>{let n=m?G.COMPOSITE_KEYS:G.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of G.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,p)||!v.current)return;let s="rtl"===l,i=s?G.ARROW_LEFT:G.ARROW_RIGHT,d={horizontal:i,vertical:G.ARROW_DOWN,both:i}[r],c=s?G.ARROW_RIGHT:G.ARROW_LEFT,u={horizontal:c,vertical:G.ARROW_UP,both:c}[r],f=(0,S.getTarget)(e.nativeEvent);if(null!=f&&(0,G.isNativeInput)(f)&&!(0,K.isElementDisabled)(f)){let t=f.selectionStart,r=f.selectionEnd,a=f.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let b=j,k=(0,X.getMinListIndex)(y,g),C=(0,X.getMaxListIndex)(y,g);null!=a&&(b=a({disabledIndices:g,elementsRef:y,event:e,highlightedIndex:j,loopFocus:t,maxIndex:C,minIndex:k,onLoop:M,orientation:r,rtl:s}));let w={horizontal:[i],vertical:[G.ARROW_DOWN],both:[i,G.ARROW_DOWN]}[r],T={horizontal:[c],vertical:[G.ARROW_UP],both:[c,G.ARROW_UP]}[r],R=x?n:({horizontal:m?G.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:G.HORIZONTAL_KEYS,vertical:m?G.VERTICAL_KEYS_WITH_EXTRA_KEYS:G.VERTICAL_KEYS,both:n})[r];m&&(e.key===G.HOME?b=k:e.key===G.END&&(b=C)),b===j&&(w.includes(e.key)||T.includes(e.key))&&(t&&b===C&&w.includes(e.key)?(b=k,o&&(b=o(e,j,b,y))):t&&b===k&&T.includes(e.key)?(b=C,o&&(b=o(e,j,b,y))):b=(0,X.findNonDisabledListIndex)(y.current,{startingIndex:b,decrement:T.includes(e.key),disabledIndices:g})),b===j||(0,X.isIndexOutOfListBounds)(y.current,b)||(h&&e.stopPropagation(),R.has(e.key)&&e.preventDefault(),N(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:k,onFocus(e){let t=v.current,r=(0,S.getTarget)(e.nativeEvent);t&&null!=r&&(0,G.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:R},highlightedIndex:j,onHighlightedIndexChange:N,elementsRef:y,disabledIndices:g,onMapChange:T,relayKeyboardEvent:R}}({grid:b,loopFocus:x,onLoop:v,orientation:f,highlightedIndex:g,onHighlightedIndexChange:p,rootRef:j,stopEventPropagation:C,enableHomeAndEndKeys:k,direction:(0,Z.useDirection)(),disabledIndices:N,modifierKeys:T}),A=(0,d.useRenderElement)(R,e,{state:m,ref:l,props:[E,...u,_],stateAttributesMapping:h}),Y=n.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:P,highlightItemOnHover:M,relayKeyboardEvent:z}),[L,P,M,z]);return(0,o.jsx)(Q.CompositeRootContext.Provider,{value:Y,children:(0,o.jsx)(c.CompositeList,{elementsRef:I,onMapChange:e=>{y?.(e),O(e)},children:A})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:l=!0,render:d,style:c,...u}=e,{onValueChange:m,orientation:g,value:f,setTabMap:b,tabActivationDirection:x}=h(),[v,k]=n.useState(0),[y,C]=n.useState(null),w=n.useRef(new Set),j=n.useRef(new Set),T=n.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return T.current=e,y&&e.observe(y),j.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[y]);let S=(0,i.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),M=(0,i.useStableCallback)(e=>(j.current.add(e),T.current?.observe(e),()=>{j.current.delete(e),T.current?.unobserve(e)})),R=(0,i.useStableCallback)((e,t)=>{e!==f&&m(e,t)}),_=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:v,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:M,onTabActivation:R,setHighlightedTabIndex:k,tabsListElement:y}),[r,v,S,M,R,k,y]);return(0,o.jsx)(N.Provider,{value:_,children:(0,o.jsx)(ee,{render:d,className:a,style:c,state:{orientation:g,tabActivationDirection:x},refs:[t,C],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:p,highlightedIndex:v,enableHomeAndEndKeys:!0,loopFocus:l,orientation:g,onHighlightedIndexChange:k,onMapChange:b,disabledIndices:D.EMPTY_ARRAY})})});e.s(["Indicator",0,A,"List",0,et,"Panel",0,q,"Root",0,x,"Tab",0,M],69281);var er=e.i(69281),er=er,ea=e.i(115504);let eo=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,o.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,o.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,o.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(eo({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,o.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},466828,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(678784);let o=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var n=e.i(650056);let l={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:s})=>{let[i,d]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:i?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(o,{size:16})}),(0,t.jsx)(n.Prism,{language:s,style:l,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],466828)},972520,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],972520)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),n=e.i(444755),l=e.i(673706),s=e.i(95779);let i={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"}},c={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:""}},u=(0,l.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:h,variant:g="simple",tooltip:p,size:f=o.Sizes.SM,color:b,className:x}=e,v=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),k=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.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,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.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,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(g,b),{tooltipProps:y,getReferenceProps:C}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([m,y.refs.setReference]),className:(0,n.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,c[g].rounded,c[g].border,c[g].shadow,c[g].ring,i[f].paddingX,i[f].paddingY,x)},C,v),r.default.createElement(a.default,Object.assign({text:p},y)),r.default.createElement(h,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[f].height,d[f].width)}))});m.displayName="Icon",e.s(["default",0,m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[o,n]=(0,t.useState)(e);return[a?r:o,e=>{a||n(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),a=e.i(433336),o=e.i(271645),n=e.i(394487),l=e.i(503269),s=e.i(214520),i=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),f=e.i(694421),b=e.i(700020),x=e.i(35889),v=e.i(998348),k=e.i(722678);let y=(0,o.createContext)(null);y.displayName="GroupContext";let C=o.Fragment,w=Object.assign((0,b.forwardRefWithAs)(function(e,t){var C;let w=(0,o.useId)(),j=(0,g.useProvidedId)(),N=(0,m.useDisabled)(),{id:T=j||`headlessui-switch-${w}`,disabled:S=N||!1,checked:M,defaultChecked:R,onChange:_,name:D,value:E,form:L,autoFocus:P=!1,...I}=e,O=(0,o.useContext)(y),[z,A]=(0,o.useState)(null),Y=(0,o.useRef)(null),H=(0,u.useSyncRefs)(Y,t,null===O?null:O.setSwitch,A),F=(0,s.useDefaultValue)(R),[B,V]=(0,l.useControllable)(M,_,null!=F&&F),W=(0,i.useDisposables)(),[$,q]=(0,o.useState)(!1),K=(0,d.useEvent)(()=>{q(!0),null==V||V(!B),W.nextFrame(()=>{q(!1)})}),U=(0,d.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),K()}),G=(0,d.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),K()):e.key===v.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),X=(0,d.useEvent)(e=>e.preventDefault()),J=(0,k.useLabelledBy)(),Q=(0,x.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:P}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:eo}=(0,n.useActivePress)({disabled:S}),en=(0,o.useMemo)(()=>({checked:B,disabled:S,hover:et,focus:Z,active:ea,autofocus:P,changing:$}),[B,et,Z,ea,S,$,P]),el=(0,b.mergeProps)({id:T,ref:H,role:"switch",type:(0,c.useResolveButtonType)(e,z),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":J,"aria-describedby":Q,disabled:S||void 0,autoFocus:P,onClick:U,onKeyUp:G,onKeyPress:X},ee,er,eo),es=(0,o.useCallback)(()=>{if(void 0!==F)return null==V?void 0:V(F)},[V,F]),ei=(0,b.useRender)();return o.default.createElement(o.default.Fragment,null,null!=D&&o.default.createElement(h.FormFields,{disabled:S,data:{[D]:E||"on"},overrides:{type:"checkbox",checked:B},form:L,onReset:es}),ei({ourProps:el,theirProps:I,slot:en,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,o.useState)(null),[n,l]=(0,k.useLabels)(),[s,i]=(0,x.useDescriptions)(),d=(0,o.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,b.useRender)();return o.default.createElement(i,{name:"Switch.Description",value:s},o.default.createElement(l,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},o.default.createElement(y.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:k.Label,Description:x.Description});var j=e.i(888288),N=e.i(95779),T=e.i(444755),S=e.i(673706),M=e.i(829087);let R=(0,S.makeClassName)("Switch"),_=o.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:n=!1,onChange:l,color:s,name:i,error:d,errorMessage:c,disabled:u,required:m,tooltip:h,id:g}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:s?(0,S.getColorClassNames)(s,N.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,S.getColorClassNames)(s,N.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,x]=(0,j.default)(n,a),[v,k]=(0,o.useState)(!1),{tooltipProps:y,getReferenceProps:C}=(0,M.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement(M.default,Object.assign({text:h},y)),o.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([r,y.refs.setReference]),className:(0,T.tremorTwMerge)(R("root"),"flex flex-row relative h-5")},p,C),o.default.createElement("input",{type:"checkbox",className:(0,T.tremorTwMerge)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:i,required:m,checked:b,onChange:e=>{e.preventDefault()}}),o.default.createElement(w,{checked:b,onChange:e=>{x(e),null==l||l(e)},disabled:u,className:(0,T.tremorTwMerge)(R("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>k(!0),onBlur:()=>k(!1),id:g},o.default.createElement("span",{className:(0,T.tremorTwMerge)(R("sr-only"),"sr-only")},"Switch ",b?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(R("background"),b?f.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.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(R("round"),b?(0,T.tremorTwMerge)(f.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",v?(0,T.tremorTwMerge)("ring-2",f.ringColor):"")}))),d&&c?o.default.createElement("p",{className:(0,T.tremorTwMerge)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});_.displayName="Switch",e.s(["Switch",0,_],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(174553);e.s(["ProviderLogo",0,({provider:e,className:a="w-4 h-4"})=>(0,t.jsx)(r.Logo,{provider:e,className:a})])},368670,e=>{"use strict";var t=e.i(602869),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},973706,e=>{"use strict";var t=e.i(843476),r=e.i(72713),a=e.i(637235),o=e.i(994388),n=e.i(599724),l=e.i(166540),s=e.i(271645);let i=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,l.default)().startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,l.default)().subtract(7,"days").startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,l.default)().subtract(30,"days").startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,l.default)().startOf("month").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,l.default)().startOf("year").toDate(),to:(0,l.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:d,label:c="Select Time Range",showTimeRange:u=!0})=>{let[m,h]=(0,s.useState)(!1),[g,p]=(0,s.useState)(e),[f,b]=(0,s.useState)(null),[x,v]=(0,s.useState)(""),[k,y]=(0,s.useState)(""),C=(0,s.useRef)(null),w=(0,s.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of i){let r=t.getValue(),a=(0,l.default)(e.from).isSame((0,l.default)(r.from),"day"),o=(0,l.default)(e.to).isSame((0,l.default)(r.to),"day");if(a&&o)return t.shortLabel}return null},[]);(0,s.useEffect)(()=>{b(w(e))},[e,w]);let j=(0,s.useCallback)(()=>{if(!x||!k)return{isValid:!0,error:""};let e=(0,l.default)(x,"YYYY-MM-DD"),t=(0,l.default)(k,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[x,k])();(0,s.useEffect)(()=>{e.from&&v((0,l.default)(e.from).format("YYYY-MM-DD")),e.to&&y((0,l.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,s.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&h(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let N=(0,s.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let r=e=>(0,l.default)(e).format("D MMM, HH:mm");return`${r(e)} - ${r(t)}`},[]),T=(0,s.useCallback)(e=>{let t;if(!e.from)return e;let r={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),r.from=a,r.to=t,r},[]),S=(0,s.useCallback)(()=>{try{if(x&&k&&j.isValid){let e=(0,l.default)(x,"YYYY-MM-DD").startOf("day"),t=(0,l.default)(k,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let r={from:e.toDate(),to:t.toDate()};p(r);let a=w(r);b(a)}}}catch(e){console.warn("Invalid date format:",e)}},[x,k,j.isValid,w]);return(0,s.useEffect)(()=>{S()},[S]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[c&&(0,t.jsx)(n.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:c}),(0,t.jsxs)("div",{className:"relative",ref:C,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>h(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:N(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-9999 min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:i.map(e=>{let r=f===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${r?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:r}=e.getValue();p({from:t,to:r}),b(e.shortLabel),v((0,l.default)(t).format("YYYY-MM-DD")),y((0,l.default)(r).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${r?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${r?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:x,onChange:e=>v(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!j.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:k,onChange:e=>y(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!j.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!j.isValid&&j.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:j.error})]})}),g.from&&g.to&&j.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,l.default)(g.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,l.default)(g.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(o.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&v((0,l.default)(e.from).format("YYYY-MM-DD")),e.to&&y((0,l.default)(e.to).format("YYYY-MM-DD")),b(w(e)),h(!1)},children:"Cancel"}),(0,t.jsx)(o.Button,{onClick:()=>{g.from&&g.to&&j.isValid&&(d(g),requestIdleCallback(()=>{d(T(g))},{timeout:100}),h(!1))},disabled:!g.from||!g.to||!j.isValid,children:"Apply"})]})})]})]})})]})]})}])},567425,e=>{"use strict";var t=e.i(271645);let r=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],a={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};e.s(["usePaginatedDailyActivity",0,function({fetchFn:e,args:o,enabled:n}){let[l,s]=(0,t.useState)(a),[i,d]=(0,t.useState)(!1),[c,u]=(0,t.useState)(!1),[m,h]=(0,t.useState)({currentPage:0,totalPages:0}),[g,p]=(0,t.useState)(!1),f=(0,t.useRef)(0),b=(0,t.useRef)(!1),x=(0,t.useRef)(null),v=(0,t.useRef)(o);v.current=o;let k=JSON.stringify(o),y=(0,t.useCallback)(()=>{b.current=!0,p(!0),u(!1),null!==x.current&&(clearTimeout(x.current),x.current=null)},[]);return(0,t.useEffect)(()=>{if(!n){s(a),d(!1),u(!1),h({currentPage:0,totalPages:0}),p(!1);return}let t=++f.current;b.current=!1,p(!1);let o=()=>f.current!==t||b.current,l=e=>new Promise(t=>{x.current=setTimeout(()=>{x.current=null,t()},e)});return(async()=>{let t=v.current;d(!0),u(!1),h({currentPage:1,totalPages:1});try{let a=[...t.slice(0,3),1,...t.slice(3)],n=await e(...a);if(o())return;s(n);let i=n.metadata?.total_pages||1;if(h({currentPage:1,totalPages:i}),i<=1)return void d(!1);d(!1),u(!0);let c=[...n.results],m={...n.metadata};for(let a=2;a<=i;a++){if(o()||(await l(300),o()))return;let n=[...t.slice(0,3),a,...t.slice(3)],d=await e(...n);if(o())return;c=[...c,...d.results],(m=function(e,t){let a={...e};for(let o of r)a[o]=(e[o]||0)+(t[o]||0);return a}(m,d.metadata)).total_pages=i,m.has_more=a{f.current++,null!==x.current&&(clearTimeout(x.current),x.current=null)}},[n,e,k]),{data:l,loading:i,isFetchingMore:c,progress:m,cancelled:g,cancel:y}}])},992156,e=>{"use strict";var t=e.i(843476),r=e.i(487074),a=e.i(560445),o=e.i(653496),n=e.i(271645),l=e.i(952571);e.i(32117);var s=e.i(591025),i=e.i(343053),d=e.i(594772),c=e.i(325738),u=e.i(973499),m=e.i(973706),h=e.i(515288),g=e.i(337822),p=e.i(677572),f=e.i(602869),b=e.i(500330);let x=e=>`$${(0,b.formatNumberWithCommas)(e,e>0&&e<1?4:2)}`,v=e=>/claude|anthropic/i.test(e),k=()=>({alias:null,teamId:null,promptTokens:0,cacheReadTokens:0,cacheCreationTokens:0,realizedCachingSavings:0}),y=(e,t,r,a)=>({alias:e.alias??r,teamId:e.teamId??a,promptTokens:e.promptTokens+(t.prompt_tokens??0),cacheReadTokens:e.cacheReadTokens+(t.cache_read_input_tokens??0),cacheCreationTokens:e.cacheCreationTokens+(t.cache_creation_input_tokens??0),realizedCachingSavings:e.realizedCachingSavings+(t.prompt_caching_savings_spend??0)}),C=(e,t)=>t.reduce((e,t)=>({...e,[t]:0}),{date:e}),w=["Compression","Prompt caching"],j={by_tool:[],daily:[],start_date:null,end_date:null},N=["emerald","blue"],T=e=>new Date(`${e}T00:00:00`).toLocaleDateString("en-US",{month:"short",day:"numeric"}),S=e=>e.toISOString().slice(0,10),M=({label:e,value:r,hint:a,info:o})=>(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{className:"flex flex-row items-center justify-between space-y-0",children:[(0,t.jsx)(h.CardTitle,{className:"text-sm font-medium text-muted-foreground",children:e}),o&&(0,t.jsxs)(g.Popover,{children:[(0,t.jsx)(g.PopoverTrigger,{"aria-label":`How ${e.toLowerCase()} is calculated`,"data-testid":`summary-card-info-${e.toLowerCase().replace(/\s+/g,"-")}`,className:"cursor-pointer text-muted-foreground hover:text-foreground",children:(0,t.jsx)(l.Info,{className:"size-3.5"})}),(0,t.jsx)(g.PopoverContent,{align:"end",className:"w-64 text-sm text-muted-foreground",children:o})]})]}),(0,t.jsxs)(h.CardContent,{children:[(0,t.jsx)("p",{className:"text-2xl font-semibold text-foreground",children:r}),a&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a})]})]}),R=({accessToken:e,activity:r})=>{let{dateValue:a,onDateChange:o,results:l,loading:g,isFetchingMore:v}=r,k=a.from??null,y=a.to??null,R=!!e&&!!k&&!!y,_=k&&y?`${S(k)}|${S(y)}`:"",[D,E]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!e||!k||!y)return;let t=!1;return(0,f.getToolSpend)(e,S(k),S(y)).then(e=>{t||E({key:_,data:e})}).catch(()=>{t||E({key:_,data:j})}),()=>{t=!0}},[e,k,y,_]);let L=D?.key===_?D.data:null,P=R&&null===L,I=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.compression_savings_spend??0),0),[l]),O=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.prompt_caching_savings_spend??0),0),[l]),z=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.compression_saved_tokens??0),0),[l]),A=I+O,[Y,H]=(0,n.useState)("cumulative"),F=(0,n.useMemo)(()=>[...l].sort((e,t)=>e.date.localeCompare(t.date)).map(e=>({date:T(e.date),Compression:e.metrics.compression_savings_spend??0,"Prompt caching":e.metrics.prompt_caching_savings_spend??0})),[l]),B=(0,n.useMemo)(()=>{let e;if("cumulative"!==Y)return F;let t=k?T(`${k.getFullYear()}-${String(k.getMonth()+1).padStart(2,"0")}-${String(k.getDate()).padStart(2,"0")}`):"";return e=F.reduce((e,t)=>{let r=e[e.length-1];return[...e,{date:t.date,Compression:(r?.Compression??0)+t.Compression,"Prompt caching":(r?.["Prompt caching"]??0)+t["Prompt caching"]}]},[]),0===e.length?[...e]:[{date:t,Compression:0,"Prompt caching":0},...e]},[Y,F,k]),V="Per day",W=((e,t)=>{if(!e||!t)return"";let r=e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric"}),a=r(e),o=r(t);return a===o?a:`${a} – ${o}`})(k??void 0,y??void 0),$=["cumulative"===Y?"Running total saved":`Saved ${V.toLowerCase()}`,W].filter(Boolean).join(" · "),q=(0,n.useMemo)(()=>[{driver:"Compression",usd:I},{driver:"Prompt caching",usd:O}].filter(e=>e.usd>0),[I,O]),K=(0,n.useMemo)(()=>((e,t=8)=>[...e].sort((e,t)=>t.spend-e.spend).slice(0,t))(L?.by_tool??[]),[L]),U=(0,n.useMemo)(()=>K.map(e=>e.tool_name),[K]),G=(0,n.useMemo)(()=>K.map(e=>({tool_name:e.tool_name,spend:e.spend})),[K]),X=(0,n.useMemo)(()=>((e,t)=>{let r=new Set(t),a=new Map;for(let o of e){if(!r.has(o.tool_name))continue;let e=a.get(o.date)??C(o.date,t);e[o.tool_name]=(Number(e[o.tool_name])||0)+o.spend,a.set(o.date,e)}return[...a.values()].sort((e,t)=>e.date.localeCompare(t.date))})(L?.daily??[],U).map(e=>({...e,date:T(String(e.date))})),[L,U]),J=(0,n.useMemo)(()=>u.SEQUENTIAL_COLOR_RAMP.slice(0,Math.max(U.length,1)),[U]);return(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-4",children:(0,t.jsx)(m.default,{value:a,onValueChange:o})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[(0,t.jsx)(M,{label:"Total saved",value:x(A),hint:g||v?"Loading...":"Compression + prompt caching"}),(0,t.jsx)(M,{label:"Compression savings",value:x(I),hint:`${(0,b.formatNumberWithCommas)(z)} tokens compressed`,info:"Tokens Headroom removed before the call, priced at the model's input rate."}),(0,t.jsx)(M,{label:"Prompt caching savings",value:x(O),hint:"Cache read discount",info:"Tokens the provider served from cache, priced at the discount between the input and cache-read rates."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,t.jsxs)(h.Card,{className:"lg:col-span-2",children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(h.CardTitle,{children:"Savings"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:$})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(d.CustomLegend,{categories:w,colors:N}),(0,t.jsx)(p.Tabs,{value:Y,onValueChange:e=>H(e),children:(0,t.jsxs)(p.TabsList,{children:[(0,t.jsx)(p.TabsTrigger,{value:"cumulative",children:"Cumulative"}),(0,t.jsx)(p.TabsTrigger,{value:"per-interval",children:V})]})})]})]})}),(0,t.jsx)(h.CardContent,{children:"cumulative"===Y?(0,t.jsx)(s.AreaChart,{data:B,index:"date",categories:w,colors:N,valueFormatter:x,showLegend:!1,showDots:B.length<=31}):(0,t.jsx)(i.BarChart,{data:B,index:"date",categories:w,colors:N,stack:!0,valueFormatter:x,showLegend:!1})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Savings by driver"})}),(0,t.jsx)(h.CardContent,{children:(0,t.jsx)(c.DonutChart,{className:"h-80",data:q,index:"driver",category:"usd",colors:["emerald","blue"],valueFormatter:x,showLabel:!0,label:x(A)})})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{children:[(0,t.jsx)(h.CardTitle,{children:"Spend by tool"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Spend on requests that invoked each tool (MCP and client-side tools); declaring a tool without invoking it does not count. A request that invoked multiple tools counts its full spend toward each, so this attributes rather than partitions spend."})]}),(0,t.jsx)(h.CardContent,{children:0===K.length?(0,t.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:P?"Loading...":"No tool usage in this range."}):(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Total by tool"}),(0,t.jsx)(i.BarChart,{data:G,index:"tool_name",categories:["spend"],colors:J,colorByDatum:!0,layout:"vertical",yAxisWidth:140,maxBarSize:64,showLegend:!1,valueFormatter:x})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Daily spend by tool"}),(0,t.jsx)(d.CustomLegend,{categories:U,colors:J}),(0,t.jsx)(i.BarChart,{data:X,index:"date",categories:U,colors:J,stack:!0,maxBarSize:64,valueFormatter:x,showLegend:!1})]})]})})]})]})};var _=e.i(464571),D=e.i(808613),E=e.i(311451),L=e.i(790848),P=e.i(727749);let I="headroom",O=e=>(e.litellm_params?.guardrail??"").toLowerCase()===I,z=({accessToken:e})=>{let[r]=D.Form.useForm(),[a,o]=(0,n.useState)([]),[l,s]=(0,n.useState)(!0),[i,d]=(0,n.useState)(!1),c=(0,n.useCallback)(()=>{e&&(0,f.getGuardrailsList)(e).then(e=>o((e.guardrails??[]).filter(O))).catch(e=>{console.error("Failed to load compression guardrails:",e),P.default.fromBackend("Failed to load compression guardrails")}).finally(()=>s(!1))},[e]);(0,n.useEffect)(()=>{c()},[c]);let u=async t=>{if(e){d(!0);try{let a;await (0,f.createGuardrailCall)(e,{guardrail_name:(a={name:t.name,apiBase:t.apiBase,defaultOn:t.defaultOn??!0}).name.trim(),litellm_params:{guardrail:I,mode:"pre_call",api_base:a.apiBase.trim(),default_on:a.defaultOn}}),P.default.success("Compression guardrail created"),r.resetFields(),await c()}catch(e){console.error("Failed to create compression guardrail:",e),P.default.fromBackend("Failed to create compression guardrail")}finally{d(!1)}}};return(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Headroom prompt compression"})}),(0,t.jsxs)(h.CardContent,{children:[(0,t.jsxs)("p",{className:"mb-4 text-sm text-muted-foreground",children:["Headroom is a native LiteLLM guardrail that compresses your prompts before they reach the model, so you pay for fewer input tokens. The tokens it removes are priced and shown on the Usage tab as compression savings."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/headroom",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Headroom setup docs"})]}),l&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),!l&&0===a.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No prompt compression guardrails configured yet. Add one below to start saving on input tokens"}),!l&&a.length>0&&(0,t.jsx)("ul",{className:"divide-y divide-gray-200",children:a.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.guardrail_name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.litellm_params?.api_base??""})]}),(0,t.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${e.litellm_params?.default_on?"bg-emerald-100 text-emerald-800":"bg-gray-100 text-gray-600"}`,children:e.litellm_params?.default_on?"Always on":"Opt-in"})]},e.guardrail_id))})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Add Headroom compression guardrail"})}),(0,t.jsx)(h.CardContent,{children:(0,t.jsxs)(D.Form,{form:r,layout:"vertical",requiredMark:!1,onFinish:u,initialValues:{defaultOn:!0},children:[(0,t.jsx)(D.Form.Item,{name:"name",label:"Name",rules:[{required:!0,message:"Name is required"}],children:(0,t.jsx)(E.Input,{placeholder:"headroom-compression"})}),(0,t.jsx)(D.Form.Item,{name:"apiBase",label:"Headroom API base",tooltip:"Base URL of your Headroom compression service (LiteLLM calls its /v1/compress endpoint)",extra:"The URL where your Headroom compression service is hosted",rules:[{required:!0,message:"API base is required"}],children:(0,t.jsx)(E.Input,{placeholder:"https://your-headroom-endpoint"})}),(0,t.jsx)(D.Form.Item,{name:"defaultOn",label:"Apply to all requests",valuePropName:"checked",children:(0,t.jsx)(L.Switch,{})}),(0,t.jsx)("div",{className:"mb-4 rounded-lg border border-yellow-200 bg-yellow-50 p-3",children:(0,t.jsxs)("p",{className:"text-sm text-yellow-800",children:["Applying compression to all requests is available to all users. Enabling it selectively per key or team is a LiteLLM Enterprise feature. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"})]})}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(_.Button,{type:"primary",htmlType:"submit",loading:i,children:"Add guardrail"})})]})})]})]})};var A=e.i(69509);let Y=({accessToken:e,userRole:r})=>{let[a]=D.Form.useForm();return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(A.default,{form:a,handleOk:()=>a.resetFields(),accessToken:e,userRole:r})}):null};var H=e.i(863679),F=e.i(425063),B=e.i(475254);let V=(0,B.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),W=(0,B.default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);var $=e.i(784774),q=e.i(746798);let K={uncachedPromptTokens:"desc",cacheHitRatio:"asc",potentialSavings:"desc"},U=({info:e})=>(0,t.jsxs)(q.Tooltip,{children:[(0,t.jsx)(q.TooltipTrigger,{render:(0,t.jsx)("span",{className:"inline-flex","aria-label":e}),children:(0,t.jsx)(l.Info,{className:"h-3 w-3 text-gray-400"})}),(0,t.jsx)(q.TooltipContent,{className:"max-w-xs",children:e})]}),G=({column:e,label:r,info:a,sort:o,onSort:n})=>{let l=o.column===e,s="asc"===o.dir?V:F.ArrowDown;return(0,t.jsx)($.TableHead,{className:"text-right",children:(0,t.jsxs)("span",{className:"inline-flex items-center justify-end gap-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),"aria-label":`Sort by ${r}`,className:"inline-flex items-center gap-1 font-medium hover:text-foreground",children:[r,(0,t.jsx)(l?s:W,{className:`h-3 w-3 ${l?"text-foreground":"text-gray-400"}`})]}),(0,t.jsx)(U,{info:a})]})})},X=({activity:e})=>{let{dateValue:r,onDateChange:a,results:o,loading:l,isFetchingMore:s}=e,[i,d]=(0,n.useState)("key"),[c,u]=(0,n.useState)({column:"potentialSavings",dir:"desc"}),g=(0,n.useMemo)(()=>((e,t="key",r=10)=>{let a="model"===t?(e=>{let t=new Map;for(let r of e)for(let[e,a]of Object.entries(r.breakdown?.models??{})){if(!v(e))continue;let r=t.get(e)??k();t.set(e,y(r,a.metrics,null,null))}return t})(e):(e=>{let t=new Map;for(let r of e)for(let[e,a]of Object.entries(r.breakdown?.api_keys??{})){let r=t.get(e)??k();t.set(e,y(r,a.metrics,a.metadata?.key_alias??null,a.metadata?.team_id??null))}return t})(e),o=[...a.values()].reduce((e,t)=>({cacheReadTokens:e.cacheReadTokens+t.cacheReadTokens,realizedCachingSavings:e.realizedCachingSavings+t.realizedCachingSavings}),{cacheReadTokens:0,realizedCachingSavings:0}),n=o.cacheReadTokens>0?o.realizedCachingSavings/o.cacheReadTokens:null;return{rows:[...a.entries()].map(([e,r])=>{let a=Math.max(0,r.promptTokens-r.cacheReadTokens-r.cacheCreationTokens);return{id:e,label:"model"===t?e:r.alias??`${e.slice(0,8)}...`,sublabel:"model"===t?null:r.teamId,uncachedPromptTokens:a,cacheHitRatio:r.promptTokens>0?r.cacheReadTokens/r.promptTokens:0,potentialSavings:null!=n?a*n:null}}).filter(e=>e.uncachedPromptTokens>0).sort((e,t)=>null!=n?(t.potentialSavings??0)-(e.potentialSavings??0):t.uncachedPromptTokens-e.uncachedPromptTokens).slice(0,r),discountPerToken:n}})(o,i),[o,i]),f=(0,n.useMemo)(()=>[...g.rows].sort((e,t)=>{let r,a;return r=e[c.column],a=t[c.column],null==r&&null==a?0:null==r?1:null==a?-1:"asc"===c.dir?r-a:a-r}),[g.rows,c]),C=e=>u(t=>t.column===e?{column:e,dir:"asc"===t.dir?"desc":"asc"}:{column:e,dir:K[e]}),w="model"===i?"Models":"Keys",j="model"===i?"Model":"Key",N="model"===i?"model":"key";return(0,t.jsx)(q.TooltipProvider,{delay:300,children:(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)(h.CardTitle,{children:["Cache leakage by ","model"===i?"model":"virtual key"]}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:[w," sending large volumes of uncached input with a low cache hit rate are likely missing prompt caching. Potential savings is approximate: uncached input priced at the realized cache-read discount.","model"===i?" Limited to Anthropic (Claude) models, which support prompt caching.":""]})]}),(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(m.default,{value:r,onValueChange:a})})]}),(0,t.jsx)(p.Tabs,{value:i,onValueChange:e=>d("model"===e?"model":"key"),className:"mt-3",children:(0,t.jsxs)(p.TabsList,{children:[(0,t.jsx)(p.TabsTrigger,{value:"key",children:"By virtual key"}),(0,t.jsx)(p.TabsTrigger,{value:"model",children:"By model"})]})})]}),(0,t.jsx)(h.CardContent,{children:0===f.length?(0,t.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:l||s?"Loading...":`No ${N} usage in this range.`}):(0,t.jsxs)($.Table,{children:[(0,t.jsx)($.TableHeader,{children:(0,t.jsxs)($.TableRow,{children:[(0,t.jsx)($.TableHead,{children:j}),(0,t.jsx)(G,{column:"uncachedPromptTokens",label:"Uncached input tokens",info:"Input tokens you sent in this range that weren't served from or written to the cache",sort:c,onSort:C}),(0,t.jsx)(G,{column:"cacheHitRatio",label:"Cache hit rate",info:"Share of your input tokens that were served from the cache",sort:c,onSort:C}),(0,t.jsx)(G,{column:"potentialSavings",label:"Potential savings",info:"About how much you'd save if this uncached input used prompt caching. Estimated as uncached input tokens times the per-token discount your cached traffic already gets (realized cache savings ÷ cache-read tokens).",sort:c,onSort:C})]})}),(0,t.jsx)($.TableBody,{children:f.map(e=>{let r;return(0,t.jsxs)($.TableRow,{children:[(0,t.jsxs)($.TableCell,{className:"font-medium",children:[e.label,e.sublabel&&(0,t.jsxs)("span",{className:"ml-1 text-xs text-muted-foreground",children:["(",e.sublabel,")"]})]}),(0,t.jsx)($.TableCell,{className:"text-right",children:(0,b.formatNumberWithCommas)(e.uncachedPromptTokens)}),(0,t.jsx)($.TableCell,{className:"text-right",children:(r=e.cacheHitRatio,`${(0,b.formatNumberWithCommas)(100*r,1)}%`)}),(0,t.jsx)($.TableCell,{className:"text-right",children:null==e.potentialSavings?"—":x(e.potentialSavings)})]},e.id)})})]})})]})})},J=({accessToken:e,activity:r})=>{let[a,o]=(0,n.useState)([]),l=(0,n.useCallback)(()=>{e&&(0,f.getGeneralSettingsCall)(e).then(e=>o(e)).catch(e=>{console.error("Failed to load prompt caching settings:",e),P.default.fromBackend("Failed to load prompt caching settings")})},[e]);return((0,n.useEffect)(()=>{l()},[l]),e)?(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsx)(H.PromptCachingPanel,{accessToken:e,settings:a,onChange:(e,t)=>{o(r=>r.map(r=>r.field_name===e?{...r,field_value:t}:r))}}),(0,t.jsx)(X,{activity:r})]}):null};var Q=e.i(708347),Z=e.i(567425);let ee=({accessToken:e,userId:l,userRole:s})=>{let i=((e,t,r)=>{let a=(0,n.useMemo)(()=>new Date(new Date().getTime()-2592e6),[]),o=(0,n.useMemo)(()=>new Date,[]),[l,s]=(0,n.useState)({from:a,to:o}),i=l.from??null,d=l.to??null,c=Q.all_admin_roles.includes(r)?null:t,{data:u,loading:m,isFetchingMore:h}=(0,Z.usePaginatedDailyActivity)({fetchFn:f.userDailyActivityCall,args:[e,i,d,c],enabled:!!e&&!!i&&!!d});return{dateValue:l,onDateChange:s,results:u.results,loading:m,isFetchingMore:h}})(e,l,s),d=[{key:"usage",label:"Usage",children:(0,t.jsx)(R,{accessToken:e,activity:i})},{key:"compression",label:"Prompt Compression",children:(0,t.jsx)(z,{accessToken:e})},{key:"autorouter",label:"Autorouter",children:(0,t.jsx)(Y,{accessToken:e,userId:l,userRole:s})},{key:"caching",label:"Prompt Caching",children:(0,t.jsx)(J,{accessToken:e,activity:i})}];return(0,t.jsxs)("div",{className:"w-full space-y-6 p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.PiggyBank,{className:"size-6 text-emerald-600",strokeWidth:1.75}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground",children:"Cost Optimization"})]}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Track and configure the mechanisms that save you money: prompt compression, prompt caching, and auto routing"})]}),(0,t.jsx)(a.Alert,{type:"info",showIcon:!0,message:"This is an experimental dashboard",description:(0,t.jsxs)("span",{children:["Have feedback? Join the discussion"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/discussions/32172",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"here"})]})}),(0,t.jsx)(o.Tabs,{defaultActiveKey:"usage",items:d})]})};var et=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userId:r,userRole:a}=(0,et.default)();return(0,t.jsx)(ee,{accessToken:e,userId:r,userRole:a})}],992156)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0jjbikxye1xv_.js b/litellm/proxy/_experimental/out/_next/static/chunks/0jjbikxye1xv_.js
new file mode 100644
index 00000000000..c37af60a23c
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0jjbikxye1xv_.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986888,e=>{"use strict";var s=e.i(843476),t=e.i(755151),a=e.i(872934),l=e.i(827252),r=e.i(56456),i=e.i(240647),n=e.i(399029),c=e.i(741466),o=e.i(304967),d=e.i(309426),m=e.i(350967),u=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),_=e.i(599724),j=e.i(629569),f=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),T=e.i(898586),N=e.i(271645);e.i(32117);var C=e.i(343053),w=e.i(515288),q=e.i(289793),S=e.i(768371),L=e.i(708347),A=e.i(135214),D=e.i(738014),F=e.i(602869),E=e.i(621482);let O=(0,e.i(243652).createQueryKeys)("infiniteUsers"),M=50;var U=e.i(500330),R=e.i(591025),$=e.i(594772),I=e.i(378044),P=e.i(980187),z=e.i(362024);e.i(622826);var B=e.i(964471),V=e.i(291542);let W=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>(0,s.jsx)(B.MoneyCell,{value:e,decimals:2})},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,s.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,s.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],H=({topModels:e})=>{let[t,a]=(0,N.useState)("table");return 0===e.length?null:(0,s.jsxs)(w.Card,{className:"mt-4",children:[(0,s.jsxs)(w.CardHeader,{children:[(0,s.jsx)(w.CardTitle,{className:"text-base font-semibold",children:"Model Usage"}),(0,s.jsx)(w.CardAction,{children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:()=>a("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table"}),(0,s.jsx)("button",{onClick:()=>a("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart"})]})})]}),(0,s.jsx)(w.CardContent,{children:"chart"===t?(0,s.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,s.jsx)(C.BarChart,{style:{height:40*e.length},data:e.map(e=>({key:e.model,spend:e.spend})),index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,U.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,s.jsx)(V.Table,{columns:W,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})})]})};function K(e){return e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function G(e){return 0===e?"$0":e>=1e9?"$"+parseFloat((e/1e9).toFixed(2))+"B":e>=1e6?"$"+parseFloat((e/1e6).toFixed(2))+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}let Z=({modelName:e,metrics:t,hidePromptCachingMetrics:a=!1})=>(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(m.Grid,{numItems:4,className:"gap-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Requests"}),(0,s.jsx)(j.Title,{children:t.total_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Successful Requests"}),(0,s.jsx)(j.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Tokens"}),(0,s.jsx)(j.Title,{children:t.total_tokens.toLocaleString()}),(0,s.jsxs)(_.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Spend"}),(0,s.jsxs)(j.Title,{children:["$",(0,U.formatNumberWithCommas)(t.total_spend,2)]}),(0,s.jsxs)(_.Text,{children:["$",(0,U.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,s.jsxs)(o.Card,{className:"mt-4",children:[(0,s.jsx)(j.Title,{children:"Top Virtual Keys by Spend"}),(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,s.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,s.jsxs)(_.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsxs)(_.Text,{className:"font-medium",children:["$",(0,U.formatNumberWithCommas)(e.spend,2)]}),(0,s.jsxs)(_.Text,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),t.top_models&&t.top_models.length>0&&(0,s.jsx)(H,{topModels:t.top_models}),(0,s.jsxs)(o.Card,{className:"mt-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Spend per day"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.spend"],colors:["green"]})]}),(0,s.jsx)(C.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,U.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,s.jsxs)(m.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Total Tokens"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,s.jsx)(R.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:K,customTooltip:I.CustomTooltip,showLegend:!1})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Requests per day"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,s.jsx)(C.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:K,customTooltip:I.CustomTooltip,showLegend:!1})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Success vs Failed Requests"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,s.jsx)(R.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:K,customTooltip:I.CustomTooltip,showLegend:!1})]}),!a&&(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Prompt Caching Metrics"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,s.jsxs)("div",{className:"mb-2",children:[(0,s.jsxs)(_.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,s.jsxs)(_.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,s.jsx)(R.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:K,customTooltip:I.CustomTooltip,showLegend:!1})]})]})]}),J=({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let a=Object.keys(e).sort((s,t)=>""===s?1:""===t?-1:e[t].total_spend-e[s].total_spend),l={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(e).forEach(e=>{l.total_requests+=e.total_requests,l.total_successful_requests+=e.total_successful_requests,l.total_tokens+=e.total_tokens,l.total_spend+=e.total_spend,l.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,l.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{l.daily_data[e.date]||(l.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),l.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,l.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,l.daily_data[e.date].total_tokens+=e.metrics.total_tokens,l.daily_data[e.date].api_requests+=e.metrics.api_requests,l.daily_data[e.date].spend+=e.metrics.spend,l.daily_data[e.date].successful_requests+=e.metrics.successful_requests,l.daily_data[e.date].failed_requests+=e.metrics.failed_requests,l.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,l.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(l.daily_data).map(([e,s])=>({date:e,metrics:s})).sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime());return(0,s.jsxs)("div",{className:"space-y-8",children:[(0,s.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,s.jsx)(j.Title,{children:"Overall Usage"}),(0,s.jsxs)(m.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Requests"}),(0,s.jsx)(j.Title,{children:l.total_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Successful Requests"}),(0,s.jsx)(j.Title,{children:l.total_successful_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Tokens"}),(0,s.jsx)(j.Title,{children:l.total_tokens.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(_.Text,{children:"Total Spend"}),(0,s.jsxs)(j.Title,{children:["$",(0,U.formatNumberWithCommas)(l.total_spend,2)]})]})]}),(0,s.jsxs)(m.Grid,{numItems:2,className:"gap-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Total Tokens Over Time"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,s.jsx)(R.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:K,customTooltip:I.CustomTooltip,showLegend:!1,yAxisWidth:80})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"Total Requests Over Time"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,s.jsx)(R.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:K,customTooltip:I.CustomTooltip,showLegend:!1,yAxisWidth:80})]})]})]}),(0,s.jsx)(z.Collapse,{defaultActiveKey:a[0],children:a.map(a=>(0,s.jsx)(z.Collapse.Panel,{header:(0,s.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,s.jsx)(j.Title,{children:e[a].label||"Unknown Item"}),(0,s.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,s.jsxs)("span",{children:["$",(0,U.formatNumberWithCommas)(e[a].total_spend,2)]}),(0,s.jsxs)("span",{children:[e[a].total_requests.toLocaleString()," requests"]})]})]}),children:(0,s.jsx)(Z,{modelName:a||"Unknown Model",metrics:e[a],hidePromptCachingMetrics:t})},a))})]})},Y=(e,s,t=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[s]||{}).forEach(([l,r])=>{a[l]||(a[l]={label:"api_keys"===s?((e,s,t)=>{let a=e.metadata.key_alias||`key-hash-${s}`,l=e.metadata.team_id;if(l){let e=(0,P.resolveTeamAliasFromTeamID)(l,t);return e?`${a} (team: ${e})`:`${a} (team_id: ${l})`}return a})(r,l,t):"entities"===s&&(r.metadata?.agent_name||r.metadata?.team_alias)||l,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],top_models:[],daily_data:[]}),a[l].total_requests+=r.metrics.api_requests,a[l].prompt_tokens+=r.metrics.prompt_tokens,a[l].completion_tokens+=r.metrics.completion_tokens,a[l].total_tokens+=r.metrics.total_tokens,a[l].total_spend+=r.metrics.spend,a[l].total_successful_requests+=r.metrics.successful_requests,a[l].total_failed_requests+=r.metrics.failed_requests,a[l].total_cache_read_input_tokens+=r.metrics.cache_read_input_tokens||0,a[l].total_cache_creation_input_tokens+=r.metrics.cache_creation_input_tokens||0,a[l].daily_data.push({date:e.date,metrics:{prompt_tokens:r.metrics.prompt_tokens,completion_tokens:r.metrics.completion_tokens,total_tokens:r.metrics.total_tokens,api_requests:r.metrics.api_requests,spend:r.metrics.spend,successful_requests:r.metrics.successful_requests,failed_requests:r.metrics.failed_requests,cache_read_input_tokens:r.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:r.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==s&&Object.entries(a).forEach(([t,l])=>{let r={};e.results.forEach(e=>{let a=e.breakdown[s]?.[t];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,s])=>{r[e]||(r[e]={api_key:e,key_alias:s.metadata.key_alias,team_id:s.metadata.team_id,spend:0,requests:0,tokens:0}),r[e].spend+=s.metrics.spend,r[e].requests+=s.metrics.api_requests,r[e].tokens+=s.metrics.total_tokens})}),a[t].top_api_keys=Object.values(r).sort((e,s)=>s.spend-e.spend).slice(0,5)}),"api_keys"===s&&Object.entries(a).forEach(([s,t])=>{let l={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{if(t&&"api_key_breakdown"in t){let a=t.api_key_breakdown?.[s];a&&(l[e]||(l[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),l[e].spend+=a.metrics.spend,l[e].requests+=a.metrics.api_requests,l[e].successful_requests+=a.metrics.successful_requests||0,l[e].failed_requests+=a.metrics.failed_requests||0,l[e].tokens+=a.metrics.total_tokens)}})}),a[s].top_models=Object.values(l).sort((e,s)=>s.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime())}),a};var Q=e.i(994388),X=e.i(366283),ee=e.i(779241),es=e.i(212931),et=e.i(808613),ea=e.i(482725),el=e.i(727749);let er=({isOpen:e,onClose:t,accessToken:a})=>{let[l]=et.Form.useForm(),[r,i]=(0,N.useState)(!1),[n,c]=(0,N.useState)(null),[o,d]=(0,N.useState)(!1),[m,u]=(0,N.useState)("cloudzero"),[x,h]=(0,N.useState)(!1);(0,N.useEffect)(()=>{e&&a&&p()},[e,a]);let p=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,F.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let s=await e.json();c(s),l.setFieldsValue({connection_id:s.connection_id})}else if(404!==e.status){let s=await e.json();el.default.fromBackend(`Failed to load existing settings: ${s.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),el.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},g=async e=>{if(!a)return void el.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",t=n?"PUT":"POST",l={...e,timezone:"UTC"},r=await fetch(s,{method:t,headers:{[(0,F.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),i=await r.json();if(r.ok)return el.default.success(i.message||"CloudZero settings saved successfully"),c({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return el.default.fromBackend(i.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),el.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},j=async()=>{if(!a)return void el.default.fromBackend("No access token available");h(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,F.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),s=await e.json();e.ok?(el.default.success(s.message||"Export to CloudZero completed successfully"),t()):el.default.fromBackend(s.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),el.default.fromBackend("Failed to export to CloudZero")}finally{h(!1)}},f=async()=>{h(!0);try{el.default.info("CSV export functionality coming soon!"),t()}catch(e){console.error("Error exporting CSV:",e),el.default.fromBackend("Failed to export CSV")}finally{h(!1)}},y=async()=>{if("cloudzero"===m){if(!n){let e=await l.validateFields();if(!await g(e))return}await j()}else await f()},b=()=>{l.resetFields(),u("cloudzero"),c(null),t()},v=[{value:"cloudzero",label:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,s.jsx)("span",{children:"Export to CSV"})]})}];return(0,s.jsx)(es.Modal,{title:"Export Data",open:e,onCancel:b,footer:null,width:600,destroyOnHidden:!0,children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,s.jsx)(k.Select,{value:m,onChange:u,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,s.jsx)("div",{children:o?(0,s.jsx)("div",{className:"flex justify-center py-8",children:(0,s.jsx)(ea.Spin,{size:"large"})}):(0,s.jsxs)(s.Fragment,{children:[n&&(0,s.jsx)(X.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,s.jsxs)(_.Text,{children:["API Key: ",n.api_key_masked,(0,s.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,s.jsxs)(et.Form,{form:l,layout:"vertical",children:[(0,s.jsx)(et.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,s.jsx)(ee.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,s.jsx)(et.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,s.jsx)(ee.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,s.jsx)(X.Callout,{title:"CSV Export",icon:()=>(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,s.jsx)(_.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,s.jsx)(Q.Button,{variant:"secondary",onClick:b,children:"Cancel"}),(0,s.jsx)(Q.Button,{onClick:y,loading:r||x,disabled:r||x,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})};var ei=e.i(785242),en=e.i(981339);let ec=({value:e,onChange:t})=>(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,s.jsx)(k.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),eo=({dateRange:e,selectedFilters:t})=>(0,s.jsxs)("div",{className:"text-sm text-gray-500",children:[e.from?.toLocaleDateString()," - ",e.to?.toLocaleDateString(),t.length>0&&` \xb7 ${t.length} filter${t.length>1?"s":""}`]});var ed=e.i(91739);let em=({value:e,onChange:t,entityType:a})=>(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,s.jsx)(ed.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,s.jsx)(ed.Radio,{value:"daily",className:"mt-0.5"}),(0,s.jsxs)("div",{className:"ml-3 flex-1",children:[(0,s.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",a]}),(0,s.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",a]})]})]}),(0,s.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,s.jsx)(ed.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,s.jsxs)("div",{className:"ml-3 flex-1",children:[(0,s.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",a," and key"]}),(0,s.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",a,", split by API key"]})]})]}),(0,s.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,s.jsx)(ed.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,s.jsxs)("div",{className:"ml-3 flex-1",children:[(0,s.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",a," and model"]}),(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var eu=e.i(59935);let ex=(e,s)=>({id:e,alias:s[e]||e}),eh=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],ep=e=>{let s=e.entities;return s&&Object.keys(s).length>0?s:(e=>{let s=e.api_keys;if(!s||0===Object.keys(s).length)return{};let t={};for(let[e,a]of Object.entries(s)){let s=a?.metadata?.team_id||"Unassigned";t[s]||(t[s]={metrics:Object.fromEntries(eh.map(e=>[e,0])),api_key_breakdown:{}});let l=t[s].metrics,r=a?.metrics||{};for(let e of eh)l[e]+=r[e]||0;t[s].api_key_breakdown[e]=a}return t})(e)},eg=(e,s,t,a={})=>{switch(s){case"daily":default:return((e,s,t={})=>{let a=[];return e.results.forEach(e=>{Object.entries(ep(e.breakdown)).forEach(([l,r])=>{let{id:i,alias:n}=ex(l,t);a.push({Date:e.date,[s]:n,[`${s} ID`]:i,"Spend ($)":(0,U.formatNumberWithCommas)(r.metrics.spend,4),Requests:r.metrics.api_requests,"Successful Requests":r.metrics.successful_requests,"Failed Requests":r.metrics.failed_requests,"Total Tokens":r.metrics.total_tokens,"Prompt Tokens":r.metrics.prompt_tokens||0,"Completion Tokens":r.metrics.completion_tokens||0,"Cache Read Input Tokens":r.metrics.cache_read_input_tokens||0,"Cache Creation Input Tokens":r.metrics.cache_creation_input_tokens||0})})}),a.sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())})(e,t,a);case"daily_with_keys":return((e,s,t={})=>{let a={};return e.results.forEach(e=>{Object.entries(ep(e.breakdown)).forEach(([s,l])=>{let{id:r,alias:i}=ex(s,t);Object.entries(l.api_key_breakdown||{}).forEach(([s,t])=>{let l=t?.metadata?.key_alias||null,n=`${e.date}_${r}_${s}`;a[n]?(a[n].metrics.spend+=t.metrics?.spend||0,a[n].metrics.api_requests+=t.metrics?.api_requests||0,a[n].metrics.successful_requests+=t.metrics?.successful_requests||0,a[n].metrics.failed_requests+=t.metrics?.failed_requests||0,a[n].metrics.total_tokens+=t.metrics?.total_tokens||0,a[n].metrics.prompt_tokens+=t.metrics?.prompt_tokens||0,a[n].metrics.completion_tokens+=t.metrics?.completion_tokens||0,a[n].metrics.cache_read_input_tokens+=t.metrics?.cache_read_input_tokens||0,a[n].metrics.cache_creation_input_tokens+=t.metrics?.cache_creation_input_tokens||0):a[n]={Date:e.date,entityId:r,entityAlias:i,keyId:s,keyAlias:l,metrics:{spend:t.metrics?.spend||0,api_requests:t.metrics?.api_requests||0,successful_requests:t.metrics?.successful_requests||0,failed_requests:t.metrics?.failed_requests||0,total_tokens:t.metrics?.total_tokens||0,prompt_tokens:t.metrics?.prompt_tokens||0,completion_tokens:t.metrics?.completion_tokens||0,cache_read_input_tokens:t.metrics?.cache_read_input_tokens||0,cache_creation_input_tokens:t.metrics?.cache_creation_input_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[s]:e.entityAlias,[`${s} ID`]:e.entityId,"Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,U.formatNumberWithCommas)(e.metrics.spend,4),Requests:e.metrics.api_requests,"Successful Requests":e.metrics.successful_requests,"Failed Requests":e.metrics.failed_requests,"Total Tokens":e.metrics.total_tokens,"Prompt Tokens":e.metrics.prompt_tokens,"Completion Tokens":e.metrics.completion_tokens,"Cache Read Input Tokens":e.metrics.cache_read_input_tokens,"Cache Creation Input Tokens":e.metrics.cache_creation_input_tokens})).sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())})(e,t,a);case"daily_with_models":return((e,s,t={})=>{let a=[];return e.results.forEach(e=>{let l={};Object.entries(ep(e.breakdown)).forEach(([s,t])=>{l[s]||(l[s]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{let r=t.api_key_breakdown||{},i=a.api_key_breakdown||{};Object.keys(r).forEach(t=>{let a=i[t]?.metrics;a&&(l[s][e]||(l[s][e]={spend:0,requests:0,successful:0,failed:0,tokens:0,promptTokens:0,completionTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0}),l[s][e].spend+=a.spend||0,l[s][e].requests+=a.api_requests||0,l[s][e].successful+=a.successful_requests||0,l[s][e].failed+=a.failed_requests||0,l[s][e].tokens+=a.total_tokens||0,l[s][e].promptTokens+=a.prompt_tokens||0,l[s][e].completionTokens+=a.completion_tokens||0,l[s][e].cacheReadInputTokens+=a.cache_read_input_tokens||0,l[s][e].cacheCreationInputTokens+=a.cache_creation_input_tokens||0)})})}),Object.entries(l).forEach(([l,r])=>{let{id:i,alias:n}=ex(l,t);Object.entries(r).forEach(([t,l])=>{a.push({Date:e.date,[s]:n,[`${s} ID`]:i,Model:t,"Spend ($)":(0,U.formatNumberWithCommas)(l.spend,4),Requests:l.requests,Successful:l.successful,Failed:l.failed,"Total Tokens":l.tokens,"Prompt Tokens":l.promptTokens,"Completion Tokens":l.completionTokens,"Cache Read Input Tokens":l.cacheReadInputTokens,"Cache Creation Input Tokens":l.cacheCreationInputTokens})})})}),a.sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())})(e,t,a)}},e_=({isOpen:e,onClose:t,entityType:a,spendData:l,dateRange:r,selectedFilters:i,customTitle:n})=>{let[c,o]=(0,N.useState)("csv"),[d,m]=(0,N.useState)("daily"),[u,x]=(0,N.useState)(!1),{data:h,isLoading:p}=(0,ei.useTeams)(),g=a.charAt(0).toUpperCase()+a.slice(1),_=n||`Export ${g} Usage`,j=(0,N.useMemo)(()=>(0,P.createTeamAliasMap)(h),[h]),f=async e=>{let s=e||c;x(!0);try{"csv"===s?(((e,s,t,a,l={})=>{let r=eg(e,s,t,l),i=new Blob([eu.default.unparse(r)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),c=document.createElement("a");c.href=n,c.download=`${a}_usage_${s}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(n)})(l,d,g,a,j),el.default.success(`${g} usage data exported successfully as CSV`)):(((e,s,t,a,l,r,i={})=>{let n=eg(e,s,t,i),c={export_date:new Date().toISOString(),entity_type:a,date_range:{from:l.from?.toISOString(),to:l.to?.toISOString()},filters_applied:r.length>0?r:"None",export_scope:s,summary:{total_spend:e.metadata.total_spend,total_requests:e.metadata.total_api_requests,successful_requests:e.metadata.total_successful_requests,failed_requests:e.metadata.total_failed_requests,total_tokens:e.metadata.total_tokens}},o=new Blob([JSON.stringify({metadata:c,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(o),m=document.createElement("a");m.href=d,m.download=`${a}_usage_${s}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(d)})(l,d,g,a,r,i,j),el.default.success(`${g} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),el.default.fromBackend("Failed to export data")}finally{x(!1)}};return(0,s.jsx)(es.Modal,{title:(0,s.jsx)("span",{className:"text-base font-semibold",children:_}),open:e,onCancel:t,footer:null,width:480,children:(0,s.jsxs)("div",{className:"space-y-5 py-2",children:[p?(0,s.jsx)(en.Skeleton,{active:!0}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eo,{dateRange:r,selectedFilters:i}),(0,s.jsx)(em,{value:d,onChange:m,entityType:a}),(0,s.jsx)(ec,{value:c,onChange:o})]}),p?(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,s.jsx)(en.Skeleton.Button,{active:!0}),(0,s.jsx)(en.Skeleton.Button,{active:!0})]}):(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,s.jsx)(y.Button,{variant:"outlined",onClick:t,disabled:u,children:"Cancel"}),(0,s.jsx)(y.Button,{onClick:()=>f(),loading:u||p,disabled:u||p,type:"primary",children:u?"Exporting...":`Export ${c.toUpperCase()}`})]})]})})},ej=({dateValue:e,entityType:t,spendData:a,showFilters:l=!1,filterLabel:r,filterPlaceholder:i,selectedFilters:n=[],onFiltersChange:c,filterOptions:o=[],filterMode:d="multiple",customTitle:m,compactLayout:u=!1,teams:x=[]})=>{let[h,p]=(0,N.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)("div",{className:`grid ${l&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[l&&o.length>0&&(0,s.jsxs)("div",{children:[r&&(0,s.jsx)(_.Text,{className:"mb-2",children:r}),(0,s.jsx)(k.Select,{mode:"single"===d?void 0:"multiple",style:{width:"100%"},placeholder:i,value:"single"===d?n[0]??void 0:n,onChange:e=>{"single"===d?c?.(e?[e]:[]):c?.(e)},options:o,allowClear:!0})]}),(0,s.jsx)("div",{className:"justify-self-end",children:(0,s.jsx)(Q.Button,{onClick:()=>p(!0),icon:()=>(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,s.jsx)(e_,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:a,dateRange:e,selectedFilters:n,customTitle:m,teams:x})]})};var ef=e.i(973706),ey=e.i(571303);let eb=({isDateChanging:e=!1})=>(0,s.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,s.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,s.jsx)(ey.UiLoadingSpinner,{className:"size-5"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,s.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var ek=e.i(290571),ev=e.i(95779),eT=e.i(444755),eN=e.i(673706);let eC=N.default.forwardRef((e,s)=>{let{color:t,children:a,className:l}=e,r=(0,ek.__rest)(e,["color","children","className"]);return N.default.createElement("p",Object.assign({ref:s,className:(0,eT.tremorTwMerge)("font-semibold text-tremor-metric",t?(0,eN.getColorClassNames)(t,ev.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",l)},r),a)});eC.displayName="Metric";var ew=e.i(37091),eq=e.i(269200),eS=e.i(427612),eL=e.i(496020),eA=e.i(64848),eD=e.i(942232),eF=e.i(977572);let eE=({accessToken:e,selectedTags:t,formatAbbreviatedNumber:a})=>{let l,r,i,n,[c,o]=(0,N.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[d,m]=(0,N.useState)(!1),[f,y]=(0,N.useState)(1),b=async()=>{if(e){m(!0);try{let s=await (0,F.perUserAnalyticsCall)(e,f,50,t.length>0?t:void 0);o(s)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{m(!1)}}};return(0,N.useEffect)(()=>{b()},[e,t,f]),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(j.Title,{children:"Per User Usage"}),(0,s.jsx)(ew.Subtitle,{children:"Individual developer usage metrics"}),(0,s.jsxs)(x.TabGroup,{children:[(0,s.jsxs)(h.TabList,{className:"mb-6",children:[(0,s.jsx)(u.Tab,{children:"User Details"}),(0,s.jsx)(u.Tab,{children:"Usage Distribution"})]}),(0,s.jsxs)(g.TabPanels,{children:[(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsxs)(eq.Table,{children:[(0,s.jsx)(eS.TableHead,{children:(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eA.TableHeaderCell,{children:"User ID"}),(0,s.jsx)(eA.TableHeaderCell,{children:"User Email"}),(0,s.jsx)(eA.TableHeaderCell,{children:"User Agent"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,s.jsx)(eD.TableBody,{children:c.results.slice(0,10).map((e,t)=>(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eF.TableCell,{children:(0,s.jsx)(_.Text,{className:"font-medium",children:e.user_id})}),(0,s.jsx)(eF.TableCell,{children:(0,s.jsx)(_.Text,{children:e.user_email||"N/A"})}),(0,s.jsx)(eF.TableCell,{children:(0,s.jsx)(_.Text,{children:e.user_agent||"Unknown"})}),(0,s.jsx)(eF.TableCell,{className:"text-right",children:(0,s.jsx)(_.Text,{children:a(e.successful_requests)})}),(0,s.jsx)(eF.TableCell,{className:"text-right",children:(0,s.jsx)(_.Text,{children:a(e.total_tokens)})}),(0,s.jsx)(eF.TableCell,{className:"text-right",children:(0,s.jsx)(_.Text,{children:a(e.failed_requests)})}),(0,s.jsx)(eF.TableCell,{className:"text-right",children:(0,s.jsxs)(_.Text,{children:["$",a(e.spend,4)]})})]},t))})]}),c.results.length>10&&(0,s.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,s.jsxs)(_.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{f>1&&y(f-1)},disabled:1===f,children:"Previous"}),(0,s.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{f=c.total_pages,children:"Next"})]})]})]}),(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,s.jsx)(ew.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,s.jsx)(C.BarChart,{data:(l=new Map,c.results.forEach(e=>{let s=e.user_agent||"Unknown";l.set(s,(l.get(s)||0)+1)}),r=Array.from(l.entries()).sort(([,e],[,s])=>s-e).slice(0,8).map(([e])=>e),i={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}},c.results.forEach(e=>{let s=e.successful_requests,t=e.user_agent||"Unknown";r.includes(t)&&Object.entries(i).forEach(([e,a])=>{s>=a.range[0]&&s<=a.range[1]&&(a.agents[t]||(a.agents[t]=0),a.agents[t]++)})}),Object.entries(i).map(([e,s])=>{let t={category:e};return r.forEach(e=>{t[e]=s.agents[e]||0}),t})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let s=e.user_agent||"Unknown";n.set(s,(n.get(s)||0)+1)}),Array.from(n.entries()).sort(([,e],[,s])=>s-e).slice(0,8).map(([e])=>e)),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>`${e} users`,yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},eO=({accessToken:e,userRole:t,dateValue:a,onDateChange:l})=>{let[r,i]=(0,N.useState)({results:[]}),[n,c]=(0,N.useState)({results:[]}),[d,f]=(0,N.useState)({results:[]}),[y,b]=(0,N.useState)({results:[]}),[T,w]=(0,N.useState)(""),[q,S]=(0,N.useState)([]),[L,A]=(0,N.useState)([]),[D,E]=(0,N.useState)(!1),[O,M]=(0,N.useState)(!1),[U,R]=(0,N.useState)(!1),[$,I]=(0,N.useState)(!1),[P,z]=(0,N.useState)(!1),B=new Date,V=async()=>{if(e){E(!0);try{let s=await (0,F.tagDistinctCall)(e);S(s.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{E(!1)}}},W=async()=>{if(e){M(!0);try{let s=await (0,F.tagDauCall)(e,B,T||void 0,L.length>0?L:void 0);i(s)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{M(!1)}}},H=async()=>{if(e){R(!0);try{let s=await (0,F.tagWauCall)(e,B,T||void 0,L.length>0?L:void 0);c(s)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{R(!1)}}},K=async()=>{if(e){I(!0);try{let s=await (0,F.tagMauCall)(e,B,T||void 0,L.length>0?L:void 0);f(s)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{I(!1)}}},G=async()=>{if(e&&a.from&&a.to){z(!0);try{let s=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);b(s)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{z(!1)}}};(0,N.useEffect)(()=>{V()},[e]),(0,N.useEffect)(()=>{if(!e)return;let s=setTimeout(()=>{W(),H(),K()},50);return()=>clearTimeout(s)},[e,T,L]),(0,N.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{G()},50);return()=>clearTimeout(e)},[e,a,L]);let Z=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,J=e=>Object.entries(e.reduce((e,s)=>(e[s.tag]=(e[s.tag]||0)+s.active_users,e),{})).sort(([,e],[,s])=>s-e).map(([e])=>e),Y=J(r.results).slice(0,10),Q=J(n.results).slice(0,10),X=J(d.results).slice(0,10),ee=(()=>{let e=[],s=new Date;for(let t=6;t>=0;t--){let a=new Date(s);a.setDate(a.getDate()-t);let l={date:a.toISOString().split("T")[0]};Y.forEach(e=>{l[Z(e)]=0}),e.push(l)}return r.results.forEach(s=>{let t=Z(s.tag),a=e.find(e=>e.date===s.date);a&&(a[t]=s.active_users)}),e})(),es=(()=>{let e=[];for(let s=1;s<=7;s++){let t={week:`Week ${s}`};Q.forEach(e=>{t[Z(e)]=0}),e.push(t)}return n.results.forEach(s=>{let t=Z(s.tag),a=s.date.match(/Week (\d+)/);if(a){let l=`Week ${a[1]}`,r=e.find(e=>e.week===l);r&&(r[t]=s.active_users)}}),e})(),et=(()=>{let e=[];for(let s=1;s<=7;s++){let t={month:`Month ${s}`};X.forEach(e=>{t[Z(e)]=0}),e.push(t)}return d.results.forEach(s=>{let t=Z(s.tag),a=s.date.match(/Month (\d+)/);if(a){let l=`Month ${a[1]}`,r=e.find(e=>e.month===l);r&&(r[t]=s.active_users)}}),e})(),ea=(e,s=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(s)+"M";if(e>=1e6)return(e/1e6).toFixed(s)+"M";if(e>=1e4)return(e/1e3).toFixed(s)+"K";if(e>=1e3)return(e/1e3).toFixed(s)+"K";else return e.toFixed(s)};return(0,s.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,s.jsx)(o.Card,{children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-start",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(j.Title,{children:"Summary by User Agent"}),(0,s.jsx)(ew.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,s.jsxs)("div",{className:"w-96",children:[(0,s.jsx)(_.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,s.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:A,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:D,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:q.map(e=>{let t=Z(e),a=t.length>50?`${t.substring(0,50)}...`:t;return(0,s.jsx)(k.Select.Option,{value:e,label:a,title:t,children:a},e)})})]})]}),P?(0,s.jsx)(eb,{isDateChanging:!1}):(0,s.jsxs)(m.Grid,{numItems:4,className:"gap-4",children:[(y.results||[]).slice(0,4).map((e,t)=>{let a=Z(e.tag),l=a.length>15?a.substring(0,15)+"...":a;return(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,s.jsx)(j.Title,{className:"truncate",children:l})}),(0,s.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,s.jsx)(eC,{className:"text-lg",children:ea(e.successful_requests)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,s.jsx)(eC,{className:"text-lg",children:ea(e.total_tokens)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,s.jsxs)(eC,{className:"text-lg",children:["$",ea(e.total_spend,4)]})]})]})]},t)}),Array.from({length:Math.max(0,4-(y.results||[]).length)}).map((e,t)=>(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"No Data"}),(0,s.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,s.jsx)(eC,{className:"text-lg",children:"-"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,s.jsx)(eC,{className:"text-lg",children:"-"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,s.jsx)(eC,{className:"text-lg",children:"-"})]})]})]},`empty-${t}`))]})]})}),(0,s.jsx)(o.Card,{children:(0,s.jsxs)(x.TabGroup,{children:[(0,s.jsxs)(h.TabList,{className:"mb-6",children:[(0,s.jsx)(u.Tab,{children:"DAU/WAU/MAU"}),(0,s.jsx)(u.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,s.jsxs)(g.TabPanels,{children:[(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,s.jsx)(ew.Subtitle,{children:"Active users across different time periods"})]}),(0,s.jsxs)(x.TabGroup,{children:[(0,s.jsxs)(h.TabList,{className:"mb-6",children:[(0,s.jsx)(u.Tab,{children:"DAU"}),(0,s.jsx)(u.Tab,{children:"WAU"}),(0,s.jsx)(u.Tab,{children:"MAU"})]}),(0,s.jsxs)(g.TabPanels,{children:[(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),O?(0,s.jsx)(eb,{isDateChanging:!1}):(0,s.jsx)(C.BarChart,{data:ee,index:"date",categories:Y.map(Z),valueFormatter:e=>ea(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),U?(0,s.jsx)(eb,{isDateChanging:!1}):(0,s.jsx)(C.BarChart,{data:es,index:"week",categories:Q.map(Z),valueFormatter:e=>ea(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),$?(0,s.jsx)(eb,{isDateChanging:!1}):(0,s.jsx)(C.BarChart,{data:et,index:"month",categories:X.map(Z),valueFormatter:e=>ea(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,s.jsx)(p.TabPanel,{children:(0,s.jsx)(eE,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:ea})})]})]})})]})};var eM=e.i(617802),eU=e.i(567425);let eR=({endpointData:e})=>{let t=N.default.useMemo(()=>Object.entries(e||{}).map(([e,s])=>({endpoint:e,"metrics.successful_requests":s.metrics.successful_requests,"metrics.failed_requests":s.metrics.failed_requests,metrics:{successful_requests:s.metrics.successful_requests,failed_requests:s.metrics.failed_requests}})),[e]);return(0,s.jsxs)(w.Card,{children:[(0,s.jsx)(w.CardHeader,{children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(w.CardTitle,{className:"text-base font-semibold",children:"Success vs Failed Requests by Endpoint"}),(0,s.jsx)($.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]})}),(0,s.jsx)(w.CardContent,{children:(0,s.jsx)(C.BarChart,{data:t,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:I.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})})]})};var e$=e.i(564207);let eI=function({dailyData:e}){let t=(0,N.useMemo)(()=>{var s;let t,a;return e?.results&&0!==e.results.length?(s=e.results,t=[],a=new Set,s.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),s.forEach(e=>{let s={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(t=>{let a=e.breakdown.endpoints?.[t];s[t]=a?.metrics.api_requests||0}),t.push(s)}),t.reverse()):[]},[e]),a=(0,N.useMemo)(()=>0===t.length?[]:Object.keys(t[0]).filter(e=>"date"!==e),[t]);return(0,s.jsxs)(w.Card,{className:"mb-6",children:[(0,s.jsx)(w.CardHeader,{children:(0,s.jsx)(w.CardTitle,{className:"text-base font-semibold",children:"Endpoint Usage Trends"})}),(0,s.jsx)(w.CardContent,{children:(0,s.jsx)(e$.LineChart,{className:"h-80",data:t,index:"date",categories:a,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,a.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})})]})};var eP=e.i(497650);let ez=({endpointData:e})=>{let t=Object.entries(e).map(([e,s])=>{var t,a;return{key:e,endpoint:e,successful_requests:s.metrics.successful_requests,failed_requests:s.metrics.failed_requests,api_requests:s.metrics.api_requests,total_tokens:s.metrics.total_tokens,spend:s.metrics.spend,successRate:(t=s.metrics.successful_requests,0===(a=s.metrics.api_requests)?0:t/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,s.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,t)=>{let a=t.api_requests>0?t.successful_requests/t.api_requests*100:0,l=t.api_requests>0?t.failed_requests/t.api_requests*100:0,r={"0%":"#22c55e"};return a>0&&a<100&&(r[`${a}%`]="#22c55e",r[`${a+.01}%`]="#ef4444"),r["100%"]=l>0?"#ef4444":"#22c55e",(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)("div",{className:"flex-1 relative",children:(0,s.jsx)(eP.Progress,{percent:a+l,size:"small",strokeColor:r,showInfo:!1})}),(0,s.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,s.jsx)("span",{className:"text-green-600 font-medium",children:t.successful_requests.toLocaleString()}),(0,s.jsx)("span",{className:"text-gray-400",children:"/"}),(0,s.jsx)("span",{className:"text-red-600 font-medium",children:t.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let t=e.toFixed(2);return(0,s.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[t,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>(0,s.jsx)(B.MoneyCell,{value:e,decimals:2})}];return(0,s.jsx)(V.Table,{columns:a,dataSource:t,pagination:!1})},eB=({userSpendData:e})=>{let t=(0,N.useMemo)(()=>{let s={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,t])=>{s[e]||(s[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:t.metadata||{},api_key_breakdown:{}}),s[e].metrics.spend+=t.metrics.spend,s[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,s[e].metrics.completion_tokens+=t.metrics.completion_tokens,s[e].metrics.total_tokens+=t.metrics.total_tokens,s[e].metrics.api_requests+=t.metrics.api_requests,s[e].metrics.successful_requests+=t.metrics.successful_requests||0,s[e].metrics.failed_requests+=t.metrics.failed_requests||0,s[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,s[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),s},[e]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(ez,{endpointData:t}),(0,s.jsx)(eR,{endpointData:t}),(0,s.jsx)(eI,{dailyData:e})]})};var eV=e.i(214541),eW=e.i(325738);let{Text:eH}=T.Typography,eK=({value:e=[],onChange:t,disabled:a,organizationId:l,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[d,m]=(0,N.useState)(""),[u,x]=(0,n.useDebouncedState)("",{wait:c.DEBOUNCE_WAIT_MS}),{data:h,fetchNextPage:p,hasNextPage:g,isFetchingNextPage:_,isLoading:j}=(0,ei.useInfiniteTeams)(i,u||void 0,l),f=(0,N.useMemo)(()=>{if(!h?.pages)return[];let e=new Set,s=[];for(let t of h.pages)for(let a of t.teams)e.has(a.team_id)||(e.add(a.team_id),s.push(a));return s},[h]);return(0,s.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>t?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{m(e),x(e)},searchValue:d,onPopupScroll:e=>{let s=e.currentTarget;(s.scrollTop+s.clientHeight)/s.scrollHeight>=.8&&g&&!_&&p()},loading:j,notFoundContent:j?(0,s.jsx)(r.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,s.jsxs)(s.Fragment,{children:[e,_&&(0,s.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,s.jsx)(r.LoadingOutlined,{spin:!0})})]}),children:f.map(e=>(0,s.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,s.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,s.jsxs)(eH,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eG=e.i(174553);let eZ=[{value:"groups",label:"Public Model Name"},{value:"individual",label:"Litellm Model Name"}];function eJ({value:e,onChange:t}){return(0,s.jsx)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:eZ.map(a=>(0,s.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${e===a.value?"bg-white shadow-xs text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>t(a.value),children:a.label},a.value))})}var eY=e.i(1023),eQ=e.i(149121);function eX({topModels:e,topModelsLimit:t,setTopModelsLimit:a}){let[l,r]=(0,N.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",meta:{numeric:!0},cell:e=>(0,s.jsx)(B.MoneyCell,{value:e.getValue(),decimals:2})},{header:"Successful",accessorKey:"successful_requests",meta:{numeric:!0},cell:e=>(0,s.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",meta:{numeric:!0},cell:e=>(0,s.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",meta:{numeric:!0},cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,t);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,s.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:t,onChange:e=>a(e)}),(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:()=>r("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===l?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,s.jsx)("button",{onClick:()=>r("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===l?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===l?(0,s.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,s.jsx)(C.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,t)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,U.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,s.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,s.jsx)(eQ.DataTable,{columns:i,data:n,isLoading:!1})})]})}let e0={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},e1=({accessToken:e,entityType:t,entityId:l,entityList:i,dateValue:n})=>{let c,b,k,{teams:v}=(0,eV.default)(),[T,q]=(0,N.useState)([]),[S,L]=(0,N.useState)("groups"),[A,D]=(0,N.useState)(5),[E,O]=(0,N.useState)(5),[M,R]=(0,N.useState)(5),$=(0,N.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),I=(0,N.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,N.useMemo)(()=>"user"===t?T.length>0?T[0]:null:T.length>0?T:null,[t,T]),z=e0[t],V=!!e&&!!$&&!!I,{data:W,isFetchingMore:H,progress:K,cancelled:Z,cancel:Q}=(0,eU.usePaginatedDailyActivity)({fetchFn:z,args:[e,$,I,P],enabled:V}),{data:X,isFetchingMore:ee,progress:es,cancelled:et,cancel:ea}=(0,eU.usePaginatedDailyActivity)({fetchFn:F.agentDailyActivityCall,args:[e,$,I,null],enabled:V&&"team"===t}),el="groups"===S?"model_groups":"models",er=Y(W,el,v||[]),ei=Y(W,"api_keys",v||[]),en="team"===t?Y(X,"entities",v||[]):{},ec=()=>{let e={};return W.results.forEach(s=>{Object.entries(s.breakdown.providers||{}).forEach(([s,t])=>{e[s]||(e[s]={provider:s,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[s].spend+=t.metrics.spend,e[s].requests+=t.metrics.api_requests,e[s].successful_requests+=t.metrics.successful_requests,e[s].failed_requests+=t.metrics.failed_requests,e[s].tokens+=t.metrics.total_tokens}catch(e){console.error(`Error processing provider ${s}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,s)=>s.spend-e.spend)},eo=(e,s)=>{if(i){let s=i.find(s=>s.value===e);if(s)return s.label}return s?.team_alias?s.team_alias:s?.user_email?s.user_email:s?.user_alias?s.user_alias:e},ed=()=>{var e;let s={};return W.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{s[e]||(s[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:eo(e,t.metadata),id:e}}),s[e].metrics.spend+=t.metrics.spend,s[e].metrics.api_requests+=t.metrics.api_requests,s[e].metrics.successful_requests+=t.metrics.successful_requests,s[e].metrics.failed_requests+=t.metrics.failed_requests,s[e].metrics.total_tokens+=t.metrics.total_tokens})}),e=Object.values(s).sort((e,s)=>s.metrics.spend-e.metrics.spend),0===T.length?e:e.filter(e=>T.includes(e.metadata.id))},em=t.charAt(0).toUpperCase()+t.slice(1),eu="groups"===S?"Top Public Model Names":"Top Litellm Models",ex=[{key:"cost",label:"Cost",content:(0,s.jsxs)(m.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)(j.Title,{children:[em," Spend Overview"]}),(0,s.jsxs)(m.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Total Spend"}),(0,s.jsxs)(_.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,U.formatNumberWithCommas)(W.metadata.total_spend,2)]})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Total Requests"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2",children:W.metadata.total_api_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Successful Requests"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:W.metadata.total_successful_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Failed Requests"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:W.metadata.total_failed_requests.toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Total Tokens"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2",children:W.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsxs)(w.Card,{children:[(0,s.jsx)(w.CardHeader,{children:(0,s.jsx)(w.CardTitle,{className:"text-base font-semibold",children:"Daily Spend"})}),(0,s.jsx)(w.CardContent,{children:(0,s.jsx)(C.BarChart,{data:[...W.results].sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:G,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:t})=>{if(!t||!e?.[0])return null;let a=e[0].payload,l=Object.keys(a.breakdown.entities||{}).length;return(0,s.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,s.jsx)("p",{className:"font-bold",children:a.date}),(0,s.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,U.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Total ",em,"s: ",l]}),(0,s.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,s.jsxs)("p",{className:"font-semibold",children:["Spend by ",em,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,s])=>{let t=e.metrics.spend;return s.metrics.spend-t}).slice(0,5).map(([e,t])=>(0,s.jsxs)("p",{className:"text-sm text-gray-600",children:[eo(e,t.metadata),": $",(0,U.formatNumberWithCommas)(t.metrics.spend,2)]},e)),l>5&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",l-5," more"]})]})]})}})})]})}),(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsx)(o.Card,{children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,s.jsxs)(j.Title,{children:["Spend Per ",em]}),(0,s.jsx)(ew.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,s.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,s.jsxs)("span",{children:["Get Started by Tracking cost per ",em," "]}),(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,s.jsxs)(m.Grid,{numItems:2,className:"gap-6",children:[(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsx)(C.BarChart,{className:"mt-4 h-52",data:ed().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?`${e.metadata.alias.slice(0,15)}...`:e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:G,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:t})=>{if(!t||!e?.[0])return null;let a=e[0].payload;return(0,s.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,s.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,s.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,U.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,s.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,s.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,s.jsxs)(eq.Table,{children:[(0,s.jsx)(eS.TableHead,{children:(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eA.TableHeaderCell,{children:em}),(0,s.jsx)(eA.TableHeaderCell,{children:"Spend"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,s.jsx)(eA.TableHeaderCell,{children:"Tokens"})]})}),(0,s.jsx)(eD.TableBody,{children:ed().filter(e=>e.metrics.spend>0).map(e=>(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eF.TableCell,{children:e.metadata.alias}),(0,s.jsx)(eF.TableCell,{children:(0,s.jsx)(B.MoneyCell,{value:e.metrics.spend,decimals:4})}),(0,s.jsx)(eF.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,s.jsx)(eF.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,s.jsx)(eF.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,s.jsx)(eY.default,{topKeys:(c={},W.results.forEach(e=>{let{breakdown:s}=e,{entities:t}=s,a=Object.keys(t).reduce((e,s)=>{let{api_key_breakdown:a}=t[s];return Object.keys(a).forEach(t=>{let l={tag:s,usage:a[t].metrics.spend};e[t]?e[t].push(l):e[t]=[l]}),e},{});Object.entries(e.breakdown.api_keys||{}).forEach(([e,s])=>{c[e]||(c[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:s.metadata.key_alias,team_id:s.metadata.team_id||null,tags:a[e]||[]}}),c[e].metrics.spend+=s.metrics.spend,c[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,c[e].metrics.completion_tokens+=s.metrics.completion_tokens,c[e].metrics.total_tokens+=s.metrics.total_tokens,c[e].metrics.api_requests+=s.metrics.api_requests,c[e].metrics.successful_requests+=s.metrics.successful_requests,c[e].metrics.failed_requests+=s.metrics.failed_requests,c[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,c[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(c).map(([e,s])=>({api_key:e,key_alias:s.metadata.key_alias||"-",tags:s.metadata.tags||"-",spend:s.metrics.spend})).sort((e,s)=>s.spend-e.spend).slice(0,A)),teams:null,showTags:"tag"===t,topKeysLimit:A,setTopKeysLimit:D})]})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(j.Title,{children:"agent"===t?"Top Agents":eu}),(0,s.jsx)(eJ,{value:S,onChange:L})]}),(0,s.jsx)(eX,{topModels:(b={},W.results.forEach(e=>{Object.entries(e.breakdown[el]||{}).forEach(([e,s])=>{b[e]||(b[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{b[e].spend+=s.metrics.spend}catch(t){console.error(`Error adding spend for ${e}: ${t}, got metrics: ${JSON.stringify(s)}`)}b[e].requests+=s.metrics.api_requests,b[e].successful_requests+=s.metrics.successful_requests,b[e].failed_requests+=s.metrics.failed_requests,b[e].tokens+=s.metrics.total_tokens})}),Object.entries(b).map(([e,s])=>({key:e,...s})).sort((e,s)=>s.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),"team"===t&&(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,s.jsx)(eX,{topModels:(k={},X.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:s.metadata?.agent_name||e}),k[e].spend+=s.metrics.spend,k[e].requests+=s.metrics.api_requests,k[e].successful_requests+=s.metrics.successful_requests,k[e].failed_requests+=s.metrics.failed_requests,k[e].tokens+=s.metrics.total_tokens})}),Object.entries(k).map(([e,s])=>({key:s.agent_name,...s})).sort((e,s)=>s.spend-e.spend).slice(0,M)),topModelsLimit:M,setTopModelsLimit:R})]})}),(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsx)(o.Card,{children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsx)(j.Title,{children:"Provider Usage"}),(0,s.jsxs)(m.Grid,{numItems:2,children:[(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsx)(eW.DonutChart,{className:"mt-4 h-40",data:ec(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,U.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"],showLabel:!0,startAngle:90,endAngle:-270})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsxs)(eq.Table,{children:[(0,s.jsx)(eS.TableHead,{children:(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eA.TableHeaderCell,{children:"Provider"}),(0,s.jsx)(eA.TableHeaderCell,{children:"Spend"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,s.jsx)(eA.TableHeaderCell,{children:"Tokens"})]})}),(0,s.jsx)(eD.TableBody,{children:ec().map(e=>(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eF.TableCell,{children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,s.jsx)(eG.Logo,{provider:e.provider,className:"w-4 h-4"}),(0,s.jsx)("span",{children:e.provider})]})}),(0,s.jsx)(eF.TableCell,{children:(0,s.jsx)(B.MoneyCell,{value:e.spend,decimals:2})}),(0,s.jsx)(eF.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,s.jsx)(eF.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,s.jsx)(eF.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})},{key:"models",label:"agent"===t?"Request / Token Consumption":"Model Activity",content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex justify-end mt-2 mb-4",children:(0,s.jsx)(eJ,{value:S,onChange:L})}),(0,s.jsx)(J,{modelMetrics:er,hidePromptCachingMetrics:"agent"===t})]})},..."team"===t?[{key:"agents",label:"Agent Activity",content:(0,s.jsx)(J,{modelMetrics:en})}]:[],{key:"keys",label:"Key Activity",content:(0,s.jsx)(J,{modelMetrics:ei,hidePromptCachingMetrics:"agent"===t})},{key:"endpoints",label:"Endpoint Activity",content:(0,s.jsx)(eB,{userSpendData:W})}];return(0,s.jsxs)("div",{style:{width:"100%"},className:"relative",children:[H&&(0,s.jsx)(f.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)(r.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",K.currentPage," / ",K.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,s.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,s.jsx)(a.ExportOutlined,{})]}),"."]}),(0,s.jsx)(y.Button,{type:"primary",danger:!0,onClick:Q,children:"Stop"})]})}),Z&&(0,s.jsx)(f.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,s.jsxs)("span",{children:["Showing partial data (",K.currentPage,"/",K.totalPages," pages loaded)"]})}),ee&&"team"===t&&(0,s.jsx)(f.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)(r.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching agent data: fetched ",es.currentPage," / ",es.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,s.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,s.jsx)(a.ExportOutlined,{})]}),"."]}),(0,s.jsx)(y.Button,{type:"primary",danger:!0,onClick:ea,children:"Stop"})]})}),et&&"team"===t&&(0,s.jsx)(f.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,s.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===t&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(_.Text,{className:"mb-2",children:"Filter by team"}),(0,s.jsx)(eK,{value:T,onChange:q})]}),(0,s.jsx)(ej,{dateValue:n,entityType:t,spendData:W,showFilters:"team"!==t&&null!==i&&i.length>0,filterLabel:`Filter by ${t}`,filterPlaceholder:`Select ${t} to filter...`,selectedFilters:T,onFiltersChange:q,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===t?"single":"multiple",teams:v||[]}),(0,s.jsxs)(x.TabGroup,{children:[(0,s.jsx)(h.TabList,{variant:"solid",className:"mt-1",children:ex.map(({key:e,label:t})=>(0,s.jsx)(u.Tab,{children:t},e))}),(0,s.jsx)(g.TabPanels,{children:ex.map(({key:e,content:t})=>(0,s.jsx)(p.TabPanel,{children:t},e))})]})]})};var e2=e.i(793130),e4=e.i(418371);let e6=({loading:e,isDateChanging:t,providerSpend:a})=>{let[r,i]=(0,N.useState)(!1),[n,c]=(0,N.useState)(!1),u=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!r||e.spend>0);return(0,s.jsxs)(o.Card,{className:"h-full",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(j.Title,{children:"Spend by Provider"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,s.jsx)(e2.Switch,{checked:r,onChange:i})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,s.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,s.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,s.jsx)(e2.Switch,{checked:n,onChange:c})]})]})]}),e?(0,s.jsx)(eb,{isDateChanging:t}):(0,s.jsxs)(m.Grid,{numItems:2,children:[(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsx)(eW.DonutChart,{className:"mt-4 h-40",data:u,index:"provider",category:"spend",valueFormatter:e=>`$${(0,U.formatNumberWithCommas)(e,2)}`,colors:["cyan"],showLabel:!0,startAngle:90,endAngle:-270})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsxs)(eq.Table,{children:[(0,s.jsx)(eS.TableHead,{children:(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eA.TableHeaderCell,{children:"Provider"}),(0,s.jsx)(eA.TableHeaderCell,{children:"Spend"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,s.jsx)(eA.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,s.jsx)(eA.TableHeaderCell,{children:"Tokens"})]})}),(0,s.jsx)(eD.TableBody,{children:u.map(e=>(0,s.jsxs)(eL.TableRow,{children:[(0,s.jsx)(eF.TableCell,{children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,s.jsx)(e4.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,s.jsx)("span",{children:e.provider})]})}),(0,s.jsx)(eF.TableCell,{children:(0,s.jsx)(B.MoneyCell,{value:e.spend,decimals:2})}),(0,s.jsx)(eF.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,s.jsx)(eF.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,s.jsx)(eF.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var e5=e.i(311451),e3=e.i(918789);let{TextArea:e8}=e5.Input,e7={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},e9=({step:e})=>{let t=e7[e.tool_name]||"🔧",a=e.arguments,l=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",r=a.team_ids||a.tags||a.user_id||"";return(0,s.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-gray-100 border border-gray-200 text-xs",children:[(0,s.jsx)("span",{className:"shrink-0 mt-0.5",children:"running"===e.status?(0,s.jsx)(ea.Spin,{size:"small"}):"error"===e.status?(0,s.jsx)("span",{className:"text-red-500",children:"✗"}):(0,s.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"font-medium text-gray-700",children:[t," ",e.tool_label]}),l&&(0,s.jsx)("div",{className:"text-gray-500 mt-0.5",children:l}),r&&(0,s.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",r]}),"error"===e.status&&e.error&&(0,s.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},se=({content:e})=>(0,s.jsx)(e3.default,{components:{p:({children:e})=>(0,s.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,s.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,s.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,s.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,s.jsx)("li",{children:e}),h1:({children:e})=>(0,s.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,s.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,s.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:t})=>t?.includes("language-")?(0,s.jsx)("pre",{className:"bg-gray-100 rounded-sm p-2 my-1 overflow-x-auto text-xs",children:(0,s.jsx)("code",{children:e})}):(0,s.jsx)("code",{className:"px-1 py-0.5 rounded-sm bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,s.jsx)("div",{className:"overflow-x-auto my-2",children:(0,s.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,s.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,s.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),ss=({open:e,onClose:t,accessToken:a})=>{let[l,r]=(0,N.useState)([]),[i,n]=(0,N.useState)(""),[c,o]=(0,N.useState)(!1),[d,m]=(0,N.useState)(void 0),[u,x]=(0,N.useState)([]),[h,p]=(0,N.useState)(!1),[g,_]=(0,N.useState)(""),[j,f]=(0,N.useState)(null),[b,v]=(0,N.useState)([]),T=(0,N.useRef)(null),C=(0,N.useRef)(null);(0,N.useEffect)(()=>{e&&0===u.length&&w()},[e]),(0,N.useEffect)(()=>{"function"==typeof T.current?.scrollIntoView&&T.current.scrollIntoView({behavior:"smooth"})},[l,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let s=e.data.map(e=>e.model_group).sort();x(s)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},q=async()=>{if(!a||!i.trim()||c)return;let e=[...l,{role:"user",content:i.trim()}];r(e),n(""),o(!0),_(""),f(null),v([]);let s=new AbortController;C.current=s;let t="",m=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{f(null),t+=e,_(t)},()=>{f(null),v([]),r(e=>[...e,{role:"assistant",content:t,toolCalls:m.length>0?[...m]:void 0}]),_("")},e=>{f(null),v([]),r(s=>[...s,{role:"assistant",content:`Error: ${e}`}]),_("")},e=>{f(e)},e=>{let s=m.findIndex(s=>s.tool_name===e.tool_name);s>=0?m[s]={...e}:m.push({...e}),v([...m])},s.signal)}catch(t){if(t?.name==="AbortError"||s.signal.aborted)return;let e=t?.message||"Failed to get response. Please try again.";r(s=>[...s,{role:"assistant",content:`Error: ${e}`}]),_("")}finally{o(!1),C.current=null}};return(0,s.jsxs)("div",{"data-testid":"usage-ai-chat-panel",className:`fixed top-0 right-0 h-full bg-white border-l border-gray-200 shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out ${e?"translate-x-0":"translate-x-full"}`,style:{width:420},children:[(0,s.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 shrink-0",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,s.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),(0,s.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,s.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),t()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,s.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 shrink-0",children:(0,s.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>m(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:u.map(e=>({label:e,value:e})),filterOption:(e,s)=>(s?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===l.length&&!g&&!c&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,s.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})}),(0,s.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,s.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),l.map((e,t)=>(0,s.jsx)("div",{children:"user"===e.role?(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("div",{className:"max-w-[88%] rounded-xl px-3.5 py-2 text-sm leading-relaxed bg-blue-600 text-white",children:e.content})}):(0,s.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,s.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,t)=>(0,s.jsx)(e9,{step:e},t))}),(0,s.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,s.jsx)(se,{content:e.content})})]})},t)),c&&b.length>0&&(0,s.jsx)("div",{className:"space-y-1.5",children:b.map((e,t)=>(0,s.jsx)(e9,{step:e},t))}),c&&!g&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,s.jsx)(ea.Spin,{size:"small"}),(0,s.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,s.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,s.jsx)(se,{content:g})}),(0,s.jsx)("div",{ref:T})]}),(0,s.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white shrink-0",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(e8,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),q())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:c}),(0,s.jsx)(y.Button,{type:"primary",onClick:q,disabled:!i.trim()||c,loading:c,children:"Send"})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,s.jsx)("button",{onClick:()=>{r([]),_(""),v([]),f(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===l.length,children:"Clear chat"}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};e.i(247167);var st=e.i(931067);let sa={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"};var sl=e.i(9583),sr=N.forwardRef(function(e,s){return N.createElement(sl.default,(0,st.default)({},e,{ref:s,icon:sa}))});let si={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"};var sn=N.forwardRef(function(e,s){return N.createElement(sl.default,(0,st.default)({},e,{ref:s,icon:si}))}),sc=e.i(160818);let so={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"};var sd=N.forwardRef(function(e,s){return N.createElement(sl.default,(0,st.default)({},e,{ref:s,icon:so}))}),sm=e.i(983561);let su={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"};var sx=N.forwardRef(function(e,s){return N.createElement(sl.default,(0,st.default)({},e,{ref:s,icon:su}))}),sh=e.i(232164),sp=e.i(645526),sg=e.i(771674),s_=e.i(906579);let sj=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,s.jsx)(sc.GlobalOutlined,{style:{fontSize:"16px"}})},{value:"my-usage",label:"Your Usage",description:"View your own usage",icon:(0,s.jsx)(sg.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,s.jsx)(sr,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,s.jsx)(sp.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,s.jsx)(sx,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,s.jsx)(sh.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,s.jsx)(sm.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,s.jsx)(sg.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,s.jsx)(sd,{style:{fontSize:"16px"}}),adminOnly:!0}],sf=({value:e,onChange:t,isAdmin:a,canViewTagUsage:l=!1,title:r="Usage View",description:i="Select the usage data you want to view","data-id":n})=>{let c=sj.filter(e=>"tag"===e.value&&!!l||!e.adminOnly||!!a).map(e=>{let s=e.label,t=e.description;return e.showForAdmin&&e.showForNonAdmin&&(s=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(t=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:s,description:t,icon:e.icon,badgeText:e.badgeText}});return(0,s.jsx)("div",{className:"w-full","data-id":n,children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,s.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,s.jsx)("div",{className:"shrink-0 flex items-center",children:(0,s.jsx)(sn,{style:{fontSize:"32px"}})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,s.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:i})]})]}),(0,s.jsx)("div",{className:"shrink-0",children:(0,s.jsx)(k.Select,{value:e,onChange:t,className:"w-54 sm:w-64 md:w-72",size:"large",options:c.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let t=c.find(s=>s.value===e.value);return t?(0,s.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,s.jsx)("div",{className:"shrink-0 mt-0.5",children:t.icon}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-900",children:t.label}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:t.description})]}),t.badgeText&&(0,s.jsx)("div",{className:"items-center",children:(0,s.jsx)(s_.Badge,{color:"blue",count:t.badgeText})})]}):e.label},labelRender:e=>{let t=c.find(s=>s.value===e.value);return t?(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{children:t.icon}),(0,s.jsx)("span",{className:"text-sm",children:t.label})]}):e.label}})})]})})},sy=({teams:e,organizations:R})=>{let $,{accessToken:I,userRole:P,userId:z,premiumUser:B}=(0,A.default)(),[V,W]=(0,N.useState)(null),[H,K]=(0,N.useState)(!1),[Z,Q]=(0,N.useState)(!1),[X,ee]=(0,N.useState)(!1),es=(0,N.useMemo)(()=>new Date(Date.now()-6048e5),[]),et=(0,N.useMemo)(()=>new Date,[]),[ea,el]=(0,N.useState)({from:es,to:et}),[ei,en]=(0,N.useState)([]),{data:ec=[]}=(()=>{let{accessToken:e,userRole:s}=(0,A.default)();return S.$api.useQuery("get","/customer/list",{},{enabled:!!e&&L.all_admin_roles.includes(s),select:e=>e??[]})})(),{data:eo}=(0,q.useAgents)(),{data:ed}=(0,D.useCurrentUser)(),em=L.all_admin_roles.includes(P||""),eu=em||L.internalUserRoles.includes(P||""),[ex,eh]=(0,N.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:c.DEBOUNCE_WAIT_MS}),{data:ej,fetchNextPage:ey,hasNextPage:ek,isFetchingNextPage:ev,isLoading:eT}=((e=M,s)=>{let{accessToken:t,userRole:a}=(0,A.default)();return(0,E.useInfiniteQuery)({queryKey:O.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:a})=>await (0,F.userListCall)(t,null,a,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.page{if(!ej?.pages)return[];let e=new Set,s=[];for(let t of ej.pages)for(let a of t.users)e.has(a.user_id)||(e.add(a.user_id),s.push({value:a.user_id,label:a.user_alias?`${a.user_alias} (${a.user_id})`:a.user_email?`${a.user_email} (${a.user_id})`:a.user_id}));return s},[ej]),[eC,ew]=(0,N.useState)(em?null:z||null),[eq,eS]=(0,N.useState)("groups"),[eL,eA]=(0,N.useState)(!1),[eD,eF]=(0,N.useState)(!1),[eE,eR]=(0,N.useState)(!1),[e$,eI]=(0,N.useState)("global"),[eP,ez]=(0,N.useState)(!0),[eV,eW]=(0,N.useState)(5),[eH,eK]=(0,N.useState)(5),[eG,eZ]=(0,N.useState)(!1);(0,N.useEffect)(()=>{!em&&z&&ew(z)},[em,z]);let eQ="my-usage"!==e$&&em?eC:z||null,eX=(0,N.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),e0=(0,N.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]);(0,N.useEffect)(()=>{if(!I)return;let e=!1;return(async()=>{try{let s=await (0,F.tagListCall)(I,eX,e0);if(e)return;en(Object.values(s).map(e=>({label:e.name,value:e.name})))}catch(s){e||console.error("Failed to fetch tag list",s)}})(),()=>{e=!0}},[I,eX,e0]);let e2=(0,N.useRef)(0);(0,N.useEffect)(()=>{if(!I||!eX||!e0)return;let e=++e2.current;Q(!0),K(!1),W(null),(0,F.userDailyActivityAggregatedCall)(I,eX,e0,eQ).then(s=>{e2.current===e&&(W(s),Q(!1),ee(!1))}).catch(()=>{e2.current===e&&(K(!0),Q(!1))})},[I,eX,e0,eQ]);let e4=(0,eU.usePaginatedDailyActivity)({fetchFn:F.userDailyActivityCall,args:[I,eX,e0,eQ],enabled:H&&!!I&&!!eX&&!!e0}),e5=(0,N.useMemo)(()=>V||(H?e4.data:{results:[],metadata:{}}),[V,H,e4.data]),e3=Z||e4.loading;(0,N.useEffect)(()=>{H&&!e4.loading&&e4.data.results.length>0&&ee(!1)},[H,e4.loading,e4.data.results.length]);let e8=(0,N.useCallback)(e=>{ee(!0),el(e)},[]),e7=e5.metadata?.total_spend||0,e9=(0,N.useMemo)(()=>{let e={};return e5.results.forEach(s=>{Object.entries(s.breakdown.models||{}).forEach(([s,t])=>{e[s]||(e[s]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[s].metrics.spend+=t.metrics.spend,e[s].metrics.prompt_tokens+=t.metrics.prompt_tokens,e[s].metrics.completion_tokens+=t.metrics.completion_tokens,e[s].metrics.total_tokens+=t.metrics.total_tokens,e[s].metrics.api_requests+=t.metrics.api_requests,e[s].metrics.successful_requests+=t.metrics.successful_requests||0,e[s].metrics.failed_requests+=t.metrics.failed_requests||0,e[s].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,e[s].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,s])=>({key:e,spend:s.metrics.spend,requests:s.metrics.api_requests,successful_requests:s.metrics.successful_requests,failed_requests:s.metrics.failed_requests,tokens:s.metrics.total_tokens})).sort((e,s)=>s.spend-e.spend).slice(0,eH)},[e5.results,eH]),se=(0,N.useMemo)(()=>{let e={};return e5.results.forEach(s=>{Object.entries(s.breakdown.model_groups||{}).forEach(([s,t])=>{e[s]||(e[s]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[s].metrics.spend+=t.metrics.spend,e[s].metrics.prompt_tokens+=t.metrics.prompt_tokens,e[s].metrics.completion_tokens+=t.metrics.completion_tokens,e[s].metrics.total_tokens+=t.metrics.total_tokens,e[s].metrics.api_requests+=t.metrics.api_requests,e[s].metrics.successful_requests+=t.metrics.successful_requests||0,e[s].metrics.failed_requests+=t.metrics.failed_requests||0,e[s].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,e[s].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,s])=>({key:e,spend:s.metrics.spend,requests:s.metrics.api_requests,successful_requests:s.metrics.successful_requests,failed_requests:s.metrics.failed_requests,tokens:s.metrics.total_tokens})).sort((e,s)=>s.spend-e.spend).slice(0,eH)},[e5.results,eH]),st=(0,N.useMemo)(()=>{let e={};return e5.results.forEach(s=>{Object.entries(s.breakdown.providers||{}).forEach(([s,t])=>{e[s]||(e[s]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[s].metrics.spend+=t.metrics.spend,e[s].metrics.prompt_tokens+=t.metrics.prompt_tokens,e[s].metrics.completion_tokens+=t.metrics.completion_tokens,e[s].metrics.total_tokens+=t.metrics.total_tokens,e[s].metrics.api_requests+=t.metrics.api_requests,e[s].metrics.successful_requests+=t.metrics.successful_requests||0,e[s].metrics.failed_requests+=t.metrics.failed_requests||0,e[s].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,e[s].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,s])=>({provider:e,spend:s.metrics.spend,requests:s.metrics.api_requests,successful_requests:s.metrics.successful_requests,failed_requests:s.metrics.failed_requests,tokens:s.metrics.total_tokens}))},[e5.results]),sa=(0,N.useMemo)(()=>{let e={};return e5.results.forEach(s=>{Object.entries(s.breakdown.api_keys||{}).forEach(([s,t])=>{e[s]||(e[s]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:t.metadata.key_alias,team_id:null,tags:t.metadata.tags||[]}}),e[s].metrics.spend+=t.metrics.spend,e[s].metrics.prompt_tokens+=t.metrics.prompt_tokens,e[s].metrics.completion_tokens+=t.metrics.completion_tokens,e[s].metrics.total_tokens+=t.metrics.total_tokens,e[s].metrics.api_requests+=t.metrics.api_requests,e[s].metrics.successful_requests+=t.metrics.successful_requests,e[s].metrics.failed_requests+=t.metrics.failed_requests,e[s].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,e[s].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,s])=>({api_key:e,key_alias:s.metadata.key_alias||"-",tags:s.metadata.tags||[],spend:s.metrics.spend})).sort((e,s)=>s.spend-e.spend).slice(0,eV)},[e5.results,eV]),sl=(0,N.useMemo)(()=>[...e5.results].sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),[e5.results]),sr=(0,N.useMemo)(()=>Y(e5,"groups"===eq?"model_groups":"models",e),[e5,eq,e]),si=(0,N.useMemo)(()=>Y(e5,"api_keys",e),[e5,e]),sn=(0,N.useMemo)(()=>Y(e5,"mcp_servers",e),[e5,e]);return(0,s.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,s.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,s.jsx)(sf,{value:e$,onChange:e=>eI(e),isAdmin:em,canViewTagUsage:eu}),(0,s.jsx)(ef.default,{value:ea,onValueChange:e8})]}),e4.isFetchingMore&&(0,s.jsx)(f.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)(r.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",e4.progress.currentPage," /"," ",e4.progress.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,s.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,s.jsx)(a.ExportOutlined,{})]}),"."]}),(0,s.jsx)(y.Button,{type:"primary",danger:!0,onClick:e4.cancel,children:"Stop"})]})}),e4.cancelled&&(0,s.jsx)(f.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,s.jsxs)("span",{children:["Showing partial data (",e4.progress.currentPage,"/",e4.progress.totalPages," ","pages loaded)"]})}),("global"===e$||"my-usage"===e$)&&(0,s.jsxs)(s.Fragment,{children:[em&&"global"===e$&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(_.Text,{className:"mb-2",children:"Filter by user"}),(0,s.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:eC,onChange:e=>ew(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let s=e.currentTarget;(s.scrollTop+s.clientHeight)/s.scrollHeight>=.8&&ek&&!ev&&ey()},loading:eT,notFoundContent:eT?(0,s.jsx)(r.LoadingOutlined,{spin:!0}):"No users found",options:eN,popupRender:e=>(0,s.jsxs)(s.Fragment,{children:[e,ev&&(0,s.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,s.jsx)(r.LoadingOutlined,{spin:!0})})]})})]}),(0,s.jsxs)(x.TabGroup,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,s.jsx)(u.Tab,{children:"Cost"}),(0,s.jsx)(u.Tab,{children:"Model Activity"}),(0,s.jsx)(u.Tab,{children:"Key Activity"}),(0,s.jsx)(u.Tab,{children:"MCP Server Activity"}),(0,s.jsx)(u.Tab,{children:"Endpoint Activity"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(y.Button,{onClick:()=>eR(!0),icon:(0,s.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,s.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),children:"Ask AI"}),(0,s.jsx)(y.Button,{onClick:()=>eF(!0),icon:(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,s.jsxs)(g.TabPanels,{children:[(0,s.jsx)(p.TabPanel,{children:(0,s.jsxs)(m.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,s.jsxs)(d.Col,{numColSpan:2,children:[(0,s.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,s.jsxs)(_.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,s.jsxs)(s.Fragment,{children:[ea.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:ea.from.getFullYear()!==ea.to.getFullYear()?"numeric":void 0})," - ",ea.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})}),(0,s.jsx)(eM.default,{userSpend:e7,selectedTeam:null,userMaxBudget:ed?.max_budget||null})]}),(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Usage Metrics"}),(0,s.jsxs)(m.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Total Requests"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2",children:e5.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Successful Requests"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e5.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.Title,{children:"Failed Requests"}),(0,s.jsx)(v.Tooltip,{title:"Includes requests that failed to route to a provider, tool usage failures, and other request errors where the provider cannot be determined.",children:(0,s.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e5.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Average Cost per Request"}),(0,s.jsxs)(_.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,U.formatNumberWithCommas)((e7||0)/(e5.metadata?.total_api_requests||1),4)]})]}),(0,s.jsxs)(o.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eZ(!eG),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.Title,{children:"Total Tokens"}),eG?(0,s.jsx)(t.DownOutlined,{className:"text-gray-400 text-xs"}):(0,s.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2",children:e5.metadata?.total_tokens?.toLocaleString()||0})]})]}),eG&&(0,s.jsxs)(m.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Input Tokens"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:(e5.metadata?.total_prompt_tokens||0).toLocaleString()})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Output Tokens"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e5.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e5.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,s.jsxs)(o.Card,{children:[(0,s.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,s.jsx)(_.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e5.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsxs)(w.Card,{children:[(0,s.jsx)(w.CardHeader,{children:(0,s.jsx)(w.CardTitle,{className:"text-base font-semibold",children:"Daily Spend"})}),(0,s.jsx)(w.CardContent,{children:e3?(0,s.jsx)(eb,{isDateChanging:X}):(0,s.jsx)(C.BarChart,{data:sl,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:G,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:t})=>{if(!t||!e?.[0])return null;let a=e[0].payload;return(0,s.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,s.jsx)("p",{className:"font-bold",children:a.date}),(0,s.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,U.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})})]})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsxs)(o.Card,{className:"h-full",children:[(0,s.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,s.jsx)(eY.default,{topKeys:sa,teams:null,topKeysLimit:eV,setTopKeysLimit:eW})]})}),(0,s.jsx)(d.Col,{numColSpan:1,children:(0,s.jsxs)(o.Card,{className:"h-full",children:[(0,s.jsx)(j.Title,{children:"groups"===eq?"Top Public Model Names":"Top Litellm Models"}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eH,onChange:e=>eK(e)}),(0,s.jsx)(eJ,{value:eq,onChange:eS})]}),e3?(0,s.jsx)(eb,{isDateChanging:X}):(0,s.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:($="groups"===eq?se:e9,(0,s.jsx)(C.BarChart,{className:"mt-4",style:{height:52*Math.min($.length,eH)},data:$,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:G,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:t})=>{if(!t||!e?.[0])return null;let a=e[0].payload;return(0,s.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,s.jsx)("p",{className:"font-bold",children:a.key}),(0,s.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,U.formatNumberWithCommas)(a.spend,2)]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,s.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,s.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,s.jsx)(d.Col,{numColSpan:2,children:(0,s.jsx)(e6,{loading:e3,isDateChanging:X,providerSpend:st})})]})}),(0,s.jsxs)(p.TabPanel,{children:[(0,s.jsx)("div",{className:"flex justify-end mt-2 mb-4",children:(0,s.jsx)(eJ,{value:eq,onChange:eS})}),(0,s.jsx)(J,{modelMetrics:sr})]}),(0,s.jsx)(p.TabPanel,{children:(0,s.jsx)(J,{modelMetrics:si})}),(0,s.jsx)(p.TabPanel,{children:(0,s.jsx)(J,{modelMetrics:sn})}),(0,s.jsx)(p.TabPanel,{children:(0,s.jsx)(eB,{userSpendData:e5})})]})]})]}),"organization"===e$&&(0,s.jsx)(e1,{accessToken:I,entityType:"organization",userID:z,userRole:P,dateValue:ea,entityList:R?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:B}),"team"===e$&&(0,s.jsx)(e1,{accessToken:I,entityType:"team",userID:z,userRole:P,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:B,dateValue:ea}),"customer"===e$&&(0,s.jsx)(e1,{accessToken:I,entityType:"customer",userID:z,userRole:P,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:B,dateValue:ea}),"tag"===e$&&(0,s.jsxs)(s.Fragment,{children:[eP&&(0,s.jsx)(f.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,s.jsxs)(T.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,s.jsx)(T.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>ez(!1),className:"mb-5"}),(0,s.jsx)(e1,{accessToken:I,entityType:"tag",userID:z,userRole:P,entityList:ei,premiumUser:B,dateValue:ea})]}),"agent"===e$&&(0,s.jsx)(e1,{accessToken:I,entityType:"agent",userID:z,userRole:P,entityList:eo?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:B,dateValue:ea}),"user"===e$&&(0,s.jsx)(e1,{accessToken:I,entityType:"user",userID:z,userRole:P,entityList:eN.length>0?eN:null,premiumUser:B,dateValue:ea}),"user-agent-activity"===e$&&(0,s.jsx)(eO,{accessToken:I,userRole:P,dateValue:ea})]})}),(0,s.jsx)(er,{isOpen:eL,onClose:()=>eA(!1),accessToken:I}),(0,s.jsx)(e_,{isOpen:eD,onClose:()=>eF(!1),entityType:"team",spendData:{results:e5.results,metadata:e5.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,s.jsx)(ss,{open:eE,onClose:()=>eR(!1),accessToken:I})]})};var sb=e.i(109799);e.s(["default",0,function(){(0,A.default)();let{data:e}=(0,ei.useTeams)(),{data:t}=(0,sb.useOrganizations)();return(0,s.jsx)(sy,{teams:e??[],organizations:t??[]})}],986888)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3e4fipm_mrl-n.js b/litellm/proxy/_experimental/out/_next/static/chunks/0jl9haj4wjvj5.js
similarity index 82%
rename from litellm/proxy/_experimental/out/_next/static/chunks/3e4fipm_mrl-n.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0jl9haj4wjvj5.js
index 43b84b6af02..155a4e7c939 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3e4fipm_mrl-n.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0jl9haj4wjvj5.js
@@ -1 +1 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68155,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,i],68155)},269200,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",s)},i.default.createElement("table",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},d),A))});r.displayName="Table",e.s(["Table",0,r],269200)},427612,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("thead",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},d),A))});r.displayName="TableHead",e.s(["TableHead",0,r],427612)},496020,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("tr",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("row"),s)},d),A))});r.displayName="TableRow",e.s(["TableRow",0,r],496020)},64848,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("th",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",s)},d),A))});r.displayName="TableHeaderCell",e.s(["TableHeaderCell",0,r],64848)},942232,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("tbody",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},d),A))});r.displayName="TableBody",e.s(["TableBody",0,r],942232)},977572,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("td",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",s)},d),A))});r.displayName="TableCell",e.s(["TableCell",0,r],977572)},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let A=(0,i.normalizeRootPath)(l);return A&&(e===A||e.startsWith(`${A}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let A={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,A],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let d={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,d],434339);let o={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let A={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let d={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,d],837957);let o={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,o],227247);let u={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,u],708889);let c={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,c],859320);let n={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],586455);let h={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],921117);let g={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],21296);let m={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,m],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let A={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let d={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let A={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let d={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,d],768493);let o={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,o],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),A=e.i(901539),s=e.i(434339),d=e.i(857152),o=e.i(922158),u=e.i(896614),c=e.i(9774),n=e.i(503119),h=e.i(272896),g=e.i(144923),m=e.i(562171),f=e.i(533881),p=e.i(837957),b=e.i(227247),I=e.i(708889),E=e.i(859320),x=e.i(586455),C=e.i(921117),w=e.i(21296),O=e.i(579967),_=e.i(336712),R=e.i(770752),v=e.i(383963),L=e.i(862493),T=e.i(902860),k=e.i(901372),B=e.i(206258),H=e.i(176228),M=e.i(728685),U=e.i(39182),N=e.i(272967),D=e.i(551726),S=e.i(399495),q=e.i(740876),y=e.i(709103),W=e.i(277207),Q=e.i(836473),G=e.i(768493),P=e.i(297720),F=e.i(980385);let z={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},V={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},K={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},Y={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},j={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},Z={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},X={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},eA={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},ed={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},eo={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},eu={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},ec={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var en=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eh={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eg=new Set(["bedrock_mantle"]),em={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":F.default.src,Anthropic:A.default.src,"Anthropic Text":A.default.src,AssemblyAI:s.default.src,Azure:U.default.src,"Azure AI Foundry (Studio)":U.default.src,"Azure Text":U.default.src,Baseten:d.default.src,"Amazon Bedrock":o.default.src,"Amazon Bedrock Mantle":o.default.src,"AWS SageMaker":o.default.src,Cerebras:u.default.src,Cloudflare:c.default.src,Codestral:D.default.src,Cohere:n.default.src,"Cohere Chat":n.default.src,Cometapi:h.default.src,Cursor:g.default.src,"Databricks (Qwen API)":m.default.src,Dashscope:Y.src,Deepseek:b.default.src,Deepgram:f.default.src,DeepInfra:p.default.src,ElevenLabs:I.default.src,"Fal AI":E.default.src,"Featherless Ai":x.default.src,"Fireworks AI":C.default.src,Friendliai:w.default.src,"Github Copilot":O.default.src,"Google AI Studio":_.default.src,Groq:R.default.src,vllm:eA.src,Huggingface:v.default.src,Hyperbolic:L.default.src,Infinity:T.default.src,"Jina AI":k.default.src,"Lambda Ai":B.default.src,"Lm Studio":H.default.src,"Meta Llama":M.default.src,MiniMax:N.default.src,"Mistral AI":D.default.src,Moonshot:S.default.src,Morph:q.default.src,Nebius:y.default.src,Novita:W.default.src,"Nvidia Nim":Q.default.src,Ollama:P.default.src,"Ollama Chat":P.default.src,Oobabooga:F.default.src,OpenAI:F.default.src,"Openai Like":F.default.src,"OpenAI Text Completion":F.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":F.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":F.default.src,Openrouter:z.src,"Oracle Cloud Infrastructure (OCI)":V.src,Perplexity:K.src,Recraft:j.src,Replicate:J.src,RunwayML:Z.src,Sagemaker:o.default.src,Sambanova:X.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":D.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:G.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":_.default.src,"Vertex Ai Beta":_.default.src,Vllm:eA.src,VolcEngine:es.src,"Voyage AI":ed.src,Watsonx:eo.src,"Watsonx Text":eo.src,xAI:eu.src,Xinference:ec.src};e.s(["Providers",()=>en,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(em[e])??"",displayName:e}}let t=Object.keys(eh).find(t=>eh[t].toLowerCase()===e.toLowerCase())??Object.keys(eh).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=en[t];return{logo:(0,i.resolveLogoSrc)(em[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=eh[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eg.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,em,"provider_map",0,eh],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),l=e.i(555987);e.s(["Logo",0,({provider:e,src:r,label:A,className:s="w-4 h-4"})=>{let[d,o]=(0,i.useState)(null),u=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,l.resolveLogoSrc)(r)??"",c=A??e??"";return d!==u&&u?(0,t.jsx)("img",{src:u,alt:`${c||"-"} logo`,className:s,onError:()=>{console.warn(`Logo failed to load: ${u}`),o(u)}}):(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:c.charAt(0)||"-"})}])},695411,e=>{"use strict";var t=e.i(602869);let i=async e=>{try{let i=await (0,t.modelHubCall)(e);if(i?.data.length>0){let e=i.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,i])}]);
\ No newline at end of file
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68155,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,i],68155)},269200,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",s)},i.default.createElement("table",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},d),A))});r.displayName="Table",e.s(["Table",0,r],269200)},942232,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("tbody",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},d),A))});r.displayName="TableBody",e.s(["TableBody",0,r],942232)},977572,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("td",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",s)},d),A))});r.displayName="TableCell",e.s(["TableCell",0,r],977572)},427612,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("thead",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},d),A))});r.displayName="TableHead",e.s(["TableHead",0,r],427612)},64848,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("th",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",s)},d),A))});r.displayName="TableHeaderCell",e.s(["TableHeaderCell",0,r],64848)},496020,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),r=i.default.forwardRef((e,r)=>{let{children:A,className:s}=e,d=(0,t.__rest)(e,["children","className"]);return i.default.createElement(i.default.Fragment,null,i.default.createElement("tr",Object.assign({ref:r,className:(0,a.tremorTwMerge)(l("row"),s)},d),A))});r.displayName="TableRow",e.s(["TableRow",0,r],496020)},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let A=(0,i.normalizeRootPath)(l);return A&&(e===A||e.startsWith(`${A}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let A={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,A],470524);let s={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,s],901539);let d={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,d],434339);let o={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let A={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],562171);let s={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,s],533881);let d={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,d],837957);let o={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,o],227247);let u={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,u],708889);let n={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,n],859320);let c={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,c],586455);let h={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],921117);let g={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],21296);let m={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,m],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let A={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],206258);let s={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],176228);let d={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let A={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],277207);let s={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],836473);let d={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,d],768493);let o={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,o],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),A=e.i(901539),s=e.i(434339),d=e.i(857152),o=e.i(922158),u=e.i(896614),n=e.i(9774),c=e.i(503119),h=e.i(272896),g=e.i(144923),m=e.i(562171),f=e.i(533881),p=e.i(837957),b=e.i(227247),I=e.i(708889),E=e.i(859320),x=e.i(586455),C=e.i(921117),w=e.i(21296),O=e.i(579967),_=e.i(336712),R=e.i(770752),v=e.i(383963),k=e.i(862493),T=e.i(902860),L=e.i(901372),B=e.i(206258),H=e.i(176228),N=e.i(728685),M=e.i(39182),U=e.i(272967),D=e.i(551726),S=e.i(399495),q=e.i(740876),y=e.i(709103),W=e.i(277207),P=e.i(836473),Q=e.i(768493),G=e.i(297720),F=e.i(980385);let z={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},V={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},K={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},Y={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},j={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},Z={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},X={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},eA={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},es={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},ed={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},eo={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},eu={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},en={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var ec=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eh={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eg=new Set(["bedrock_mantle"]),em={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":F.default.src,Anthropic:A.default.src,"Anthropic Text":A.default.src,AssemblyAI:s.default.src,Azure:M.default.src,"Azure AI Foundry (Studio)":M.default.src,"Azure Text":M.default.src,Baseten:d.default.src,"Amazon Bedrock":o.default.src,"Amazon Bedrock Mantle":o.default.src,"AWS SageMaker":o.default.src,Cerebras:u.default.src,Cloudflare:n.default.src,Codestral:D.default.src,Cohere:c.default.src,"Cohere Chat":c.default.src,Cometapi:h.default.src,Cursor:g.default.src,"Databricks (Qwen API)":m.default.src,Dashscope:Y.src,Deepseek:b.default.src,Deepgram:f.default.src,DeepInfra:p.default.src,ElevenLabs:I.default.src,"Fal AI":E.default.src,"Featherless Ai":x.default.src,"Fireworks AI":C.default.src,Friendliai:w.default.src,"Github Copilot":O.default.src,"Google AI Studio":_.default.src,Groq:R.default.src,vllm:eA.src,Huggingface:v.default.src,Hyperbolic:k.default.src,Infinity:T.default.src,"Jina AI":L.default.src,"Lambda Ai":B.default.src,"Lm Studio":H.default.src,"Meta Llama":N.default.src,MiniMax:U.default.src,"Mistral AI":D.default.src,Moonshot:S.default.src,Morph:q.default.src,Nebius:y.default.src,Novita:W.default.src,"Nvidia Nim":P.default.src,Ollama:G.default.src,"Ollama Chat":G.default.src,Oobabooga:F.default.src,OpenAI:F.default.src,"Openai Like":F.default.src,"OpenAI Text Completion":F.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":F.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":F.default.src,Openrouter:z.src,"Oracle Cloud Infrastructure (OCI)":V.src,Perplexity:K.src,Recraft:j.src,Replicate:J.src,RunwayML:Z.src,Sagemaker:o.default.src,Sambanova:X.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":D.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:Q.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":_.default.src,"Vertex Ai Beta":_.default.src,Vllm:eA.src,VolcEngine:es.src,"Voyage AI":ed.src,Watsonx:eo.src,"Watsonx Text":eo.src,xAI:eu.src,Xinference:en.src};e.s(["Providers",()=>ec,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(em[e])??"",displayName:e}}let t=Object.keys(eh).find(t=>eh[t].toLowerCase()===e.toLowerCase())??Object.keys(eh).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=ec[t];return{logo:(0,i.resolveLogoSrc)(em[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=eh[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eg.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,em,"provider_map",0,eh],916925)},629569,e=>{"use strict";var t=e.i(290571),i=e.i(95779),a=e.i(444755),l=e.i(673706),r=e.i(271645);let A=r.default.forwardRef((e,A)=>{let{color:s,children:d,className:o}=e,u=(0,t.__rest)(e,["color","children","className"]);return r.default.createElement("p",Object.assign({ref:A,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",s?(0,l.getColorClassNames)(s,i.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",o)},u),d)});A.displayName="Title",e.s(["Title",0,A],629569)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},304967,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(480731),l=e.i(95779),r=e.i(444755),A=e.i(673706);let s=(0,A.makeClassName)("Card"),d=i.default.forwardRef((e,d)=>{let{decoration:o="",decorationColor:u,children:n,className:c}=e,h=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return i.default.createElement("div",Object.assign({ref:d,className:(0,r.tremorTwMerge)(s("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",u?(0,A.getColorClassNames)(u,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(o),c)},h),n)});d.displayName="Card",e.s(["Card",0,d],304967)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0k-74wqsm8dzt.js b/litellm/proxy/_experimental/out/_next/static/chunks/0k-74wqsm8dzt.js
deleted file mode 100644
index 3810e2418c6..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0k-74wqsm8dzt.js
+++ /dev/null
@@ -1,13 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,244451,e=>{"use strict";let t;e.i(247167);var i=e.i(271645),n=e.i(343794),o=e.i(242064),a=e.i(763731),l=e.i(174428);let r=80*Math.PI,c=e=>{let{dotClassName:t,style:o,hasCircleCls:a}=e;return i.createElement("circle",{className:(0,n.default)(`${t}-circle`,{[`${t}-circle-bg`]:a}),r:40,cx:50,cy:50,strokeWidth:20,style:o})},s=({percent:e,prefixCls:t})=>{let o=`${t}-dot`,a=`${o}-holder`,s=`${a}-hidden`,[d,u]=i.useState(!1);(0,l.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!d)return null;let p={strokeDashoffset:`${r/4}`,strokeDasharray:`${r*m/100} ${r*(100-m)/100}`};return i.createElement("span",{className:(0,n.default)(a,`${o}-progress`,m<=0&&s)},i.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},i.createElement(c,{dotClassName:o,hasCircleCls:!0}),i.createElement(c,{dotClassName:o,style:p})))};function d(e){let{prefixCls:t,percent:o=0}=e,a=`${t}-dot`,l=`${a}-holder`,r=`${l}-hidden`;return i.createElement(i.Fragment,null,i.createElement("span",{className:(0,n.default)(l,o>0&&r)},i.createElement("span",{className:(0,n.default)(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>i.createElement("i",{className:`${t}-dot-item`,key:e})))),i.createElement(s,{prefixCls:t,percent:o}))}function u(e){var t;let{prefixCls:o,indicator:l,percent:r}=e,c=`${o}-dot`;return l&&i.isValidElement(l)?(0,a.cloneElement)(l,{className:(0,n.default)(null==(t=l.props)?void 0:t.className,c),percent:r}):i.createElement(d,{prefixCls:o,percent:r})}e.i(296059);var m=e.i(694758),p=e.i(183293),g=e.i(246422),f=e.i(838378);let b=new m.Keyframes("antSpinMove",{to:{opacity:1}}),h=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),v=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:i}=e;return{[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:i(i(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 ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:i(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:i(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:i(i(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:i(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:i(i(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:i(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${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 ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:i(e.dotSize).sub(i(e.marginXXS).div(2)).div(2).equal(),height:i(e.dotSize).sub(i(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:b,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"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:i(i(e.dotSizeSM).sub(i(e.marginXXS).div(2))).div(2).equal(),height:i(i(e.dotSizeSM).sub(i(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:i(i(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:i(i(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:i}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:i}}),S=[[30,.05],[70,.03],[96,.01]];var $=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let y=e=>{var a;let{prefixCls:l,spinning:r=!0,delay:c=0,className:s,rootClassName:d,size:m="default",tip:p,wrapperClassName:g,style:f,children:b,fullscreen:h=!1,indicator:y,percent:C}=e,k=$(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:x,direction:z,className:E,style:N,indicator:w}=(0,o.useComponentConfig)("spin"),j=x("spin",l),[I,O,M]=v(j),[B,D]=i.useState(()=>r&&(!r||!c||!!Number.isNaN(Number(c)))),T=function(e,t){let[n,o]=i.useState(0),a=i.useRef(null),l="auto"===t;return i.useEffect(()=>(l&&e&&(o(0),a.current=setInterval(()=>{o(e=>{let t=100-e;for(let i=0;i{a.current&&(clearInterval(a.current),a.current=null)}),[l,e]),l?n:t}(B,C);i.useEffect(()=>{if(r){let e=function(e,t,i){var n,o=i||{},a=o.noTrailing,l=void 0!==a&&a,r=o.noLeading,c=void 0!==r&&r,s=o.debounceMode,d=void 0===s?void 0:s,u=!1,m=0;function p(){n&&clearTimeout(n)}function g(){for(var i=arguments.length,o=Array(i),a=0;ae?c?(m=Date.now(),l||(n=setTimeout(d?f:g,e))):g():!0!==l&&(n=setTimeout(d?f:g,void 0===d?e-s:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},g}(c,()=>{D(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}D(!1)},[c,r]);let P=i.useMemo(()=>void 0!==b&&!h,[b,h]),H=(0,n.default)(j,E,{[`${j}-sm`]:"small"===m,[`${j}-lg`]:"large"===m,[`${j}-spinning`]:B,[`${j}-show-text`]:!!p,[`${j}-rtl`]:"rtl"===z},s,!h&&d,O,M),A=(0,n.default)(`${j}-container`,{[`${j}-blur`]:B}),q=null!=(a=null!=y?y:w)?a:t,R=Object.assign(Object.assign({},N),f),_=i.createElement("div",Object.assign({},k,{style:R,className:H,"aria-live":"polite","aria-busy":B}),i.createElement(u,{prefixCls:j,indicator:q,percent:T}),p&&(P||h)?i.createElement("div",{className:`${j}-text`},p):null);return I(P?i.createElement("div",Object.assign({},k,{className:(0,n.default)(`${j}-nested-loading`,g,O,M)}),B&&i.createElement("div",{key:"loading"},_),i.createElement("div",{className:A,key:"container"},b)):h?i.createElement("div",{className:(0,n.default)(`${j}-fullscreen`,{[`${j}-fullscreen-show`]:B},d,O,M)},_):_)};y.setDefaultIndicator=e=>{t=e},e.s(["default",0,y],244451)},165370,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(931067);let n={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"};var o=e.i(9583),a=t.forwardRef(function(e,a){return t.createElement(o.default,(0,i.default)({},e,{ref:a,icon:n}))});let l={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"};var r=t.forwardRef(function(e,n){return t.createElement(o.default,(0,i.default)({},e,{ref:n,icon:l}))}),c=e.i(801312),s=e.i(286612),d=e.i(343794),u=e.i(211577),m=e.i(410160),p=e.i(209428),g=e.i(392221),f=e.i(914949),b=e.i(404948),h=e.i(244009);e.i(883110);let v={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:"页码"};var S=[10,20,50,100];let $=function(e){var i=e.pageSizeOptions,n=void 0===i?S:i,o=e.locale,a=e.changeSize,l=e.pageSize,r=e.goButton,c=e.quickGo,s=e.rootPrefixCls,d=e.disabled,u=e.buildOptionText,m=e.showSizeChanger,p=e.sizeChangerRender,f=t.default.useState(""),h=(0,g.default)(f,2),v=h[0],$=h[1],y=function(){return!v||Number.isNaN(v)?void 0:Number(v)},C="function"==typeof u?u:function(e){return"".concat(e," ").concat(o.items_per_page)},k=function(e){""!==v&&(e.keyCode===b.default.ENTER||"click"===e.type)&&($(""),null==c||c(y()))},x="".concat(s,"-options");if(!m&&!c)return null;var z=null,E=null,N=null;return m&&p&&(z=p({disabled:d,size:l,onSizeChange:function(e){null==a||a(Number(e))},"aria-label":o.page_size,className:"".concat(x,"-size-changer"),options:(n.some(function(e){return e.toString()===l.toString()})?n:n.concat([l]).sort(function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))})).map(function(e){return{label:C(e),value:e}})})),c&&(r&&(N="boolean"==typeof r?t.default.createElement("button",{type:"button",onClick:k,onKeyUp:k,disabled:d,className:"".concat(x,"-quick-jumper-button")},o.jump_to_confirm):t.default.createElement("span",{onClick:k,onKeyUp:k},r)),E=t.default.createElement("div",{className:"".concat(x,"-quick-jumper")},o.jump_to,t.default.createElement("input",{disabled:d,type:"text",value:v,onChange:function(e){$(e.target.value)},onKeyUp:k,onBlur:function(e){r||""===v||($(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(s,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(s,"-item"))>=0)||null==c||c(y()))},"aria-label":o.page}),o.page,N)),t.default.createElement("li",{className:x},z,E)},y=function(e){var i=e.rootPrefixCls,n=e.page,o=e.active,a=e.className,l=e.showTitle,r=e.onClick,c=e.onKeyPress,s=e.itemRender,m="".concat(i,"-item"),p=(0,d.default)(m,"".concat(m,"-").concat(n),(0,u.default)((0,u.default)({},"".concat(m,"-active"),o),"".concat(m,"-disabled"),!n),a),g=s(n,"page",t.default.createElement("a",{rel:"nofollow"},n));return g?t.default.createElement("li",{title:l?String(n):null,className:p,onClick:function(){r(n)},onKeyDown:function(e){c(e,r,n)},tabIndex:0},g):null};var C=function(e,t,i){return i};function k(){}function x(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function z(e,t,i){return Math.floor((i-1)/(void 0===e?t:e))+1}let E=function(e){var n,o,a,l,r=e.prefixCls,c=void 0===r?"rc-pagination":r,s=e.selectPrefixCls,S=e.className,E=e.current,N=e.defaultCurrent,w=e.total,j=void 0===w?0:w,I=e.pageSize,O=e.defaultPageSize,M=e.onChange,B=void 0===M?k:M,D=e.hideOnSinglePage,T=e.align,P=e.showPrevNextJumpers,H=e.showQuickJumper,A=e.showLessItems,q=e.showTitle,R=void 0===q||q,_=e.onShowSizeChange,L=void 0===_?k:_,X=e.locale,W=void 0===X?v:X,K=e.style,F=e.totalBoundaryShowSizeChanger,G=e.disabled,U=e.simple,J=e.showTotal,V=e.showSizeChanger,Q=void 0===V?j>(void 0===F?50:F):V,Y=e.sizeChangerRender,Z=e.pageSizeOptions,ee=e.itemRender,et=void 0===ee?C:ee,ei=e.jumpPrevIcon,en=e.jumpNextIcon,eo=e.prevIcon,ea=e.nextIcon,el=t.default.useRef(null),er=(0,f.default)(10,{value:I,defaultValue:void 0===O?10:O}),ec=(0,g.default)(er,2),es=ec[0],ed=ec[1],eu=(0,f.default)(1,{value:E,defaultValue:void 0===N?1:N,postState:function(e){return Math.max(1,Math.min(e,z(void 0,es,j)))}}),em=(0,g.default)(eu,2),ep=em[0],eg=em[1],ef=t.default.useState(ep),eb=(0,g.default)(ef,2),eh=eb[0],ev=eb[1];(0,t.useEffect)(function(){ev(ep)},[ep]);var eS=Math.max(1,ep-(A?3:5)),e$=Math.min(z(void 0,es,j),ep+(A?3:5));function ey(i,n){var o=i||t.default.createElement("button",{type:"button","aria-label":n,className:"".concat(c,"-item-link")});return"function"==typeof i&&(o=t.default.createElement(i,(0,p.default)({},e))),o}function eC(e){var t=e.target.value,i=z(void 0,es,j);return""===t?t:Number.isNaN(Number(t))?eh:t>=i?i:Number(t)}var ek=j>es&&H;function ex(e){var t=eC(e);switch(t!==eh&&ev(t),e.keyCode){case b.default.ENTER:ez(t);break;case b.default.UP:ez(t-1);break;case b.default.DOWN:ez(t+1)}}function ez(e){if(x(e)&&e!==ep&&x(j)&&j>0&&!G){var t=z(void 0,es,j),i=e;return e>t?i=t:e<1&&(i=1),i!==eh&&ev(i),eg(i),null==B||B(i,es),i}return ep}var eE=ep>1,eN=ep2?i-2:0),o=2;oj?j:ep*es])),eH=null,eA=z(void 0,es,j);if(D&&j<=es)return null;var eq=[],eR={rootPrefixCls:c,onClick:ez,onKeyPress:eM,showTitle:R,itemRender:et,page:-1},e_=ep-1>0?ep-1:0,eL=ep+1=2*eG&&3!==ep&&(eq[0]=t.default.cloneElement(eq[0],{className:(0,d.default)("".concat(c,"-item-after-jump-prev"),eq[0].props.className)}),eq.unshift(eD)),eA-ep>=2*eG&&ep!==eA-2){var e2=eq[eq.length-1];eq[eq.length-1]=t.default.cloneElement(e2,{className:(0,d.default)("".concat(c,"-item-before-jump-next"),e2.props.className)}),eq.push(eH)}1!==eZ&&eq.unshift(t.default.createElement(y,(0,i.default)({},eR,{key:1,page:1}))),e0!==eA&&eq.push(t.default.createElement(y,(0,i.default)({},eR,{key:eA,page:eA})))}var e3=(n=et(e_,"prev",ey(eo,"prev page")),t.default.isValidElement(n)?t.default.cloneElement(n,{disabled:!eE}):n);if(e3){var e4=!eE||!eA;e3=t.default.createElement("li",{title:R?W.prev_page:null,onClick:ew,tabIndex:e4?null:0,onKeyDown:function(e){eM(e,ew)},className:(0,d.default)("".concat(c,"-prev"),(0,u.default)({},"".concat(c,"-disabled"),e4)),"aria-disabled":e4},e3)}var e9=(o=et(eL,"next",ey(ea,"next page")),t.default.isValidElement(o)?t.default.cloneElement(o,{disabled:!eN}):o);e9&&(U?(a=!eN,l=eE?0:null):l=(a=!eN||!eA)?null:0,e9=t.default.createElement("li",{title:R?W.next_page:null,onClick:ej,tabIndex:l,onKeyDown:function(e){eM(e,ej)},className:(0,d.default)("".concat(c,"-next"),(0,u.default)({},"".concat(c,"-disabled"),a)),"aria-disabled":a},e9));var e5=(0,d.default)(c,S,(0,u.default)((0,u.default)((0,u.default)((0,u.default)((0,u.default)({},"".concat(c,"-start"),"start"===T),"".concat(c,"-center"),"center"===T),"".concat(c,"-end"),"end"===T),"".concat(c,"-simple"),U),"".concat(c,"-disabled"),G));return t.default.createElement("ul",(0,i.default)({className:e5,style:K,ref:el},eT),eP,e3,U?eF:eq,e9,t.default.createElement($,{locale:W,rootPrefixCls:c,disabled:G,selectPrefixCls:void 0===s?"rc-select":s,changeSize:function(e){var t=z(e,es,j),i=ep>t&&0!==t?t:ep;ed(e),ev(i),null==L||L(ep,e),eg(i),null==B||B(i,e)},pageSize:es,pageSizeOptions:Z,quickGo:ek?ez:null,goButton:eK,showSizeChanger:Q,sizeChangerRender:Y}))};var N=e.i(727214),w=e.i(242064),j=e.i(517455),I=e.i(150073),O=e.i(408850),M=e.i(327494),B=e.i(104458);e.i(296059);var D=e.i(915654),T=e.i(349942),P=e.i(517458),H=e.i(889943),A=e.i(183293),q=e.i(246422),R=e.i(838378);let _=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},(0,P.initComponentToken)(e)),L=e=>(0,R.mergeToken)(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),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.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,P.initInputToken)(e)),X=(0,q.genStyleHooks)("Pagination",e=>{let t=L(e);return[(e=>{let{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:(0,D.unit)(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),(e=>{let{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:(0,D.unit)(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${(0,D.unit)(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${(0,D.unit)(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}})(e)),(e=>{let{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
- ${t}-prev,
- ${t}-jump-prev,
- ${t}-jump-next
- `]:{marginInlineEnd:e.marginXS},[`
- ${t}-prev,
- ${t}-next,
- ${t}-jump-prev,
- ${t}-jump-next
- `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:(0,D.unit)(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${(0,D.unit)(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:(0,D.unit)(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,T.genBasicInputStyle)(e)),(0,H.genBaseOutlinedStyle)(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},(0,H.genDisabledStyle)(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}})(e)),(e=>{let{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:(0,D.unit)(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:(0,D.unit)(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${(0,D.unit)(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${(0,D.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${(0,D.unit)(e.inputOutlineOffset)} 0 ${(0,D.unit)(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:(0,D.unit)(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:(0,D.unit)(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}})(e)),(e=>{let{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:(0,D.unit)(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,D.unit)(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,D.unit)(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
- &${t}-mini ${t}-prev ${t}-item-link,
- &${t}-mini ${t}-next ${t}-item-link
- `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:(0,D.unit)(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:(0,D.unit)(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:(0,D.unit)(e.itemSizeSM),input:Object.assign(Object.assign({},(0,T.genInputSmallStyle)(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}})(e)),(e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&: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}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}})(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},(0,A.genFocusStyle)(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},(0,A.genFocusOutline)(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:(0,A.genFocusOutline)(e)}}}})(t)]},_),W=(0,q.genSubStyleComponent)(["Pagination","bordered"],e=>(e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${(0,D.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}})(L(e)),_);function K(e){return(0,t.useMemo)(()=>"boolean"==typeof e?[e,{}]:e&&"object"==typeof e?[!0,e]:[void 0,void 0],[e])}var F=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};e.s(["default",0,e=>{let{align:i,prefixCls:n,selectPrefixCls:o,className:l,rootClassName:u,style:m,size:p,locale:g,responsive:f,showSizeChanger:b,selectComponentClass:h,pageSizeOptions:v}=e,S=F(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:$}=(0,I.default)(f),[,y]=(0,B.useToken)(),{getPrefixCls:C,direction:k,showSizeChanger:x,className:z,style:D}=(0,w.useComponentConfig)("pagination"),T=C("pagination",n),[P,H,A]=X(T),q=(0,j.default)(p),R="small"===q||!!($&&!q&&f),[_]=(0,O.useLocale)("Pagination",N.default),L=Object.assign(Object.assign({},_),g),[G,U]=K(b),[J,V]=K(x),Q=null!=U?U:V,Y=h||M.default,Z=t.useMemo(()=>v?v.map(e=>Number(e)):void 0,[v]),ee=t.useMemo(()=>{let e=t.createElement("span",{className:`${T}-item-ellipsis`},"•••"),i=t.createElement("button",{className:`${T}-item-link`,type:"button",tabIndex:-1},"rtl"===k?t.createElement(s.default,null):t.createElement(c.default,null)),n=t.createElement("button",{className:`${T}-item-link`,type:"button",tabIndex:-1},"rtl"===k?t.createElement(c.default,null):t.createElement(s.default,null));return{prevIcon:i,nextIcon:n,jumpPrevIcon:t.createElement("a",{className:`${T}-item-link`},t.createElement("div",{className:`${T}-item-container`},"rtl"===k?t.createElement(r,{className:`${T}-item-link-icon`}):t.createElement(a,{className:`${T}-item-link-icon`}),e)),jumpNextIcon:t.createElement("a",{className:`${T}-item-link`},t.createElement("div",{className:`${T}-item-container`},"rtl"===k?t.createElement(a,{className:`${T}-item-link-icon`}):t.createElement(r,{className:`${T}-item-link-icon`}),e))}},[k,T]),et=C("select",o),ei=(0,d.default)({[`${T}-${i}`]:!!i,[`${T}-mini`]:R,[`${T}-rtl`]:"rtl"===k,[`${T}-bordered`]:y.wireframe},z,l,u,H,A),en=Object.assign(Object.assign({},D),m);return P(t.createElement(t.Fragment,null,y.wireframe&&t.createElement(W,{prefixCls:T}),t.createElement(E,Object.assign({},ee,S,{style:en,prefixCls:T,selectPrefixCls:et,className:ei,locale:L,pageSizeOptions:Z,showSizeChanger:null!=G?G:J,sizeChangerRender:e=>{var i;let{disabled:n,size:o,onSizeChange:a,"aria-label":l,className:r,options:c}=e,{className:s,onChange:u}=Q||{},m=null==(i=c.find(e=>String(e.value)===String(o)))?void 0:i.value;return t.createElement(Y,Object.assign({disabled:n,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":l,options:c},Q,{value:m,onChange:(e,t)=>{null==a||a(e),null==u||u(e,t)},size:R?"small":"middle",className:(0,d.default)(r,s)}))}}))))}],165370)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0kap_rdm2-lem.js b/litellm/proxy/_experimental/out/_next/static/chunks/0kap_rdm2-lem.js
deleted file mode 100644
index fde6fd7ea98..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0kap_rdm2-lem.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,807235,886407,152370,e=>{"use strict";var t=e.i(843476),n=e.i(152990),r=e.i(682830),a=e.i(475254);let i=(0,a.default)("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["SearchX",0,i],886407);var o=e.i(271645),s=e.i(302747),l=e.i(784774),d=e.i(115504);let u=(0,a.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var c=e.i(463059);let p=(0,a.default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),g=(0,a.default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var m=e.i(519455),f=e.i(967489);let h=[25,50,100];function v({page:e,pageSize:n,rowCount:r,onPageChange:a,onPageSizeChange:i,pageSizeOptions:o=h,isLoading:s=!1,className:l}){let x=n>0?Math.ceil(r/n):0,b=Math.min((e+1)*n,r),y=e>0&&!s,S=e{"string"==typeof e&&i(Number(e))},children:[(0,t.jsx)(f.SelectTrigger,{size:"sm","data-testid":"pagination-page-size",className:"w-[4.5rem]",children:(0,t.jsx)(f.SelectValue,{})}),(0,t.jsx)(f.SelectContent,{children:o.map(e=>(0,t.jsx)(f.SelectItem,{value:String(e),children:e},e))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("span",{"data-testid":"pagination-range",className:"text-sm text-muted-foreground tabular-nums",children:0===r?"No results":`Showing ${0===r?0:e*n+1}-${b} of ${r}`}),(0,t.jsxs)("span",{"data-testid":"pagination-page",className:"text-sm text-muted-foreground tabular-nums",children:["Page ",e+1," of ",Math.max(x,1)]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(m.Button,{variant:"outline",size:"icon-sm","data-testid":"pagination-first","aria-label":"Go to first page",disabled:!y,onClick:()=>a(0),children:(0,t.jsx)(p,{})}),(0,t.jsx)(m.Button,{variant:"outline",size:"icon-sm","data-testid":"pagination-prev","aria-label":"Go to previous page",disabled:!y,onClick:()=>a(e-1),children:(0,t.jsx)(u,{})}),(0,t.jsx)(m.Button,{variant:"outline",size:"icon-sm","data-testid":"pagination-next","aria-label":"Go to next page",disabled:!S,onClick:()=>a(e+1),children:(0,t.jsx)(c.ChevronRight,{})}),(0,t.jsx)(m.Button,{variant:"outline",size:"icon-sm","data-testid":"pagination-last","aria-label":"Go to last page",disabled:!S,onClick:()=>a(C),children:(0,t.jsx)(g,{})})]})]})]})}e.s(["DEFAULT_PAGE_SIZE_OPTIONS",0,h,"DataTablePagination",0,v],152370);let x=()=>{};class b extends Error{constructor(e){super(`DataTable misconfiguration:
-- ${e.join("\n- ")}`),this.name="DataTableConfigError"}}function y(e){return"id"in e&&"string"==typeof e.id?e.id:"accessorKey"in e&&null!=e.accessorKey?String(e.accessorKey):void 0}function S(e,t,n){let r=e.getIsPinned(),a=t&&n;if(!r&&!a)return{style:{},className:""};let i="left"===r?e.getStart("left"):void 0,o="right"===r?e.getAfter("right"):void 0;return{style:{position:"sticky",zIndex:!1!==r&&t?30:t?20:10,...a?{top:0}:{},...void 0!==i?{left:i}:{},...void 0!==o?{right:o}:{}},className:(0,d.cn)(r?"bg-background":"","left"===r?"shadow-[inset_-1px_0_0_var(--color-border)]":"right"===r?"shadow-[inset_1px_0_0_var(--color-border)]":"")}}function C(e,t){if(t||void 0!==e.columnDef.size)return{width:e.getSize()}}function R({header:e,size:r,stickyHeader:a,enableColumnResizing:i}){let{column:o}=e,s=o.columnDef.meta,u=S(o,!0,a),c=i&&o.getCanResize();return(0,t.jsxs)(l.TableHead,{"data-header-id":e.id,className:(0,d.cn)("relative text-muted-foreground","compact"===r?"h-8 px-2 py-1 text-xs":"",s?.numeric?"text-right":"",s?.className,s?.headerClassName,u.className),style:{...u.style,...C(o,i)},children:[e.isPlaceholder?null:(0,t.jsx)("div",{className:(0,d.cn)("flex items-center gap-1",s?.numeric?"justify-end":""),children:(0,n.flexRender)(o.columnDef.header,e.getContext())}),c&&(0,t.jsx)("div",{"data-resizer":!0,"data-header-id":e.id,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onDoubleClick:()=>o.resetSize(),className:(0,d.cn)("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none hover:bg-border",o.getIsResizing()?"bg-primary":"")})]})}function j({cell:e,size:r,stickyHeader:a,enableColumnResizing:i}){let{column:o}=e,s=o.columnDef.meta,u=S(o,!1,a);return(0,t.jsx)(l.TableCell,{className:(0,d.cn)("overflow-hidden text-ellipsis","compact"===r?"px-2 py-1 text-xs":"",s?.numeric?"text-right tabular-nums":"",s?.className,u.className),style:{...u.style,...C(o,i)},children:(0,n.flexRender)(o.columnDef.cell,e.getContext())})}function w({row:e,size:n,stickyHeader:r,enableColumnResizing:a,onRowClick:i,rowClassName:s,renderSubComponent:u}){let c=void 0!==i,p=e.getVisibleCells();return(0,t.jsxs)(o.Fragment,{children:[(0,t.jsx)(l.TableRow,{"data-row-id":e.id,className:(0,d.cn)(c?"cursor-pointer":"","compact"===n?"h-8":"",s?.(e)),onClick:c?t=>{if(void 0===i)return;let n=t.target;null!==n&&t.currentTarget.contains(n)&&null===n.closest("button, a, input, select, textarea, [role=checkbox], [data-row-click-exempt]")&&i(e.original)}:void 0,children:p.map(e=>(0,t.jsx)(j,{cell:e,size:n,stickyHeader:r,enableColumnResizing:a},e.id))}),void 0!==u&&e.getIsExpanded()&&(0,t.jsx)(l.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(l.TableCell,{colSpan:p.length,className:"p-0",children:u({row:e})})})]})}function k({colSpan:e,children:n}){return(0,t.jsx)(l.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(l.TableCell,{colSpan:e,className:"h-24 text-center align-middle text-sm text-muted-foreground",children:n})})}function E(){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 py-6",children:[(0,t.jsx)("div",{className:"mb-1 flex size-10 items-center justify-center rounded-lg bg-muted",children:(0,t.jsx)(i,{className:"size-5 text-muted-foreground"})}),(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:"No results"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"No rows match your search or filters."})]})}let N=["w-[58%]","w-[44%]","w-[70%]","w-[50%]","w-[64%]","w-[48%]"];function I({column:e,index:n}){let r=e?.columnDef.meta,a=N[n%N.length],i=r?.skeleton;return r?.renderSkeleton!==void 0?(0,t.jsx)(t.Fragment,{children:r.renderSkeleton()}):"twoLine"===i?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(s.Skeleton,{className:(0,d.cn)("h-3.5",a)}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-2/5 opacity-65"})]}):"badge"===i?(0,t.jsx)(s.Skeleton,{className:(0,d.cn)("h-5 w-16 rounded-full",r?.numeric?"ml-auto":"")}):"chips"===i?(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(s.Skeleton,{className:"h-5 w-14 rounded-full"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-20 rounded-full"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-9 rounded-full opacity-65"})]}):"meter"===i?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(s.Skeleton,{className:"h-3.5 w-24"}),(0,t.jsx)(s.Skeleton,{className:"h-1.5 w-full rounded-full"})]}):(0,t.jsx)(s.Skeleton,{className:(0,d.cn)("h-3.5",a,r?.numeric?"ml-auto":"")})}function M({rowCount:e,columns:n,size:r,message:a}){let i=Array.from({length:Math.max(e,1)},(e,t)=>t),s=n.length>0?n:[void 0];return(0,t.jsx)(o.Fragment,{children:i.map(e=>(0,t.jsx)(l.TableRow,{className:(0,d.cn)("hover:bg-transparent","compact"===r?"h-8":""),"data-testid":"skeleton-row",children:s.map((n,i)=>(0,t.jsxs)(l.TableCell,{className:"compact"===r?"px-2 py-1":"",children:[(0,t.jsx)(I,{column:n,index:i}),0===e&&0===i&&void 0!==a?(0,t.jsx)("span",{className:"sr-only",children:a}):null]},n?.id??i))},`skeleton-${e}`))})}function T(e,t,n){let[r,a]=(0,o.useState)(n);return void 0!==e?{value:e,onChange:t??x}:{value:r,onChange:a}}e.s(["DataTable",0,function(e){(0,o.useState)(()=>{let t,n,r,a,i,o=(t="server"===e.sortingMode&&(void 0===e.sorting||void 0===e.onSortingChange),n=void 0===e.pagination||void 0===e.onPaginationChange||void 0===e.rowCount,r="server"===e.paginationMode&&n,a="server"===e.filterMode&&(void 0===e.columnFilters||void 0===e.onColumnFiltersChange),i=void 0!==e.defaultSorting&&void 0!==e.sorting,[t?"sortingMode='server' requires both `sorting` and `onSortingChange`.":null,r?"paginationMode='server' requires `pagination`, `onPaginationChange`, and `rowCount`.":null,a?"filterMode='server' requires both `columnFilters` and `onColumnFiltersChange`.":null,i?"Provide either `defaultSorting` (uncontrolled) or `sorting` (controlled), not both.":null,void 0!==e.defaultColumnFilters&&void 0!==e.columnFilters?"Provide either `defaultColumnFilters` (uncontrolled) or `columnFilters` (controlled), not both.":null,void 0!==e.rowSelection&&void 0===e.onRowSelectionChange?"Controlled `rowSelection` requires `onRowSelectionChange`; without it selection changes are dropped.":null].filter(e=>null!==e));if(o.length>0)throw new b(o);return null});let{isLoading:a=!1,loadingMessage:i="Loading…",skeletonRowCount:s=8,noDataMessage:d,paginationMode:u="none",rowCount:c,pageSizeOptions:p=h,enableColumnResizing:g=!1,onRowClick:m,rowClassName:f,renderSubComponent:x,maxBodyHeight:S,size:C="default",toolbar:j,paginationSlot:N,footer:I}=e,P=function(e){var t;let{data:a,columns:i,getRowId:s,sortingMode:l="none",sorting:d,onSortingChange:u,defaultSorting:c,enableSortingRemoval:p=!1,paginationMode:g="none",pagination:m,onPaginationChange:f,rowCount:v,pageSizeOptions:x=h,filterMode:b="none",columnFilters:S,onColumnFiltersChange:C,defaultColumnFilters:R,globalFilter:j,onGlobalFilterChange:w,enableColumnResizing:k=!1,columnResizeMode:E="onEnd",defaultColumnVisibility:N,getRowCanExpand:I,renderSubComponent:M,expanded:P,onExpandedChange:O,enableRowSelection:D,rowSelection:A,onRowSelectionChange:F}=e,z=T(d,u,c??[]),B=T(m,f,{pageIndex:0,pageSize:x[0]??25}),H=T(S,C,R??[]),L=T(j,w,""),U=T(P,O,{}),V=T(A,F,{}),[_,$]=(0,o.useState)(N??{}),[K,Y]=(0,o.useState)({}),G=o.useMemo(()=>{let e;return{left:(e=e=>i.filter(t=>t.meta?.pinned===e).map(y).filter(e=>void 0!==e))("left"),right:e("right")}},[i]),q={data:a,columns:i,state:{sorting:z.value,pagination:B.value,columnFilters:H.value,globalFilter:L.value,expanded:U.value,rowSelection:V.value,columnVisibility:_,columnSizing:K},initialState:{columnPinning:G},manualSorting:"server"===l,manualPagination:"server"===g,manualFiltering:"server"===b,enableSortingRemoval:p,enableColumnResizing:k,columnResizeMode:E,onSortingChange:z.onChange,onPaginationChange:B.onChange,onColumnFiltersChange:H.onChange,onGlobalFilterChange:L.onChange,onExpandedChange:U.onChange,onRowSelectionChange:V.onChange,onColumnVisibilityChange:$,onColumnSizingChange:Y,getCoreRowModel:(0,r.getCoreRowModel)(),...(t=void 0!==M?I:void 0,{..."client"===b?{getFilteredRowModel:(0,r.getFilteredRowModel)()}:{},..."client"===l?{getSortedRowModel:(0,r.getSortedRowModel)()}:{},..."client"===g?{getPaginationRowModel:(0,r.getPaginationRowModel)()}:{},...void 0!==t?{getRowCanExpand:t,getExpandedRowModel:(0,r.getExpandedRowModel)()}:{}}),...void 0!==s?{getRowId:s}:{},...void 0!==D?{enableRowSelection:D}:{},..."server"===g&&void 0!==v?{rowCount:v}:{}};return(0,n.useReactTable)(q)}(e),O=P.getRowModel().rows,D=P.getVisibleLeafColumns().length,A=void 0!==S,F=g?{width:P.getTotalSize(),minWidth:"100%"}:void 0,z=(()=>{if(void 0!==N)return N(P);if("none"===u)return null;let e=P.getState().pagination,n="server"===u?c??0:P.getPrePaginationRowModel().rows.length;return(0,t.jsx)(v,{page:e.pageIndex,pageSize:e.pageSize,rowCount:n,onPageChange:e=>P.setPageIndex(e),onPageSizeChange:e=>P.setPageSize(e),pageSizeOptions:p,isLoading:a})})();return(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border",children:[void 0!==j&&(0,t.jsx)("div",{className:"border-b border-border px-4 py-3",children:j(P)}),(0,t.jsx)("div",{className:A?"overflow-auto":"overflow-x-auto",style:A?{maxHeight:S}:void 0,children:(0,t.jsxs)(l.Table,{className:g?"table-fixed":"",style:F,children:[(0,t.jsx)(l.TableHeader,{className:A?"sticky top-0 z-20":"",children:P.getHeaderGroups().map(e=>(0,t.jsx)(l.TableRow,{className:"bg-muted/50 hover:bg-muted/50",children:e.headers.map(e=>(0,t.jsx)(R,{header:e,size:C,stickyHeader:A,enableColumnResizing:g},e.id))},e.id))}),(0,t.jsx)(l.TableBody,{children:a?(0,t.jsx)(M,{rowCount:s,columns:P.getVisibleLeafColumns(),size:C,message:i}):0===O.length?(0,t.jsx)(k,{colSpan:D,children:d??(0,t.jsx)(E,{})}):O.map(e=>(0,t.jsx)(w,{row:e,size:C,stickyHeader:A,enableColumnResizing:g,onRowClick:m,rowClassName:f,renderSubComponent:x},e.id))}),void 0!==I&&(0,t.jsx)(l.TableFooter,{children:I(P)})]})}),null!==z&&(0,t.jsx)("div",{className:"border-t border-border",children:z})]})})}],807235)},980376,e=>{"use strict";var t=e.i(843476),n=e.i(353753),r=e.i(115504),a=e.i(519455),i=e.i(995926);function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function s({className:e,...a}){return(0,t.jsx)(n.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...a})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:l,side:d="right",showCloseButton:u=!0,...c}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(s,{}),(0,t.jsxs)(n.Dialog.Popup,{"data-slot":"sheet-content","data-side":d,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...c,children:[l,u&&(0,t.jsxs)(n.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(a.Button,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[(0,t.jsx)(i.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a})},"SheetFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,r.cn)("mt-auto flex flex-col gap-2 p-4",e),...n})},"SheetHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-1.5 p-4",e),...n})},"SheetTitle",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-medium text-foreground",e),...a})}])},981080,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(519455),a=e.i(110204),i=e.i(980376);function o(e){return Object.fromEntries(e.map(e=>[e.id,e.value]))}e.s(["DataTableFilterDrawer",0,function({table:e,open:a,onOpenChange:s,title:l="Filters",description:d,applyLabel:u="Apply Filters",resetLabel:c="Reset",onReset:p,children:g}){let[m,f]=n.useState(()=>o(e.getState().columnFilters)),[h,v]=n.useState(a);return a!==h&&(v(a),a&&f(o(e.getState().columnFilters))),(0,t.jsx)(i.Sheet,{open:a,onOpenChange:s,children:(0,t.jsxs)(i.SheetContent,{side:"right",children:[(0,t.jsxs)(i.SheetHeader,{children:[(0,t.jsx)(i.SheetTitle,{children:l}),void 0!==d&&(0,t.jsx)(i.SheetDescription,{children:d})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4","data-testid":"filter-drawer-body",children:g({get:e=>m[e],set:(e,t)=>f(n=>({...n,[e]:t}))})}),(0,t.jsxs)(i.SheetFooter,{className:"flex-row",children:[(0,t.jsx)(r.Button,{variant:"outline",className:"flex-1",onClick:()=>{(f({}),void 0!==p)?p():e.setColumnFilters([])},"data-testid":"filter-drawer-reset",children:c}),(0,t.jsx)(r.Button,{className:"flex-1",onClick:()=>{e.setColumnFilters(Object.entries(m).filter(([,e])=>!(Array.isArray(e)?0===e.length:null==e||""===e)).map(([e,t])=>({id:e,value:t}))),s(!1)},"data-testid":"filter-drawer-apply",children:u})]})]})})},"DataTableFilterField",0,function({label:e,children:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(a.Label,{children:e}),n]})}])},257428,157153,e=>{"use strict";var t,n=e.i(843476);e.s([],392299),e.i(392299),e.i(247167);var r=e.i(271645),a=e.i(956789),i=e.i(951437),o=e.i(146376),s=e.i(828918),l=e.i(921374),d=e.i(502077),u=e.i(333848);let c=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.indeterminate="data-indeterminate",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t);var p=e.i(875812);function g(e){return r.useMemo(()=>({checked:t=>e.indeterminate?{}:t?{[c.checked]:""}:{[c.unchecked]:""},...p.fieldValidityMapping}),[e.indeterminate])}var m=e.i(552245),f=e.i(788015),h=e.i(176782),v=e.i(540886),x=e.i(469690),b=e.i(381104);let y=r.createContext({disabled:!1});function S(){return r.useContext(y)}e.s(["useFieldItemContext",0,S],157153);var C=e.i(884708),R=e.i(247778),j=e.i(31421),w=e.i(733332);let k=r.createContext(void 0),E=r.createContext(void 0);var N=e.i(675606),I=e.i(56434),M=e.i(606039);let T=r.forwardRef(function(e,t){let{checked:c,className:p,defaultChecked:y=!1,"aria-labelledby":T,disabled:P=!1,form:O,id:D,indeterminate:A=!1,inputRef:F,name:z,onCheckedChange:B,parent:H=!1,readOnly:L=!1,render:U,required:V=!1,uncheckedValue:_,value:$,nativeButton:K=!1,style:Y,...G}=e,{clearErrors:q}=(0,C.useFormContext)(),{disabled:W,name:X,setDirty:J,setFilled:Z,setFocused:Q,setTouched:ee,state:et,validationMode:en,validityData:er,validation:ea}=(0,x.useFieldRootContext)(),ei=S(),{labelId:eo,controlId:es,registerControlId:el,getDescriptionProps:ed}=(0,R.useLabelableContext)(),eu=function(e=!0){let t=r.useContext(k);if(void 0===t&&!e)throw Error((0,w.default)(3));return t}(),ec=eu?.parent,ep=ec&&eu.allValues,eg=W||ei.disabled||eu?.disabled||P,em=X??z,ef=$??em,eh=(0,f.useBaseUiId)(),ev=(0,f.useBaseUiId)(),ex=es;ep?ex=H?ev:`${ec.id}-${ef}`:D&&(ex=D);let eb={};ep&&(H?eb=eu.parent.getParentProps():ef&&(eb=eu.parent.getChildProps(ef)));let{checked:ey=c,indeterminate:eS=A,onCheckedChange:eC,...eR}=eb,ej=eu?.value,ew=eu?.setValue,ek=eu?.defaultValue,eE=r.useRef(null),eN=(0,l.useRefWithInit)(()=>Symbol("checkbox-control")),eI=r.useRef(!1),{getButtonProps:eM,buttonRef:eT}=(0,v.useButton)({disabled:eg,native:K}),eP=eu?.validation??ea,[eO,eD]=(0,i.useControlled)({controlled:ef&&ej&&!H?ej.includes(ef):ey,default:ef&&ek&&!H?ek.includes(ef):y,name:"Checkbox",state:"checked"}),eA=ep?!!ey:eO,eF=ep&&eS||A;(0,o.useIsoLayoutEffect)(()=>{el!==a.NOOP&&(eI.current=!0,el(eN.current,ex))},[ex,el,eN]),r.useEffect(()=>{let e=eN.current;return()=>{eI.current&&el!==a.NOOP&&(eI.current=!1,el(e,void 0))}},[el,eN]),(0,b.useRegisterFieldControl)(eE,eh,eO,void 0,!eu&&!eg,z);let ez=r.useRef(null),eB=(0,s.useMergedRefs)(F,ez,eP.inputRef,eP.registerInput),eH=(0,j.useAriaLabelledBy)(T,eo,ez,!K,ex??void 0);(0,o.useIsoLayoutEffect)(()=>{ez.current&&(ez.current.indeterminate=eF,eO&&Z(!0))},[eO,eF,Z]),(0,M.useValueChanged)(eO,()=>{eu||(q(em),Z(eO),J(eO!==er.initialValue),eP.change(eO))});let eL=(0,h.mergeProps)({checked:eO,disabled:eg,form:O,name:H?void 0:em,id:K?void 0:ex??void 0,required:V,ref:eB,style:em?d.visuallyHiddenInput:d.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(L)return void e.preventDefault();let t=e.currentTarget.checked,n=(0,N.createChangeEventDetails)(I.REASONS.none,e.nativeEvent);B?.(t,n),n.isCanceled||(eC?.(t,n),!n.isCanceled&&(eD(t),ef&&ej&&ew&&!H&&!ep&&ew(t?[...ej,ef]:ej.filter(e=>e!==ef),n)))},onFocus(){eE.current?.focus()}},void 0!==$?{value:(eu?eO&&$:$)||""}:a.EMPTY_OBJECT,ed,e=>eP.getValidationProps(eg,e));r.useEffect(()=>{if(!ec||!ef)return;let e=ec.disabledStatesRef.current;return e.set(ef,eg),()=>{e.delete(ef)}},[ec,eg,ef]);let eU=r.useMemo(()=>({...et,checked:eA,disabled:eg,readOnly:L,required:V,indeterminate:eF}),[et,eA,eg,L,V,eF]),eV=g(eU),e_=(0,m.useRenderElement)("span",e,{state:eU,ref:[eT,eE,t,eu?.registerControlRef],props:[{id:K?ex??void 0:eh,role:"checkbox","aria-checked":eF?"mixed":eA,"aria-readonly":L||void 0,"aria-required":V||void 0,"aria-labelledby":eH,"data-parent":H?"":void 0,onFocus(){eg||Q(!0)},onBlur(){let e=ez.current;e&&(ee(!0),Q(!1),"onBlur"===en&&eP.commit(eu?ej:e.checked))},onKeyDown(e){if("Enter"!==e.key||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=ez.current?.form??null,n=e.currentTarget,r=e.nativeEvent,a=e.preventDefault,i=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,a.call(e)},r.preventDefault=()=>{o=!0,i.call(r)},i.call(r),(0,u.ownerWindow)(n).queueMicrotask(()=>{e.preventDefault=a,r.preventDefault=i,o||(function(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(("BUTTON"===e||"INPUT"===e)&&"submit"===t.type)return t}return null})(t)?.click()})},onClick(e){if(L||eg)return;e.preventDefault();let t=ez.current;t&&t.dispatchEvent(new((0,u.ownerWindow)(t)).PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))}},G,eR,eM,ed,e=>eP.getValidationProps(eg,e)],stateAttributesMapping:eV});return(0,n.jsxs)(E.Provider,{value:eU,children:[e_,!eO&&!eu&&em&&!H&&void 0!==_&&(0,n.jsx)("input",{type:"hidden",form:O,name:em,value:_,disabled:eg}),(0,n.jsx)("input",{...eL,suppressHydrationWarning:!0})]})});var P=e.i(137584),O=e.i(223910),D=e.i(209407);let A=r.forwardRef(function(e,t){let{render:n,className:a,style:i,keepMounted:o=!1,...s}=e,l=function(){let e=r.useContext(E);if(void 0===e)throw Error((0,w.default)(14));return e}(),d=l.checked||l.indeterminate,{mounted:u,transitionStatus:c,setMounted:f}=(0,O.useTransitionStatus)(d),h=r.useRef(null),v={...l,transitionStatus:c};(0,P.useOpenChangeComplete)({open:d,ref:h,onComplete(){d||f(!1)}});let x={...g(l),...D.transitionStatusMapping,...p.fieldValidityMapping},b=(0,m.useRenderElement)("span",e,{ref:[t,h],state:v,stateAttributesMapping:x,props:s});return o||u?b:null});e.s(["Indicator",0,A,"Root",0,T],26749);var F=e.i(26749),F=F,z=e.i(115504),B=e.i(678784);e.s(["Checkbox",0,function({className:e,...t}){return(0,n.jsx)(F.Root,{"data-slot":"checkbox",className:(0,z.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...t,children:(0,n.jsx)(F.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,n.jsx)(B.CheckIcon,{})})})}],257428)},735419,649582,e=>{"use strict";var t=e.i(843476),n=e.i(257428);function r({table:e}){let a=e.getIsAllPageRowsSelected(),i=e.getIsSomePageRowsSelected();return(0,t.jsx)(n.Checkbox,{"aria-label":"Select all rows","data-testid":"datatable-select-all",checked:a,indeterminate:i&&!a,onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t)})}function a({row:e,label:r}){return(0,t.jsx)(n.Checkbox,{"aria-label":r,"data-testid":`datatable-select-row-${e.id}`,checked:e.getIsSelected(),disabled:!e.getCanSelect(),onCheckedChange:t=>e.toggleSelected(!!t)})}e.s(["createSelectionColumn",0,function(e={}){let{rowAriaLabel:n}=e;return{id:"select",size:44,enableSorting:!1,enableHiding:!1,enableResizing:!1,meta:{title:"Select",className:"w-11",headerClassName:"w-11"},header:({table:e})=>(0,t.jsx)(r,{table:e}),cell:({row:e})=>(0,t.jsx)(a,{row:e,label:n?.(e)??"Select row"})}}],735419);let i=(0,e.i(475254).default)("sliders-horizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);e.s(["SlidersHorizontal",0,i],649582)},451512,348990,e=>{"use strict";e.s([],261027),e.i(261027),e.i(247167);var t,n,r=e.i(271645),a=e.i(733332);let i=r.createContext(void 0);function o(e){let t=r.useContext(i);if(void 0===t&&!e)throw Error((0,a.default)(33));return t}let s=r.createContext(void 0);function l(e){let t=r.useContext(s);if(void 0===t&&!e)throw Error((0,a.default)(36));return t}var d=e.i(552245),u=e.i(405005);let c=r.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,{store:s}=l(),{arrowRef:c,side:p,align:g,arrowUncentered:m,arrowStyles:f}=o(),h=s.useState("open");return(0,d.useRenderElement)("div",e,{ref:[c,t],stateAttributesMapping:u.popupStateMapping,state:{open:h,side:p,align:g,uncentered:m},props:{style:f,"aria-hidden":!0,...i}})});var p=e.i(209407);let g=r.createContext(void 0);function m(e=!0){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,a.default)(25));return t}var f=e.i(56434);let h={...u.popupStateMapping,...p.transitionStatusMapping},v=r.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,{store:o}=l(),s=o.useState("open"),u=o.useState("mounted"),c=o.useState("transitionStatus"),p=o.useState("lastOpenChangeReason"),g=m();return(0,d.useRenderElement)("div",e,{ref:g?.backdropRef?[t,g.backdropRef]:t,state:{open:s,transitionStatus:c},stateAttributesMapping:h,props:[{role:"presentation",hidden:!u,style:{pointerEvents:p===f.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});var x=e.i(951437);let b=r.createContext(void 0);var y=e.i(828918),S=e.i(540886),C=e.i(176782),R=e.i(328744);function j(e){let{closeOnClick:t,highlighted:n,id:a,nodeId:i,store:o,typingRef:s,itemRef:l,itemMetadata:d}=e,{events:u}=o.useState("floatingTreeRoot"),c=o.useState("open"),p=m(!0),g=void 0!==p;return r.useMemo(()=>({id:a,role:"menuitem",tabIndex:c&&n?0:-1,onKeyDown(e){" "===e.key&&s?.current&&e.preventDefault()},onMouseMove(e){i&&u.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){t&&u.emit("close",{domEvent:e,reason:f.REASONS.itemPress})},onMouseUp(e){if(p){let t=p.initialCursorPointRef.current;if(p.initialCursorPointRef.current=null,g&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||g&&!R.platform.os.mac&&2===e.button)return}l.current&&o.context.allowMouseUpTriggerRef.current&&(!g||2===e.button)&&(!d||"regular-item"===d.type)&&l.current.click()}}),[t,n,a,u,i,c,o,s,l,p,g,d])}let w={type:"regular-item"};function k(e){let{closeOnClick:t,disabled:n=!1,highlighted:a,id:i,store:o,typingRef:s=o.context.typingRef,nativeButton:l,itemMetadata:d,nodeId:u}=e,c=o.useState("disabled"),p=r.useRef(null),{getButtonProps:g,buttonRef:m}=(0,S.useButton)({disabled:n||c,focusableWhenDisabled:!0,native:l,composite:!0}),f=j({closeOnClick:t,highlighted:a,id:i,nodeId:u,store:o,typingRef:s,itemRef:p,itemMetadata:d}),h=r.useCallback(e=>(0,C.mergeProps)(f,{onMouseEnter(){"submenu-trigger"===d.type&&d.setActive()}},e,g),[f,g,d]),v=(0,y.useMergedRefs)(p,m);return r.useMemo(()=>({getItemProps:h,itemRef:v}),[h,v])}var E=e.i(673553),N=e.i(788015);let I=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.highlighted="data-highlighted",t),M={checked:e=>e?{[I.checked]:""}:{[I.unchecked]:""},...p.transitionStatusMapping};var T=e.i(675606),P=e.i(843476);let O=r.forwardRef(function(e,t){let{render:n,className:a,id:i,label:s,nativeButton:u=!1,disabled:c=!1,closeOnClick:p=!1,checked:g,defaultChecked:m,onCheckedChange:h,style:v,...y}=e,S=(0,E.useCompositeListItem)({label:s}),C=o(!0),R=(0,N.useBaseUiId)(i),{store:j}=l(),I=j.useState("isActive",S.index),O=j.useState("itemProps"),[D,A]=(0,x.useControlled)({controlled:g,default:m??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:F,itemRef:z}=k({closeOnClick:p,disabled:c,highlighted:I,id:R,store:j,nativeButton:u,nodeId:C?.context.nodeId,itemMetadata:w}),B=r.useMemo(()=>({disabled:c,highlighted:I,checked:D}),[c,I,D]),H=(0,d.useRenderElement)("div",e,{state:B,stateAttributesMapping:M,props:[O,{role:"menuitemcheckbox","aria-checked":D,onClick:function(e){let t=(0,T.createChangeEventDetails)(f.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose(){}});h?.(!D,t),t.isCanceled||A(e=>!e)}},y,F],ref:[z,t,S.ref]});return(0,P.jsx)(b.Provider,{value:B,children:H})});var D=e.i(223910),A=e.i(137584);let F=r.forwardRef(function(e,t){let{render:n,className:i,style:o,keepMounted:s=!1,...l}=e,u=function(){let e=r.useContext(b);if(void 0===e)throw Error((0,a.default)(30));return e}(),c=r.useRef(null),{transitionStatus:p,setMounted:g}=(0,D.useTransitionStatus)(u.checked);(0,A.useOpenChangeComplete)({open:u.checked,ref:c,onComplete(){u.checked||g(!1)}});let m={checked:u.checked,disabled:u.disabled,highlighted:u.highlighted,transitionStatus:p};return(0,d.useRenderElement)("span",e,{state:m,ref:[t,c],stateAttributesMapping:M,props:{"aria-hidden":!0,...l},enabled:s||u.checked})}),z=r.createContext(void 0),B=r.forwardRef(function(e,t){let{render:n,className:a,style:i,...o}=e,[s,l]=r.useState(void 0),u=(0,d.useRenderElement)("div",e,{ref:t,props:{role:"group","aria-labelledby":s,...o}});return(0,P.jsx)(z.Provider,{value:l,children:u})});var H=e.i(146376);let L=r.forwardRef(function(e,t){let{render:n,className:i,style:o,id:s,...l}=e,u=(0,N.useBaseUiId)(s),c=function(){let e=r.useContext(z);if(void 0===e)throw Error((0,a.default)(31));return e}();return(0,H.useIsoLayoutEffect)(()=>(c(u),()=>{c(void 0)}),[c,u]),(0,d.useRenderElement)("div",e,{ref:t,props:{id:u,role:"presentation",...l}})}),U=r.forwardRef(function(e,t){let{render:n,className:r,id:a,label:i,nativeButton:s=!1,disabled:u=!1,closeOnClick:c=!0,style:p,...g}=e,m=(0,E.useCompositeListItem)({label:i}),f=o(!0),h=(0,N.useBaseUiId)(a),{store:v}=l(),x=v.useState("isActive",m.index),b=v.useState("itemProps"),{getItemProps:y,itemRef:S}=k({closeOnClick:c,disabled:u,highlighted:x,id:h,store:v,nativeButton:s,nodeId:f?.context.nodeId,itemMetadata:w});return(0,d.useRenderElement)("div",e,{state:{disabled:u,highlighted:x},props:[b,g,y],ref:[S,t,m.ref]})}),V=r.forwardRef(function(e,t){let{render:n,className:a,id:i,label:s,closeOnClick:u=!1,style:c,...p}=e,g=r.useRef(null),m=(0,E.useCompositeListItem)({label:s}),f=o(!0),h=f?.context.nodeId,v=(0,N.useBaseUiId)(i),{store:x}=l(),b=x.useState("isActive",m.index),y=x.useState("itemProps"),R=x.context.typingRef,{getButtonProps:w,buttonRef:k}=(0,S.useButton)({native:!1,composite:!0}),I=j({closeOnClick:u,highlighted:b,id:v,nodeId:h,store:x,typingRef:R,itemRef:g});return(0,d.useRenderElement)("a",e,{state:{highlighted:b},props:[y,p,function(e){return(0,C.mergeProps)(I,e,w)}],ref:[g,k,t,m.ref]})});var _=e.i(61487),$=e.i(431157),K=e.i(96533),Y=e.i(673327),G=e.i(815982);let q={...u.popupStateMapping,...p.transitionStatusMapping},W=r.forwardRef(function(e,t){let{render:n,className:a,style:i,finalFocus:s,...u}=e,{store:c}=l(),{side:p,align:g}=o(),m=null!=(0,K.useToolbarRootContext)(!0),h=c.useState("open"),v=c.useState("transitionStatus"),x=c.useState("popupProps"),b=c.useState("mounted"),y=c.useState("instantType"),S=c.useState("activeTriggerElement"),C=c.useState("parent"),R=c.useState("lastOpenChangeReason"),j=c.useState("rootId"),w=c.useState("floatingRootContext"),k=c.useState("floatingTreeRoot"),E=c.useState("closeDelay"),N=c.useState("activeTriggerElement"),I=c.useState("hoverEnabled"),M=c.useState("disabled"),O=c.useState("openMethod"),D="context-menu"===C.type;(0,A.useOpenChangeComplete)({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),r.useEffect(()=>{function e(e){c.setOpen(!1,(0,T.createChangeEventDetails)(e.reason,e.domEvent))}return k.events.on("close",e),()=>{k.events.off("close",e)}},[k.events,c]),(0,$.useHoverFloatingInteraction)(w,{enabled:I&&!M&&!D&&"menubar"!==C.type,closeDelay:E});let F=r.useCallback(e=>{c.set("popupElement",e)},[c]),z={transitionStatus:v,side:p,align:g,open:h,nested:"menu"===C.type,instant:y},B=(0,d.useRenderElement)("div",e,{state:z,ref:[t,c.context.popupRef,F],stateAttributesMapping:q,props:[x,{onKeyDown(e){m&&Y.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,G.getDisabledMountTransitionStyles)(v),u,{"data-rootownerid":j}]}),H=void 0===C.type||D;return(S||"menubar"===C.type&&R!==f.REASONS.outsidePress)&&(H=!0),(0,P.jsx)(_.FloatingFocusManager,{context:w,openInteractionType:O,modal:D,disabled:!b,returnFocus:void 0===s?H:s,initialFocus:"menu"!==C.type,restoreFocus:!0,externalTree:"menubar"!==C.type?k:void 0,previousFocusableElement:N,nextFocusableElement:void 0===C.type?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===C.type?c.context.beforeContentFocusGuardRef:void 0,children:B})});var X=e.i(726674);let J=r.createContext(void 0),Z=r.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:a}=l();return a.useState("mounted")||n?(0,P.jsx)(J.Provider,{value:n,children:(0,P.jsx)(X.FloatingPortal,{ref:t,...r})}):null});var Q=e.i(144394),ee=e.i(439957),et=e.i(46420),en=e.i(329365),er=e.i(53687),ea=e.i(426),ei=e.i(638396),eo=e.i(360495),es=e.i(222640),el=e.i(789579),ed=e.i(33383);let eu=r.forwardRef(function(e,t){let{anchor:n,positionMethod:o="absolute",className:s,render:d,side:u,align:c,sideOffset:p=0,alignOffset:g=0,collisionBoundary:h="clipping-ancestors",collisionPadding:v=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:y=!1,collisionAvoidance:S=ei.DROPDOWN_COLLISION_AVOIDANCE,style:C,...R}=e,{store:j}=l(),w=function(){let e=r.useContext(J);if(void 0===e)throw Error((0,a.default)(32));return e}(),k=m(!0),E=j.useState("parent"),N=j.useState("floatingRootContext"),I=j.useState("floatingTreeRoot"),M=j.useState("mounted"),O=j.useState("open"),D=j.useState("modal"),A=j.useState("openMethod"),F=j.useState("activeTriggerElement"),z=j.useState("transitionStatus"),B=j.useState("positionerElement"),L=j.useState("instantType"),U=j.useState("hasViewport"),V=j.useState("lastOpenChangeReason"),_=j.useState("floatingNodeId"),$=j.useState("floatingParentNodeId"),K=N.useState("domReferenceElement"),Y=r.useRef(null),G=(0,es.useAnimationsFinished)(B,!1,!1),q=n,W=p,X=g,Z=c,eu=S;"context-menu"===E.type&&(q=n??E.context?.anchor,Z=Z??"start",u||"center"===Z||(X=e.alignOffset??2,W=e.sideOffset??-5));let ec=u,ep=Z;"menu"===E.type?(ec=ec??"inline-end",ep=ep??"start",eu=e.collisionAvoidance??ei.POPUP_COLLISION_AVOIDANCE):"menubar"===E.type&&(ec=ec??("vertical"===E.context.orientation?"inline-end":"bottom"),ep=ep??"start");let eg="context-menu"===E.type,em=(0,en.useAnchorPositioning)({anchor:q,floatingRootContext:N,positionMethod:k?"fixed":o,mounted:M,side:ec,sideOffset:W,align:ep,alignOffset:X,arrowPadding:eg?0:x,collisionBoundary:h,collisionPadding:v,sticky:b,nodeId:_,keepMounted:w,disableAnchorTracking:y,collisionAvoidance:eu,shiftCrossAxis:eg&&!("side"in eu&&"flip"===eu.side),externalTree:I,adaptiveOrigin:U?eo.adaptiveOrigin:void 0});r.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===_&&j.set("hoverEnabled",!1),e.nodeId!==_&&e.parentNodeId===j.select("floatingParentNodeId")&&j.setOpen(!1,(0,T.createChangeEventDetails)(f.REASONS.siblingOpen)))}return I.events.on("menuopenchange",e),()=>{I.events.off("menuopenchange",e)}},[j,I.events,_]),r.useEffect(()=>{if(null!=j.select("floatingParentNodeId"))return I.events.on("menuopenchange",e),()=>{I.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==j.select("floatingParentNodeId"))return;let t=e.reason??f.REASONS.siblingOpen;j.setOpen(!1,(0,T.createChangeEventDetails)(t))}},[I.events,j]);let ef=(0,ee.useTimeout)();r.useEffect(()=>{O||ef.clear()},[O,ef]),r.useEffect(()=>{function e(e){if(O&&e.nodeId===j.select("floatingParentNodeId"))if(e.target&&F&&F!==e.target){let e=j.select("closeDelay");e>0?ef.isStarted()||ef.start(e,()=>{j.setOpen(!1,(0,T.createChangeEventDetails)(f.REASONS.siblingOpen))}):j.setOpen(!1,(0,T.createChangeEventDetails)(f.REASONS.siblingOpen))}else ef.clear()}return I.events.on("itemhover",e),()=>{I.events.off("itemhover",e)}},[I.events,O,F,j,ef]),r.useEffect(()=>{let e={open:O,nodeId:_,parentNodeId:$,reason:j.select("lastOpenChangeReason")};I.events.emit("menuopenchange",e)},[I.events,O,j,_,$]),(0,H.useIsoLayoutEffect)(()=>{let e=Y.current;if(K&&(Y.current=K),e&&K&&K!==e){j.set("instantType",void 0);let e=new AbortController;return G(()=>{j.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[K,G,j]);let eh={open:O,side:em.side,align:em.align,anchorHidden:em.anchorHidden,nested:"menu"===E.type,instant:L},ev="menubar"===E.type&&E.context.modal,ex=D&&V!==f.REASONS.triggerHover;(0,ed.useAnchoredPopupScrollLock)(O&&(ev||ex),"touch"===A,B,F);let eb=(0,el.usePositioner)(e,eh,{styles:em.positionerStyles,transitionStatus:z,props:R,refs:[t,j.useStateSetter("positionerElement")],hidden:!M,inert:!O}),ey=M&&"menu"!==E.type&&("menubar"!==E.type&&D&&V!==f.REASONS.triggerHover||"menubar"===E.type&&E.context.modal),eS=null;return"menubar"===E.type?eS=E.context.contentElement:void 0===E.type&&(eS=F),(0,P.jsxs)(i.Provider,{value:em,children:[ey&&(0,P.jsx)(ea.InternalBackdrop,{ref:"context-menu"===E.type||"nested-context-menu"===E.type?E.context.internalBackdropRef:null,inert:(0,Q.inertValue)(!O),cutout:eS}),(0,P.jsx)(et.FloatingNode,{id:_,children:(0,P.jsx)(er.CompositeList,{elementsRef:j.context.itemDomElements,labelsRef:j.context.itemLabels,children:eb})})]})});var ec=e.i(667865);let ep=r.createContext(void 0),eg=r.memo(r.forwardRef(function(e,t){let{render:n,className:a,value:i,defaultValue:o,onValueChange:s,disabled:l=!1,style:u,"aria-labelledby":c,...p}=e,[g,m]=r.useState(void 0),[f,h]=(0,x.useControlled)({controlled:i,default:o,name:"MenuRadioGroup"}),v=(0,ec.useStableCallback)((e,t)=>{s?.(e,t),t.isCanceled||h(e)}),b=(0,d.useRenderElement)("div",e,{state:{disabled:l},ref:t,props:{role:"group","aria-labelledby":c??g,"aria-disabled":l||void 0,...p}}),y=r.useMemo(()=>({value:f,setValue:v,disabled:l}),[f,v,l]);return(0,P.jsx)(z.Provider,{value:m,children:(0,P.jsx)(ep.Provider,{value:y,children:b})})})),em=r.createContext(void 0),ef=r.forwardRef(function(e,t){let{render:n,className:i,id:s,label:u,nativeButton:c=!1,disabled:p=!1,closeOnClick:g=!1,value:m,style:h,...v}=e,x=(0,E.useCompositeListItem)({label:u}),b=o(!0),y=(0,N.useBaseUiId)(s),{store:S}=l(),C=S.useState("isActive",x.index),R=S.useState("itemProps"),{value:j,setValue:I,disabled:O}=function(){let e=r.useContext(ep);if(void 0===e)throw Error((0,a.default)(34));return e}(),D=O||p,A=j===m,{getItemProps:F,itemRef:z}=k({closeOnClick:g,disabled:D,highlighted:C,id:y,store:S,nativeButton:c,nodeId:b?.context.nodeId,itemMetadata:w}),B=r.useMemo(()=>({disabled:D,highlighted:C,checked:A}),[D,C,A]),H=(0,d.useRenderElement)("div",e,{state:B,stateAttributesMapping:M,props:[R,{role:"menuitemradio","aria-checked":A,onClick:function(e){I(m,(0,T.createChangeEventDetails)(f.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose(){}}))}},v,F],ref:[z,t,x.ref]});return(0,P.jsx)(em.Provider,{value:B,children:H})}),eh=r.forwardRef(function(e,t){let{render:n,className:i,style:o,keepMounted:s=!1,...l}=e,u=function(){let e=r.useContext(em);if(void 0===e)throw Error((0,a.default)(35));return e}(),c=r.useRef(null),{transitionStatus:p,setMounted:g}=(0,D.useTransitionStatus)(u.checked);(0,A.useOpenChangeComplete)({open:u.checked,ref:c,onComplete(){u.checked||g(!1)}});let m={checked:u.checked,disabled:u.disabled,highlighted:u.highlighted,transitionStatus:p};return(0,d.useRenderElement)("span",e,{state:m,stateAttributesMapping:M,ref:[t,c],props:{"aria-hidden":!0,...l},enabled:s||u.checked})});var ev=e.i(883977),ex=e.i(956789),eb=e.i(896499),ey=e.i(17989),eS=e.i(260891),eC=e.i(736760),eR=e.i(350527);let ej=r.createContext(null);function ew(e){let t=r.useContext(ej);if(null===t&&!e)throw Error((0,a.default)(5));return t}var ek=e.i(872855),eE=e.i(32199),eN=e.i(616269),eI=e.i(301252),eM=e.i(921374),eT=e.i(379248),eP=e.i(116786),eO=e.i(990627);let eD={...eP.popupStoreSelectors,disabled:(0,eN.createSelector)(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:(0,eN.createSelector)(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),openMethod:(0,eN.createSelector)(e=>e.openMethod),allowMouseEnter:(0,eN.createSelector)(e=>e.allowMouseEnter),highlightItemOnHover:(0,eN.createSelector)(e=>e.highlightItemOnHover),stickIfOpen:(0,eN.createSelector)(e=>e.stickIfOpen),parent:(0,eN.createSelector)(e=>e.parent),rootId:(0,eN.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:(0,eN.createSelector)(e=>e.activeIndex),isActive:(0,eN.createSelector)((e,t)=>e.activeIndex===t),hoverEnabled:(0,eN.createSelector)(e=>e.hoverEnabled),instantType:(0,eN.createSelector)(e=>e.instantType),lastOpenChangeReason:(0,eN.createSelector)(e=>e.openChangeReason),floatingTreeRoot:(0,eN.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:(0,eN.createSelector)(e=>e.floatingNodeId),floatingParentNodeId:(0,eN.createSelector)(e=>e.floatingParentNodeId),itemProps:(0,eN.createSelector)(e=>e.itemProps),closeDelay:(0,eN.createSelector)(e=>e.closeDelay),hasViewport:(0,eN.createSelector)(e=>e.hasViewport),keyboardEventRelay:(0,eN.createSelector)(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class eA extends eI.ReactStore{constructor(e){super({...{...(0,eP.createInitialPopupStoreState)(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new eT.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ex.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:r.createRef(),popupRef:r.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),onOpenChangeComplete:void 0,triggerElements:new eO.PopupTriggerMap},eD),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let a=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),o=e.store.select("keyboardEventRelay");(t!==a||n!==i||r!==o)&&(t=a,n=i,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){let n=(0,eM.useRefWithInit)(()=>new eA(t)).current;return e??n}unsubscribeParentListener=null}var eF=e.i(264111);let ez=r.createContext(void 0);function eB(){return r.useContext(ez)}let eH=(0,eb.fastComponent)(function(e){let t,{children:n,open:a,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:d=!1,disabled:u=!1,modal:c,loopFocus:p=!0,orientation:g="vertical",actionsRef:h,closeParentOnEsc:v=!1,handle:x,triggerId:b,defaultTriggerId:y=null,highlightItemOnHover:S=!0}=e,R=m(!0),j=l(!0),w=ew(!0),k=eB(),E=r.useMemo(()=>k&&j?{type:"menu",store:j.store}:w?{type:"menubar",context:w}:R&&!j?{type:"context-menu",context:R}:{type:void 0},[R,j,w,k]),N=eA.useStore(x?.store,{open:d,openProp:a,activeTriggerId:y,triggerIdProp:b,parent:E});(0,eF.useInitialOpenSync)(N,a,d,y),N.useControlledProp("openProp",a),N.useControlledProp("triggerIdProp",b),N.useContextCallback("onOpenChangeComplete",o);let I=(0,ev.useId)(),M=(0,ev.useId)(),O=N.useState("floatingTreeRoot"),D=(0,et.useFloatingNodeId)(O),A=(0,et.useFloatingParentNodeId)(),F=N.useState("open"),z=N.useState("activeTriggerElement"),B=N.useState("positionerElement"),L=N.useState("hoverEnabled"),U=N.useState("disabled"),V=N.useState("lastOpenChangeReason"),_=N.useState("parent"),$=N.useState("activeIndex"),K=N.useState("payload"),Y=N.useState("floatingParentNodeId"),G=r.useRef(null),q=r.useRef("context-menu"!==_.type),W=(0,ee.useTimeout)(),X=r.useRef(!0),J=(0,ee.useTimeout)(),Z=null!=Y,{openMethod:Q,triggerProps:en}=(0,eE.useOpenInteractionType)(F);N.useSyncedValues({disabled:u,highlightItemOnHover:S,modal:void 0===_.type?c:void 0,openMethod:Q,rootId:I}),(0,eF.useImplicitActiveTrigger)(N);let{forceUnmount:er}=(0,eF.useOpenStateTransitions)(F,N,()=>{N.update({allowMouseEnter:!1,stickIfOpen:!0})});(0,H.useIsoLayoutEffect)(()=>{R&&!j?N.update({parent:{type:"context-menu",context:R},floatingNodeId:D,floatingParentNodeId:A}):j&&N.update({floatingNodeId:D,floatingParentNodeId:A})},[R,j,D,A,N]),r.useEffect(()=>{if(F||(G.current=null),"context-menu"===_.type){if(!F){W.clear(),q.current=!1;return}W.start(500,()=>{q.current=!0})}},[W,F,_.type]),(0,H.useIsoLayoutEffect)(()=>{F||L||N.set("hoverEnabled",!0)},[F,L,N]);let ea=(0,ec.useStableCallback)((e,t)=>{let n=t.reason;if(F===e&&t.trigger===z&&V===n)return;let r=(0,eF.attachPreventUnmountOnClose)(t);if(e||null!=t.trigger||(t.trigger=z??void 0),i?.(e,t),t.isCanceled)return;N.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(!1===e&&a?.type==="click"&&"touch"===a.pointerType&&!X.current)return;e&&n===f.REASONS.triggerFocus?(X.current=!1,J.start(300,()=>{X.current=!0})):(X.current=!0,J.clear());let o=(n===f.REASONS.triggerPress||n===f.REASONS.itemPress)&&0===a.detail&&a?.isTrusted,s=!e&&(n===f.REASONS.escapeKey||null==n),l={open:e,openChangeReason:n};G.current=t.event??null,(0,eF.setPopupOpenState)(l,e,t.trigger,r()),N.update(l),"menubar"===_.type&&(n===f.REASONS.triggerFocus||n===f.REASONS.focusOut||n===f.REASONS.triggerHover||n===f.REASONS.listNavigation||n===f.REASONS.siblingOpen)?N.set("instantType","group"):o||s?N.set("instantType",o?"click":"dismiss"):N.set("instantType",void 0)}),eo=(0,eR.useSyncedFloatingRootContext)({popupStore:N,floatingId:M,nested:null!=A,onOpenChange:ea}),es=eo.context.events;r.useEffect(()=>{let e=({open:e,eventDetails:t})=>ea(e,t);return es.on("setOpen",e),()=>{es?.off("setOpen",e)}},[es,ea]);let el=r.useCallback(()=>{N.setOpen(!1,(0,T.createChangeEventDetails)(f.REASONS.imperativeAction))},[N]);r.useImperativeHandle(h,()=>({unmount:er,close:el}),[er,el]),"context-menu"===_.type&&(t=_.context),r.useImperativeHandle(t?.positionerRef,()=>B,[B]),r.useImperativeHandle(t?.actionsRef,()=>({setOpen:ea}),[ea]);let ed=(0,ey.useDismiss)(eo,{enabled:!U,bubbles:{escapeKey:v&&"menu"===_.type},outsidePress:()=>"context-menu"!==_.type||G.current?.type==="contextmenu"||q.current,externalTree:Z?O:void 0}),eu=(0,ek.useDirection)(),ep=r.useCallback(e=>{N.select("activeIndex")!==e&&N.set("activeIndex",e)},[N]),eg=(0,eS.useListNavigation)(eo,{enabled:!U,listRef:N.context.itemDomElements,activeIndex:$,nested:void 0!==_.type,loopFocus:p,orientation:g,parentOrientation:"menubar"===_.type?_.context.orientation:void 0,rtl:"rtl"===eu,disabledIndices:ex.EMPTY_ARRAY,onNavigate:ep,openOnArrowKeyDown:"context-menu"!==_.type,externalTree:Z?O:void 0,focusItemOnHover:S}),em=r.useCallback(e=>{N.context.typingRef.current=e},[N]),ef=(0,eC.useTypeahead)(eo,{enabled:!U,listRef:N.context.itemLabels,elementsRef:N.context.itemDomElements,activeIndex:$,resetMs:ei.TYPEAHEAD_RESET_MS,onMatch:e=>{F&&e!==$&&N.set("activeIndex",e)},onTyping:em}),eh=r.useMemo(()=>{let e=(0,C.mergeProps)(ef.reference,eg.reference,ed.reference,{onMouseMove(){N.set("allowMouseEnter",!0)}},en);return e["aria-haspopup"]="menu",e["aria-expanded"]=F,e},[N,ef.reference,eg.reference,ed.reference,en,F]),eb=r.useMemo(()=>{let e=(0,C.mergeProps)(eg.trigger,ed.trigger,en);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e},[eg.trigger,ed.trigger,en]),ej=r.useMemo(()=>(0,C.mergeProps)(eF.FOCUSABLE_POPUP_PROPS,{id:M,role:"menu","aria-labelledby":z?.id,onMouseMove(){N.set("allowMouseEnter",!0),"menu"===_.type&&N.set("hoverEnabled",!1)},onClick(){N.select("hoverEnabled")&&N.set("hoverEnabled",!1)},onKeyDown(e){let t=N.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},ef.floating,eg.floating,ed.floating),[z,M,_.type,N,ef.floating,eg.floating,ed.floating]),eN=eg.item??ex.EMPTY_OBJECT;(0,eF.usePopupInteractionProps)(N,{floatingRootContext:eo,activeTriggerProps:eh,inactiveTriggerProps:eb,popupProps:ej,itemProps:eN});let eI=r.useMemo(()=>({store:N,parent:E}),[N,E]),eM=(0,P.jsx)(s.Provider,{value:eI,children:"function"==typeof n?n({payload:K}):n});return void 0===_.type||"context-menu"===_.type?(0,P.jsx)(et.FloatingTree,{externalTree:O,children:eM}):eM});var eL=e.i(108868),eU=e.i(650316),eV=e.i(385689),e_=e.i(413082),e$=e.i(872135),eK=e.i(647554),eY=e.i(264042),eG=e.i(395530);function eq(e){let{render:t,className:n,style:r,state:a=ex.EMPTY_OBJECT,props:i=ex.EMPTY_ARRAY,refs:o=ex.EMPTY_ARRAY,metadata:s,stateAttributesMapping:l,tag:u="div",...c}=e,{compositeProps:p,compositeRef:g}=(0,eG.useCompositeItem)({metadata:s});return(0,d.useRenderElement)(u,e,{state:a,ref:[...o,g],props:[p,...i,c],stateAttributesMapping:l})}e.s(["CompositeItem",0,eq],348990);var eW=e.i(838452),eX=e.i(229315),eJ=e.i(346570),eZ=e.i(152535);let eQ=(0,eb.fastComponentRef)(function(e,t){let n,i,o,{render:s,className:c,style:p,disabled:g=!1,nativeButton:h=!0,id:v,openOnHover:x,delay:b=100,closeDelay:y=0,handle:R,payload:j,...w}=e,k=l(!0),E=R?.store??k?.store;if(!E)throw Error((0,a.default)(85));let I=(0,N.useBaseUiId)(v),M=E.useState("isTriggerActive",I),T=E.useState("floatingRootContext"),O=E.useState("isOpenedByTrigger",I),D=E.useState("triggerPopupId",I),A=r.useRef(null),F=(n=m(!0),i=l(!0),o=ew(!0),r.useMemo(()=>o?{type:"menubar",context:o}:n&&!i?{type:"context-menu",context:n}:{type:void 0},[n,i,o])),z=(0,eW.useCompositeRootContext)(!0),B=(0,et.useFloatingTree)(),L=r.useMemo(()=>B??new eT.FloatingTreeStore,[B]),U=(0,et.useFloatingNodeId)(L),V=(0,et.useFloatingParentNodeId)(),{registerTrigger:_,isMountedByThisTrigger:$}=(0,eF.useTriggerDataForwarding)(I,A,E,{payload:j,closeDelay:y,parent:F,floatingTreeRoot:L,floatingNodeId:U,floatingParentNodeId:V,keyboardEventRelay:z?.relayKeyboardEvent}),K="menubar"===F.type,Y=E.useState("disabled"),G=g||Y||K&&F.context.disabled,{getButtonProps:q,buttonRef:W}=(0,S.useButton)({disabled:G,native:h});r.useEffect(()=>{O||void 0!==F.type||(E.context.allowMouseUpTriggerRef.current=!1)},[E,O,F.type]);let X=r.useRef(null),J=(0,ee.useTimeout)(),Z=(0,ec.useStableCallback)(e=>{if(!X.current)return;J.clear(),E.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if((0,eK.contains)(X.current,t)||(0,eK.contains)(E.select("positionerElement"),t)||t===X.current||null!=t&&function e(t){return(0,eX.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid")??void 0:(0,eX.isLastTraversableNode)(t)?void 0:e((0,eX.getParentNode)(t))}(t)===E.select("rootId"))return;let n=(0,eY.getPseudoElementBounds)(X.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||L.events.emit("close",{domEvent:e,reason:f.REASONS.cancelOpen})});r.useEffect(()=>{O&&E.select("lastOpenChangeReason")===f.REASONS.triggerHover&&(0,eL.ownerDocument)(X.current).addEventListener("mouseup",Z,{once:!0})},[O,Z,E]);let Q=K&&F.context.hasSubmenuOpen,en=x??Q,er=(0,e$.useHoverReferenceInteraction)(T,{enabled:en&&!G&&"context-menu"!==F.type&&(!K||Q&&!$),handleClose:(0,eU.safePolygon)({blockPointerEvents:!K}),mouseOnly:!0,move:!1,restMs:void 0===F.type?b:void 0,delay:{close:y},triggerElementRef:A,externalTree:L,isActiveTrigger:M,isClosing:()=>"ending"===E.select("transitionStatus")}),ea=function(e,t){let n=(0,ee.useTimeout)(),[a,i]=r.useState(!1);return(0,H.useIsoLayoutEffect)(()=>{e&&"trigger-hover"===t?(i(!0),n.start(ei.PATIENT_CLICK_THRESHOLD,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),a}(O,E.select("lastOpenChangeReason")),eo=(0,eV.useClick)(T,{enabled:!G&&"context-menu"!==F.type,event:O&&K?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===F.type&&ea}),es=(0,e_.useFocus)(T,{enabled:!G&&Q}),el=function(e){let{enabled:t=!0,mouseDownAction:n,open:a}=e,i=r.useRef(!1);return r.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!a||"close"===n&&a)&&(i.current=!0,(0,eL.ownerDocument)(e.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:ex.EMPTY_OBJECT,[t,n,a])}({open:O,enabled:K,mouseDownAction:"open"}),ed=r.useMemo(()=>(0,C.mergeProps)(es.reference,eo.reference),[es.reference,eo.reference]),eu=E.useState("triggerProps",$),{preFocusGuardRef:ep,handlePreFocusGuardFocus:eg,handleFocusTargetFocus:em}=(0,eJ.useTriggerFocusGuards)(E,A),ef={disabled:G,open:O},eh=[X,t,W,_,A],ev=[ed,er??ex.EMPTY_OBJECT,eu,{"aria-haspopup":"menu","aria-controls":D,id:I,onMouseDown:e=>{E.select("open")||(J.start(200,()=>{E.context.allowMouseUpTriggerRef.current=!0}),(0,eL.ownerDocument)(e.currentTarget).addEventListener("mouseup",Z,{once:!0}))}},K?{role:"menuitem"}:{},el,w,q],eb=(0,d.useRenderElement)("button",e,{enabled:!K,stateAttributesMapping:u.pressableTriggerOpenStateMapping,state:ef,ref:eh,props:ev});return K?(0,P.jsx)(eq,{tag:"button",render:s,className:c,style:p,state:ef,refs:eh,props:ev,stateAttributesMapping:u.pressableTriggerOpenStateMapping}):O?(0,P.jsxs)(r.Fragment,{children:[(0,P.jsx)(eZ.FocusGuard,{ref:ep,onFocus:eg},`${I}-pre-focus-guard`),(0,P.jsx)(r.Fragment,{children:eb},I),(0,P.jsx)(eZ.FocusGuard,{ref:E.context.triggerFocusTargetRef,onFocus:em},`${I}-post-focus-guard`)]}):(0,P.jsx)(r.Fragment,{children:eb},I)});var e0=e.i(818390);let e1=((n={}).popupWidth="--popup-width",n.popupHeight="--popup-height",n),e5={activationDirection:e=>e?{"data-activation-direction":e}:null},e2=r.forwardRef(function(e,t){let{render:n,className:r,style:a,children:i,...s}=e,{store:u}=l(),{side:c}=o(),p=u.useState("instantType"),{children:g,state:m}=(0,e0.usePopupViewport)({store:u,side:c,cssVars:e1,children:i}),f={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:p};return(0,d.useRenderElement)("div",e,{state:f,ref:t,props:[s,{children:g}],stateAttributesMapping:e5})});var e4=e.i(652225);let e3=r.forwardRef(function(e,t){let{render:n,className:i,style:s,label:c,id:p,nativeButton:g=!1,openOnHover:m=!0,delay:f=100,closeDelay:h=0,disabled:v=!1,...x}=e,b=(0,E.useCompositeListItem)({label:c}),y=o(),{store:S}=l(),C=(0,N.useBaseUiId)(p),R=S.useState("open"),j=S.useState("floatingRootContext"),w=S.useState("floatingTreeRoot"),I=S.useState("triggerPopupId",C),M=(0,eF.useTriggerRegistration)(C,S),T=r.useCallback(e=>{let t=M(e);return null!==e&&S.select("open")&&null==S.select("activeTriggerId")&&S.update({activeTriggerId:C,activeTriggerElement:e,closeDelay:h}),t},[M,h,S,C]),P=r.useRef(null),O=r.useCallback(e=>{P.current=e,S.set("activeTriggerElement",e)},[S]),D=eB();if(!D?.parentMenu)throw Error((0,a.default)(37));S.useSyncedValue("closeDelay",h);let A=D.parentMenu,F=S.useState("disabled"),z=A.useState("disabled"),B=v||F||z,H=A.useState("itemProps"),L=A.useState("isActive",b.index),U=r.useMemo(()=>({type:"submenu-trigger",setActive(){A.select("highlightItemOnHover")&&A.set("activeIndex",b.index)}}),[A,b.index]),{getItemProps:V,itemRef:_}=k({closeOnClick:!1,disabled:B,highlighted:L,id:C,store:S,typingRef:A.context.typingRef,nativeButton:g,itemMetadata:U,nodeId:y?.context.nodeId}),$=S.useState("hoverEnabled"),K=(0,e$.useHoverReferenceInteraction)(j,{enabled:$&&m&&!B,handleClose:(0,eU.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:f,delay:{open:f,close:h},shouldOpen:f>0?()=>A.select("allowMouseEnter"):void 0,triggerElementRef:P,externalTree:w,isClosing:()=>"ending"===S.select("transitionStatus")}),Y=(0,eV.useClick)(j,{enabled:!B,event:"mousedown",toggle:!m,ignoreMouse:m,stickIfOpen:!1}).reference??ex.EMPTY_OBJECT,G=S.useState("triggerProps",!0);return delete G.id,(0,d.useRenderElement)("div",e,{state:{disabled:B,highlighted:L,open:R},stateAttributesMapping:u.triggerOpenStateMapping,props:[Y,K,G,H,{"aria-controls":I,tabIndex:R||L?0:-1,onBlur(){L&&A.set("activeIndex",null)}},x,V],ref:[t,b.ref,_,T,O]})});class e8{constructor(){this.store=new eA}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,a.default)(83,e));this.store.setOpen(!0,(0,T.createChangeEventDetails)("imperative-action",void 0,t))}close(){this.store.setOpen(!1,(0,T.createChangeEventDetails)("imperative-action",void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Arrow",0,c,"Backdrop",0,v,"CheckboxItem",0,O,"CheckboxItemIndicator",0,F,"Group",0,B,"GroupLabel",0,L,"Handle",0,e8,"Item",0,U,"LinkItem",0,V,"Popup",0,W,"Portal",0,Z,"Positioner",0,eu,"RadioGroup",0,eg,"RadioItem",0,ef,"RadioItemIndicator",0,eh,"Root",0,eH,"Separator",()=>e4.Separator,"SubmenuRoot",0,function(e){let t=l().store,n=r.useMemo(()=>({parentMenu:t}),[t]);return(0,P.jsx)(ez.Provider,{value:n,children:(0,P.jsx)(eH,{...e})})},"SubmenuTrigger",0,e3,"Trigger",0,eQ,"Viewport",0,e2,"createHandle",0,function(){return new e8}],160948);var e7=e.i(160948);e.s(["Menu",0,e7],451512)},707701,531649,494862,e=>{"use strict";e.i(807235),e.i(981080),e.i(152370),e.i(735419);var t=e.i(843476),n=e.i(16715),r=e.i(555436),a=e.i(649582),i=e.i(37727),o=e.i(487486),s=e.i(519455),l=e.i(793479),d=e.i(115504),u=e.i(451512),c=e.i(643531);let p=(0,e.i(475254).default)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);function g({table:e,label:n="View",className:r}){let a=e.getAllLeafColumns().filter(e=>e.getCanHide());return 0===a.length?null:(0,t.jsxs)(u.Menu.Root,{children:[(0,t.jsx)(u.Menu.Trigger,{render:(0,t.jsxs)(s.Button,{variant:"outline",size:"sm",className:r,"data-testid":"view-options-trigger",children:[(0,t.jsx)(p,{}),n]})}),(0,t.jsx)(u.Menu.Portal,{children:(0,t.jsx)(u.Menu.Positioner,{side:"bottom",align:"end",sideOffset:4,className:"isolate z-50",children:(0,t.jsx)(u.Menu.Popup,{className:"min-w-[12rem] rounded-md bg-popover p-1 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden",children:a.map(e=>(0,t.jsxs)(u.Menu.CheckboxItem,{checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(t),closeOnClick:!1,"data-testid":`view-option-${e.id}`,className:"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-7 capitalize outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground",children:[(0,t.jsx)(u.Menu.CheckboxItemIndicator,{className:"absolute left-2 flex size-4 items-center justify-center",children:(0,t.jsx)(c.Check,{className:"size-3.5"})}),e.columnDef.meta?.title??("string"==typeof e.columnDef.header?e.columnDef.header:e.id)]},e.id))})})})]})}e.s(["DataTableToolbar",0,function({table:e,searchValue:u,onSearchChange:c,searchPlaceholder:p="Search",onOpenFilters:m,onRefresh:f,isRefreshing:h=!1,filterLabels:v,formatFilterValue:x,showViewOptions:b=!0,children:y,className:S}){let C=e.getState().columnFilters,R=t=>v?.[t]??e.getColumn(t)?.columnDef.meta?.title??t;return(0,t.jsxs)("div",{className:(0,d.cn)("flex flex-wrap items-center justify-between gap-2",S),children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[void 0!==c&&(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(r.Search,{className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(l.Input,{value:u??"",onChange:e=>c(e.target.value),placeholder:p,className:"h-8 w-56 pl-8","data-testid":"datatable-search"})]}),C.map(n=>{var r,a;return(0,t.jsxs)(o.Badge,{variant:"outline",className:"gap-1 py-1","data-testid":`filter-chip-${n.id}`,children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[R(n.id),":"]}),(r=n.id,a=n.value,x?.(r,a)??(Array.isArray(a)?a.join(", "):String(a))),(0,t.jsx)("button",{type:"button","aria-label":`Remove ${R(n.id)} filter`,"data-testid":`filter-chip-remove-${n.id}`,onClick:()=>e.setColumnFilters(e=>e.filter(e=>e.id!==n.id)),className:"ml-0.5 rounded-full text-muted-foreground hover:text-foreground",children:(0,t.jsx)(i.X,{className:"size-3"})})]},n.id)}),C.length>0&&(0,t.jsx)(s.Button,{variant:"ghost",size:"sm",onClick:()=>e.setColumnFilters([]),"data-testid":"datatable-clear-filters",children:"Clear all"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[y,void 0!==f&&(0,t.jsx)(s.Button,{variant:"outline",size:"icon-sm",onClick:f,disabled:h,"aria-label":"Refresh",title:"Refresh","data-testid":"datatable-refresh",children:(0,t.jsx)(n.RefreshCw,{className:h?"animate-spin":""})}),b&&(0,t.jsx)(g,{table:e,label:"Columns"}),void 0!==m&&(0,t.jsxs)(s.Button,{variant:"outline",size:"sm",onClick:m,"data-testid":"datatable-filters-trigger",children:[(0,t.jsx)(a.SlidersHorizontal,{}),"Filters",C.length>0&&(0,t.jsx)(o.Badge,{className:"ml-1 h-5 min-w-5 justify-center rounded-full px-1","data-testid":"datatable-filter-count",children:C.length})]})]})]})}],531649);var m=e.i(664659),f=e.i(344523),h=e.i(399219),h=h;function v({sorted:e}){return"asc"===e?(0,t.jsx)(h.default,{className:"size-3.5","data-sort-indicator":"asc"}):"desc"===e?(0,t.jsx)(m.ChevronDown,{className:"size-3.5","data-sort-indicator":"desc"}):(0,t.jsx)(f.ChevronsUpDown,{className:"size-3.5 text-muted-foreground","data-sort-indicator":"none"})}let x="flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground";e.s(["DataTableMultiSortHeader",0,function({table:e,fields:n,className:r}){let a=e.getState().sorting[0],o=void 0!==a&&n.some(e=>e.id===a.id)?a:void 0,s=o?.desc===!0?"desc":"asc",l=void 0!==o&&s,p=n.flatMap(e=>[{key:`${e.id}-asc`,id:e.id,desc:!1,label:`${e.label} ascending`,Icon:h.default},{key:`${e.id}-desc`,id:e.id,desc:!0,label:`${e.label} descending`,Icon:m.ChevronDown}]),g=n.flatMap((e,n)=>{let r=o?.id===e.id,a=(0,t.jsx)("span",{"data-sort-field":e.id,className:r?"font-semibold text-foreground":o?"text-muted-foreground":"",children:e.label},e.id);return 0===n?[a]:[(0,t.jsx)("span",{className:"text-muted-foreground",children:" / "},`sep-${e.id}`),a]});return(0,t.jsxs)("div",{className:(0,d.cn)("flex items-center gap-1",r),children:[(0,t.jsx)("span",{className:"font-medium",children:g}),(0,t.jsxs)(u.Menu.Root,{children:[(0,t.jsx)(u.Menu.Trigger,{render:(0,t.jsx)("button",{type:"button","data-testid":`sort-trigger-${n[0]?.id??"field"}`,"aria-label":`Sort options for ${n.map(e=>e.label).join(" or ")}`,onClick:e=>e.stopPropagation(),className:(0,d.cn)("inline-flex size-6 items-center justify-center rounded-md hover:bg-muted",l?"text-primary":"text-muted-foreground"),children:(0,t.jsx)(v,{sorted:l})})}),(0,t.jsx)(u.Menu.Portal,{children:(0,t.jsx)(u.Menu.Positioner,{side:"bottom",align:"start",sideOffset:4,className:"isolate z-50",children:(0,t.jsxs)(u.Menu.Popup,{className:"min-w-[9rem] rounded-md bg-popover p-1 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden",children:[p.map(n=>{let r=o?.id===n.id&&o.desc===n.desc;return(0,t.jsxs)(u.Menu.Item,{className:(0,d.cn)(x,r?"text-primary":""),onClick:()=>e.setSorting([{id:n.id,desc:n.desc}]),children:[(0,t.jsx)(n.Icon,{className:"size-3.5"})," ",n.label,r&&(0,t.jsx)(c.Check,{className:"ml-auto size-3.5"})]},n.key)}),(0,t.jsxs)(u.Menu.Item,{className:x,onClick:()=>e.setSorting([]),children:[(0,t.jsx)(i.X,{className:"size-3.5"})," Reset"]})]})})})]})]})},"DataTableSortHeader",0,function({column:e,title:n,variant:r="header-cycle",className:a}){let o=e.getIsSorted();return e.getCanSort()?"dropdown-tristate"===r?(0,t.jsxs)("div",{className:(0,d.cn)("flex items-center gap-1",a),children:[(0,t.jsx)("span",{className:"font-medium",children:n}),(0,t.jsxs)(u.Menu.Root,{children:[(0,t.jsx)(u.Menu.Trigger,{render:(0,t.jsx)("button",{type:"button","data-testid":`sort-trigger-${e.id}`,"aria-label":`Sort options for ${e.id}`,onClick:e=>e.stopPropagation(),className:(0,d.cn)("inline-flex size-6 items-center justify-center rounded-md hover:bg-muted",o?"text-primary":"text-muted-foreground"),children:(0,t.jsx)(v,{sorted:o})})}),(0,t.jsx)(u.Menu.Portal,{children:(0,t.jsx)(u.Menu.Positioner,{side:"bottom",align:"start",sideOffset:4,className:"isolate z-50",children:(0,t.jsxs)(u.Menu.Popup,{className:"min-w-[9rem] rounded-md bg-popover p-1 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden",children:[(0,t.jsxs)(u.Menu.Item,{className:x,onClick:()=>e.toggleSorting(!1),children:[(0,t.jsx)(h.default,{className:"size-3.5"})," Ascending"]}),(0,t.jsxs)(u.Menu.Item,{className:x,onClick:()=>e.toggleSorting(!0),children:[(0,t.jsx)(m.ChevronDown,{className:"size-3.5"})," Descending"]}),(0,t.jsxs)(u.Menu.Item,{className:x,onClick:()=>e.clearSorting(),children:[(0,t.jsx)(i.X,{className:"size-3.5"})," Reset"]})]})})})]})]}):(0,t.jsxs)("button",{type:"button","data-testid":`sort-header-${e.id}`,onClick:e.getToggleSortingHandler(),className:(0,d.cn)("flex items-center gap-1 font-medium select-none hover:text-foreground",a),children:[(0,t.jsx)("span",{children:n}),(0,t.jsx)(v,{sorted:o})]}):(0,t.jsx)("span",{className:(0,d.cn)("font-medium",a),children:n})}],494862),e.s([],707701)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js b/litellm/proxy/_experimental/out/_next/static/chunks/0kpote6n3ff9a.js
similarity index 54%
rename from litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0kpote6n3ff9a.js
index fe0f6e8e79a..d0ed2f0623b 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0kpote6n3ff9a.js
@@ -1 +1 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={},i=!0)=>{let{accessToken:d}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(d,e,a,s),enabled:!!d&&i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={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"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(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:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",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:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{})," # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),' "',e,'": "',l,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]);
\ No newline at end of file
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={},i=!0)=>{let{accessToken:d}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(d,e,a,s),enabled:!!d&&i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=b(u,i.colSpan),o=b(m,i.colSpanSm),d=b(g,i.colSpanMd),c=b(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={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"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let b=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(b.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:b.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:b})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(f),[v,A]=(0,l.useState)(f?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&b&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;b(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:b,showExampleConfig:f=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),b&&b(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(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:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",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:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),b&&b(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),b&&b(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),f&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{})," # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),' "',e,'": "',l,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:b=[],onDisabledCallbacksChange:f})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:b,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,b]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[I,T]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;b({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else b({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&T(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:f.length>0?f:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,f.length>0?f:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,f]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:b,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:I})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),b=e.i(779241),f=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),I=e.i(898586),T=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:eb}=(0,n.default)(),ef=eb||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eI=(0,c.useQueryClient)(),[eT]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tb]=(0,E.useState)("30d"),[tf,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tI,tT]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eT)??[],tR=()=>{eE(!1),eT.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tb("30d"),tj(null),tT(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eT.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tb("30d"),tj(null),tT(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eT.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eT.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eT.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eT,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tf?.router_settings&&Object.values(tf.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tf.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eI.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eT.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eT.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eT.setFieldValue("models",[]),eT.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eT]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eT.setFieldsValue({models:e}),eW(null)},[eQ,eD,eT]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eT.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,T.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eT,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(f.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eT.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eT.setFieldValue("team_id",void 0),eT.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eT.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eT.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eT.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eT.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(f.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(b.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eT.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eT.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eT.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(f.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eT.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eT,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eT,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ef?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ef?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!ef,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:eb?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:eb?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:eb?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{accessToken:eh,placeholder:eb?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!eb,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eT.setFieldValue("allowed_vector_store_ids",e),value:eT.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eT.setFieldValue("allowed_mcp_servers_and_groups",e),value:eT.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eT.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eT.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eT.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eT.setFieldValue("allowed_agents_and_groups",e),value:eT.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),eb?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tf||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tI)})})]},`router-settings-accordion-${tI}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eT,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tb,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eT,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eT.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(f.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0kx52ovlpa34x.js b/litellm/proxy/_experimental/out/_next/static/chunks/0kx52ovlpa34x.js
new file mode 100644
index 00000000000..19919f968ea
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0kx52ovlpa34x.js
@@ -0,0 +1,7 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(281256).Row;e.s(["Row",0,t],621192)},263147,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(431703),o=e.i(708347),n=e.i(135214);let s=(0,r.createQueryKeys)("accessGroups"),i=async e=>{let t=(0,a.getProxyBaseUrl)(),r=`${t}/v1/access_group`,o=await fetch(r,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return o.json()};e.s(["accessGroupKeys",0,s,"useAccessGroups",0,()=>{let{accessToken:e,userRole:r}=(0,n.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>i(e),enabled:!!e&&o.all_admin_roles.includes(r||"")})}])},304911,e=>{"use strict";var t=e.i(843476),r=e.i(262218);let{Text:a}=e.i(898586).Typography;e.s(["default",0,function({userId:e}){return"default_user_id"===e?(0,t.jsx)(r.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(a,{children:e})}])},196361,e=>{e.q("/litellm-asset-prefix/_next/static/media/arize.2q0zcoh7v2j00.png")},614148,e=>{e.q("/litellm-asset-prefix/_next/static/media/aws.2vuu_29f0wx7g.svg")},858236,e=>{e.q("/litellm-asset-prefix/_next/static/media/braintrust.1qnhppdggfxdj.png")},508296,e=>{e.q("/litellm-asset-prefix/_next/static/media/datadog.20j6djly_hrsx.png")},324755,e=>{e.q("/litellm-asset-prefix/_next/static/media/galileo.1jnyj81fv75mp.ico")},475151,e=>{e.q("/litellm-asset-prefix/_next/static/media/lago.146vobxeazdxy.svg")},274286,e=>{e.q("/litellm-asset-prefix/_next/static/media/langfuse.1y39530irujaj.png")},436494,e=>{e.q("/litellm-asset-prefix/_next/static/media/langsmith.0cuekyutow5l_.png")},204086,e=>{e.q("/litellm-asset-prefix/_next/static/media/openmeter.1wzo3xv7qwtb8.png")},531150,e=>{e.q("/litellm-asset-prefix/_next/static/media/otel.1dei3v2u03nit.png")},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),l=e.i(673706),o=e.i(271645);let n=o.default.forwardRef((e,n)=>{let{color:s,children:i,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return o.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",s?(0,l.getColorClassNames)(s,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),i)});n.displayName="Title",e.s(["Title",0,n],629569)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),o=e.i(444755),n=e.i(673706);let s=(0,n.makeClassName)("Card"),i=r.default.forwardRef((e,i)=>{let{decoration:c="",decorationColor:d,children:u,className:p}=e,f=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,o.tremorTwMerge)(s("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,n.getColorClassNames)(d,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),p)},f),u)});i.displayName="Card",e.s(["Card",0,i],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),l=e.i(392221),o=e.i(703923),n=e.i(343794),s=e.i(914949),i=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,i.forwardRef)(function(e,d){var u=e.prefixCls,p=void 0===u?"rc-checkbox":u,f=e.className,m=e.style,v=e.checked,b=e.disabled,h=e.defaultChecked,g=e.type,x=void 0===g?"checkbox":g,y=e.title,C=e.onChange,S=(0,o.default)(e,c),k=(0,i.useRef)(null),w=(0,i.useRef)(null),E=(0,s.default)(void 0!==h&&h,{value:v}),_=(0,l.default)(E,2),N=_[0],$=_[1];(0,i.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=k.current)||t.focus(e)},blur:function(){var e;null==(e=k.current)||e.blur()},input:k.current,nativeElement:w.current}});var j=(0,n.default)(p,f,(0,a.default)((0,a.default)({},"".concat(p,"-checked"),N),"".concat(p,"-disabled"),b));return i.createElement("span",{className:j,title:y,style:m,ref:w},i.createElement("input",(0,t.default)({},S,{className:"".concat(p,"-input"),ref:k,onChange:function(t){b||("checked"in e||$(t.target.checked),null==C||C({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:b,checked:!!N,type:x})),i.createElement("span",{className:"".concat(p,"-inner")}))});e.s(["default",0,d],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=i.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),l=e.i(611935),o=e.i(121872),n=e.i(26905),s=e.i(242064),i=e.i(937328),c=e.i(321883),d=e.i(62139);let u=t.default.createContext(null);e.i(296059);var p=e.i(915654),f=e.i(183293),m=e.i(246422),v=e.i(838378);function b(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,f.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,p.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
+ ${r}:not(${r}-disabled),
+ ${t}:not(${t}-disabled)
+ `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
+ ${r}-checked:not(${r}-disabled),
+ ${t}-checked:not(${t}-disabled)
+ `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,v.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let h=(0,m.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[b(t,e)]);e.s(["default",0,h,"getStyle",0,b],236836);var g=e.i(681216),x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.forwardRef((e,p)=>{var f;let{prefixCls:m,className:v,rootClassName:b,children:y,indeterminate:C=!1,style:S,onMouseEnter:k,onMouseLeave:w,skipGroup:E=!1,disabled:_}=e,N=x(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:$,direction:j,checkbox:O}=t.useContext(s.ConfigContext),P=t.useContext(u),{isFormItemInput:R}=t.useContext(d.FormItemInputContext),M=t.useContext(i.default),T=null!=(f=(null==P?void 0:P.disabled)||_)?f:M,L=t.useRef(N.value),I=t.useRef(null),z=(0,l.composeRef)(p,I);t.useEffect(()=>{null==P||P.registerValue(N.value)},[]),t.useEffect(()=>{if(!E)return N.value!==L.current&&(null==P||P.cancelValue(L.current),null==P||P.registerValue(N.value),L.current=N.value),()=>null==P?void 0:P.cancelValue(N.value)},[N.value]),t.useEffect(()=>{var e;(null==(e=I.current)?void 0:e.input)&&(I.current.input.indeterminate=C)},[C]);let A=$("checkbox",m),D=(0,c.default)(A),[B,V,q]=h(A,D),G=Object.assign({},N);P&&!E&&(G.onChange=(...e)=>{N.onChange&&N.onChange.apply(N,e),P.toggleOption&&P.toggleOption({label:y,value:N.value})},G.name=P.name,G.checked=P.value.includes(N.value));let H=(0,r.default)(`${A}-wrapper`,{[`${A}-rtl`]:"rtl"===j,[`${A}-wrapper-checked`]:G.checked,[`${A}-wrapper-disabled`]:T,[`${A}-wrapper-in-form-item`]:R},null==O?void 0:O.className,v,b,q,D,V),W=(0,r.default)({[`${A}-indeterminate`]:C},n.TARGET_CLS,V),[K,F]=(0,g.default)(G.onClick);return B(t.createElement(o.default,{component:"Checkbox",disabled:T},t.createElement("label",{className:H,style:Object.assign(Object.assign({},null==O?void 0:O.style),S),onMouseEnter:k,onMouseLeave:w,onClick:K},t.createElement(a.default,Object.assign({},G,{onClick:F,prefixCls:A,className:W,disabled:T,ref:z})),null!=y&&t.createElement("span",{className:`${A}-label`},y))))});var C=e.i(8211),S=e.i(529681),k=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let w=t.forwardRef((e,a)=>{let{defaultValue:l,children:o,options:n=[],prefixCls:i,className:d,rootClassName:p,style:f,onChange:m}=e,v=k(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:b,direction:g}=t.useContext(s.ConfigContext),[x,w]=t.useState(v.value||l||[]),[E,_]=t.useState([]);t.useEffect(()=>{"value"in v&&w(v.value||[])},[v.value]);let N=t.useMemo(()=>n.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[n]),$=e=>{_(t=>t.filter(t=>t!==e))},j=e=>{_(t=>[].concat((0,C.default)(t),[e]))},O=e=>{let t=x.indexOf(e.value),r=(0,C.default)(x);-1===t?r.push(e.value):r.splice(t,1),"value"in v||w(r),null==m||m(r.filter(e=>E.includes(e)).sort((e,t)=>N.findIndex(t=>t.value===e)-N.findIndex(e=>e.value===t)))},P=b("checkbox",i),R=`${P}-group`,M=(0,c.default)(P),[T,L,I]=h(P,M),z=(0,S.default)(v,["value","disabled"]),A=n.length?N.map(e=>t.createElement(y,{prefixCls:P,key:e.value.toString(),disabled:"disabled"in e?e.disabled:v.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${R}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):o,D=t.useMemo(()=>({toggleOption:O,value:x,disabled:v.disabled,name:v.name,registerValue:j,cancelValue:$}),[O,x,v.disabled,v.name,j,$]),B=(0,r.default)(R,{[`${R}-rtl`]:"rtl"===g},d,p,I,M,L);return T(t.createElement("div",Object.assign({className:B,style:f},z,{ref:a}),t.createElement(u.Provider,{value:D},A)))});y.Group=w,y.__ANT_CHECKBOX=!0,e.s(["default",0,y],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["RobotOutlined",0,o],983561)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(779241),l=e.i(599724),o=e.i(199133),n=e.i(983561),s=e.i(343488),i=e.i(695411);e.s(["default",0,({accessToken:e,value:c,placeholder:d="Select a Model",onChange:u,disabled:p=!1,style:f,className:m,showLabel:v=!0,labelText:b="Select Model"})=>{let[h,g]=(0,r.useState)(c),[x,y]=(0,r.useState)(!1),[C,S]=(0,r.useState)([]);(0,r.useEffect)(()=>{g(c)},[c]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,i.fetchAvailableModels)(e);t.length>0&&S(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]);let k=(0,s.useDebouncedCallback)(e=>{g(e),u?.(e)},{wait:500});return(0,t.jsxs)("div",{children:[v&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(n.RobotOutlined,{className:"mr-2"})," ",b]}),(0,t.jsx)(o.Select,{value:h,placeholder:d,onChange:e=>{"custom"===e?(y(!0),g(void 0)):(y(!1),g(e),u&&u(e))},options:[...Array.from(new Set(C.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${m||""}`,disabled:p}),x&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:k,disabled:p})]})}])},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(602869);e.s(["default",0,({onChange:e,value:o,className:n,accessToken:s,placeholder:i="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){f(!0);try{let e=await (0,l.vectorStoreListCall)(s);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{f(!1)}}})()},[s]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:i,onChange:e,value:o,loading:p,className:n,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},435451,e=>{"use strict";var t=e.i(843476),r=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M12 4v16m8-8H4"}))},o=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M20 12H4"}))};var n=e.i(444755),s=e.i(673706),i=e.i(677955);let c="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",u=a.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:p=!0,disabled:f,onValueChange:m,onChange:v}=e,b=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),h=(0,a.useRef)(null),[g,x]=a.default.useState(!1),y=a.default.useCallback(()=>{x(!0)},[]),C=a.default.useCallback(()=>{x(!1)},[]),[S,k]=a.default.useState(!1),w=a.default.useCallback(()=>{k(!0)},[]),E=a.default.useCallback(()=>{k(!1)},[]);return a.default.createElement(i.default,Object.assign({type:"number",ref:(0,s.mergeRefs)([h,t]),disabled:f,makeInputClassName:(0,s.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=h.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&y(),"ArrowUp"===e.key&&w()},onKeyUp:e=>{"ArrowDown"===e.key&&C(),"ArrowUp"===e.key&&E()},onChange:e=>{f||(null==m||m(parseFloat(e.target.value)),null==v||v(e))},stepper:p?a.default.createElement("div",{className:(0,n.tremorTwMerge)("flex justify-center align-middle")},a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;f||(null==(e=h.current)||e.stepDown(),null==(t=h.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,n.tremorTwMerge)(!f&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(o,{"data-testid":"step-down",className:(g?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;f||(null==(e=h.current)||e.stepUp(),null==(t=h.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,n.tremorTwMerge)(!f&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(l,{"data-testid":"step-up",className:(S?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},b))});u.displayName="NumberInput",e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:a="Enter a numerical value",min:l,max:o,onChange:n,...s})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:a,min:l,max:o,onChange:n,...s})],435451)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:a}=r.Select;e.s(["default",0,({value:e,onChange:l,className:o="",style:n={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...n},value:e||void 0,onChange:l,className:o,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(a,{value:"1h",children:"hourly"}),(0,t.jsx)(a,{value:"24h",children:"daily"}),(0,t.jsx)(a,{value:"7d",children:"weekly"}),(0,t.jsx)(a,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["UserAddOutlined",0,o],213205)},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),l=e.i(602869),o=e.i(135214);let n=(0,a.createQueryKeys)("mcpAccessGroups");var s=e.i(500727),i=e.i(699857),c=e.i(199133),d=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:a,className:p,accessToken:f,placeholder:m="Select MCP servers",disabled:v=!1,teamId:b,allowNoMcpServers:h=!1,allowAllProxyMcpServers:g=!1})=>{let{data:x=[],isLoading:y}=(0,s.useMCPServers)(b),{data:C=[],isLoading:S}=(()=>{let{accessToken:e}=(0,o.default)();return(0,r.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:k=[],isLoading:w}=(0,i.useMCPToolsets)(),E=new Set(C),_=[...C.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...k.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},$={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},j=[...a?.servers||[],...a?.accessGroups||[],...(a?.toolsets||[]).map(e=>`${u}${e}`)],O=h&&j.includes(d.NO_MCP_SERVERS_SENTINEL),P=j.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(c.Select,{mode:"multiple",placeholder:m,onChange:t=>{if(g&&t.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[d.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(h&&t.includes(d.NO_MCP_SERVERS_SENTINEL))return void e({servers:[d.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),a=t.filter(e=>!e.startsWith(u));e({servers:a.filter(e=>!E.has(e)),accessGroups:a.filter(e=>E.has(e)),toolsets:r})},value:j,loading:y||S||w,className:p,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:v,filterOption:(e,t)=>t?.value===d.NO_MCP_SERVERS_SENTINEL||t?.value===d.ALL_PROXY_MCP_SERVERS_SENTINEL||(_.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(g||P)&&(0,t.jsx)(c.Select.Option,{value:d.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},d.ALL_PROXY_MCP_SERVERS_SENTINEL),h&&(0,t.jsx)(c.Select.Option,{value:d.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},d.NO_MCP_SERVERS_SENTINEL),_.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,disabled:O||P,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:$[e.type]})]})},e.value))]})})}],75921)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0lf6n96uy4q27.js b/litellm/proxy/_experimental/out/_next/static/chunks/0lf6n96uy4q27.js
new file mode 100644
index 00000000000..cce9b52aabd
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0lf6n96uy4q27.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,390605,e=>{"use strict";var s=e.i(843476),t=e.i(271645),l=e.i(602869),a=e.i(599724),r=e.i(482725),i=e.i(91739),n=e.i(500727),d=e.i(531516),o=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:m,onChange:u,disabled:x=!1})=>{let{data:h=[]}=(0,n.useMCPServers)(),[p,f]=(0,t.useState)({}),[g,j]=(0,t.useState)({}),[v,b]=(0,t.useState)({}),[y,N]=(0,t.useState)({}),_=(0,t.useRef)(m);(0,t.useEffect)(()=>{_.current=m},[m]);let w=(0,t.useMemo)(()=>0===c.length?[]:h.filter(e=>c.includes(e.server_id)),[h,c]),S=async(e,s)=>{j(s=>({...s,[e]:!0})),b(s=>({...s,[e]:""}));try{let t=await (0,l.listMCPTools)(s,e);if(t.error)b(s=>({...s,[e]:t.message||"Failed to fetch tools"})),f(s=>({...s,[e]:[]}));else{let s=t.tools||[];f(t=>({...t,[e]:s}));let l=_.current;if(!l[e]&&s.length>0){let t=s.filter(e=>"delete"!==(0,o.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);u({...l,[e]:t})}}}catch(s){console.error(`Error fetching tools for server ${e}:`,s),b(s=>({...s,[e]:"Failed to fetch tools"})),f(s=>({...s,[e]:[]}))}finally{j(s=>({...s,[e]:!1}))}};(0,t.useEffect)(()=>{w.forEach(s=>{p[s.server_id]||g[s.server_id]||S(s.server_id,e)})},[w,e]);let C=(e,s)=>{u({...m,[e]:s})};return 0===c.length?null:(0,s.jsx)("div",{className:"space-y-4",children:w.map(e=>{let t=e.server_name||e.alias||e.server_id,l=p[e.server_id]||[],n=m[e.server_id]||[],o=g[e.server_id],c=v[e.server_id],h=y[e.server_id]??"crud";return(0,s.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(a.Text,{className:"font-semibold text-gray-900",children:t}),e.description&&(0,s.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[!x&&l.length>0&&(0,s.jsx)(i.Radio.Group,{value:h,onChange:s=>N(t=>({...t,[e.server_id]:s.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!x&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var s;let t;return t=p[s=e.server_id]||[],void u({...m,[s]:t.map(e=>e.name)})},disabled:o,children:"Select All"}),(0,s.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var s;return s=e.server_id,void u({...m,[s]:[]})},disabled:o,children:"Deselect All"})]})]})]}),(0,s.jsxs)("div",{className:"p-4",children:[o&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,s.jsx)(r.Spin,{size:"large"}),(0,s.jsx)(a.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!o&&(0,s.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,s.jsx)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,s.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!o&&!c&&l.length>0&&"crud"===h&&(0,s.jsx)(d.default,{tools:l,value:m[e.server_id]?n:void 0,onChange:s=>C(e.server_id,s),readOnly:x}),!o&&!c&&l.length>0&&"flat"===h&&(0,s.jsx)("div",{className:"space-y-2",children:l.map(t=>{let l=n.includes(t.name);return(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(x)return;let s=l?n.filter(e=>e!==t.name):[...n,t.name];C(e.server_id,s)},disabled:x,className:"mt-0.5"}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(a.Text,{className:"font-medium text-gray-900",children:t.name}),(0,s.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",t.description||"No description"]})]})})]},t.name)})}),!o&&!c&&0===l.length&&(0,s.jsx)("div",{className:"text-center py-6",children:(0,s.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},371455,172372,e=>{"use strict";var s=e.i(843476),t=e.i(827252),l=e.i(213205),a=e.i(912598),r=e.i(109799),i=e.i(677667),n=e.i(130643),d=e.i(898667),o=e.i(35983),c=e.i(779241),m=e.i(560445),u=e.i(464571),x=e.i(536916),h=e.i(808613),p=e.i(311451),f=e.i(212931),g=e.i(199133),j=e.i(770914),v=e.i(592968),b=e.i(898586),y=e.i(271645),N=e.i(599724),_=e.i(291542),w=e.i(515831),S=e.i(519756),C=e.i(737434),k=e.i(285027),T=e.i(993914),I=e.i(955135);e.i(247167);var U=e.i(931067);let V={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"};var F=e.i(9583),B=y.forwardRef(function(e,s){return y.createElement(F.default,(0,U.default)({},e,{ref:s,icon:V}))}),O=e.i(602869),L=e.i(59935),P=e.i(220508);let M=y.forwardRef(function(e,s){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}),z=y.forwardRef(function(e,s){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});var E=e.i(237016),R=e.i(727749);let A=({accessToken:e,teams:t,possibleUIRoles:l,onUsersCreated:a})=>{let[r,i]=(0,y.useState)(!1),[n,d]=(0,y.useState)([]),[o,c]=(0,y.useState)(!1),[m,x]=(0,y.useState)(null),[h,p]=(0,y.useState)(null),[g,j]=(0,y.useState)(null),[v,U]=(0,y.useState)(null),[V,F]=(0,y.useState)(null),[A,D]=(0,y.useState)("http://localhost:4000");(0,y.useEffect)(()=>{(async()=>{try{let s=await (0,O.getProxyUISettings)(e);F(s)}catch(e){console.error("Error fetching UI settings:",e)}})(),D(new URL("/",window.location.href).toString())},[e]);let $=async()=>{c(!0);let s=n.map(e=>({...e,status:"pending"}));d(s);let t=!1;for(let l=0;le.trim()).filter(Boolean),0===s.teams.length&&delete s.teams),a.models&&"string"==typeof a.models&&""!==a.models.trim()&&(s.models=a.models.split(",").map(e=>e.trim()).filter(Boolean),0===s.models.length&&delete s.models),a.max_budget&&""!==a.max_budget.toString().trim()){let e=parseFloat(a.max_budget.toString());!isNaN(e)&&e>0&&(s.max_budget=e)}a.budget_duration&&""!==a.budget_duration.trim()&&(s.budget_duration=a.budget_duration.trim()),a.metadata&&"string"==typeof a.metadata&&""!==a.metadata.trim()&&(s.metadata=a.metadata.trim());let r=await (0,O.userCreateCall)(e,null,s);if(r&&(r.key||r.user_id)){t=!0;let s=r.data?.user_id||r.user_id;try{if(V?.SSO_ENABLED){let e=new URL("/ui",A).toString();d(s=>s.map((s,t)=>t===l?{...s,status:"success",key:r.key||r.user_id,invitation_link:e}:s))}else{let t=await (0,O.invitationCreateCall)(e,s),a=new URL(`/ui/onboarding?invitation_id=${t.id}`,A).toString();d(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,invitation_link:a}:e))}}catch(e){console.error("Error creating invitation:",e),d(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,error:"User created but failed to generate invitation link"}:e))}}else{let e=r?.error||"Failed to create user";d(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}catch(s){console.error("Caught error:",s);let e=s?.response?.data?.error||s?.message||String(s);d(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}c(!1),t&&a&&a()},q=[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,t)=>t.isValid?t.status&&"pending"!==t.status?"success"===t.status?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(P.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}),(0,s.jsx)("span",{className:"text-green-500",children:"Success"})]}),t.invitation_link&&(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:t.invitation_link}),(0,s.jsx)(E.CopyToClipboard,{text:t.invitation_link,onCopy:()=>R.default.success("Invitation link copied!"),children:(0,s.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(M,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Failed"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(t.error)})]}):(0,s.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(M,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:t.error})]})}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Button,{type:"primary",className:"mb-0",onClick:()=>i(!0),children:"+ Bulk Invite Users"}),(0,s.jsx)(f.Modal,{title:"Bulk Invite Users",open:r,width:800,onCancel:()=>i(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,s.jsx)("div",{className:"flex flex-col",children:0===n.length?(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,s.jsxs)("div",{className:"ml-11 mb-6",children:[(0,s.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,s.jsx)("li",{children:"Download our CSV template"}),(0,s.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,s.jsx)("li",{children:"Save the file and upload it here"}),(0,s.jsx)("li",{children:"After creation, download the results file containing the Virtual Keys for each user"})]}),(0,s.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,s.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_email"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_role"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer") '})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"teams"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"models"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,s.jsx)(u.Button,{type:"primary",size:"large",className:"w-full md:w-auto",icon:(0,s.jsx)(C.DownloadOutlined,{}),children:"Download CSV Template"})]}),(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,s.jsxs)("div",{className:"ml-11",children:[v?(0,s.jsxs)("div",{className:`mb-4 p-4 rounded-md border ${g?"bg-red-50 border-red-200":"bg-blue-50 border-blue-200"}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[g?(0,s.jsx)(B,{className:"text-red-500 text-xl mr-3"}):(0,s.jsx)(T.FileTextOutlined,{className:"text-blue-500 text-xl mr-3"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(b.Typography.Text,{strong:!0,className:g?"text-red-800":"text-blue-800",children:v.name}),(0,s.jsxs)(b.Typography.Text,{className:`block text-xs ${g?"text-red-600":"text-blue-600"}`,children:[(v.size/1024).toFixed(1)," KB • ",new Date().toLocaleDateString()]})]})]}),(0,s.jsx)(u.Button,{size:"small",onClick:()=>{U(null),d([]),x(null),p(null),j(null)},className:"flex items-center",icon:(0,s.jsx)(I.DeleteOutlined,{}),children:"Remove"})]}),g?(0,s.jsxs)("div",{className:"mt-3 text-red-600 text-sm flex items-start",children:[(0,s.jsx)(k.WarningOutlined,{className:"mr-2 mt-0.5"}),(0,s.jsx)("span",{children:g})]}):!h&&(0,s.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,s.jsx)("div",{className:"bg-blue-500 h-1.5 rounded-full w-full animate-pulse"})}),(0,s.jsx)("span",{className:"ml-2 text-xs text-blue-600",children:"Processing..."})]})]}):(0,s.jsx)(w.Upload,{beforeUpload:e=>((x(null),p(null),j(null),U(e),"text/csv"===e.type||e.name.endsWith(".csv"))?e.size>5242880?j(`File is too large (${(e.size/1048576).toFixed(1)} MB). Please upload a CSV file smaller than 5MB.`):L.default.parse(e,{complete:e=>{if(!e.data||0===e.data.length){p("The CSV file appears to be empty. Please upload a file with data."),d([]);return}if(1===e.data.length){p("The CSV file only contains headers but no user data. Please add user data to your CSV."),d([]);return}let s=e.data[0];if(0===s.length||1===s.length&&""===s[0]){p("The CSV file doesn't contain any column headers. Please make sure your CSV has headers."),d([]);return}let l=["user_email","user_role"].filter(e=>!s.includes(e));if(l.length>0){p(`Your CSV is missing these required columns: ${l.join(", ")}. Please add these columns to your CSV file.`),d([]);return}try{let l=e.data.slice(1).map((e,l)=>{if(0===e.length||1===e.length&&""===e[0])return null;if(e.length=parseFloat(a.max_budget.toString())&&r.push("Max budget must be greater than 0")),a.budget_duration&&!a.budget_duration.match(/^\d+[dhmwy]$|^\d+mo$/)&&r.push(`Invalid budget duration format "${a.budget_duration}". Use format like "30d", "1mo", "2w", "6h"`),a.teams&&"string"==typeof a.teams&&t&&t.length>0){let e=t.map(e=>e.team_id),s=a.teams.split(",").map(e=>e.trim()).filter(s=>!e.includes(s));s.length>0&&r.push(`Unknown team(s): ${s.join(", ")}`)}return r.length>0&&(a.isValid=!1,a.error=r.join(", ")),a}).filter(Boolean),a=l.filter(e=>e.isValid);d(l),0===l.length?p("No valid data rows found in the CSV file. Please check your file format."):0===a.length?x("No valid users found in the CSV. Please check the errors below and fix your CSV file."):a.length{x(`Failed to parse CSV file: ${e.message}`),d([])},header:!1}):(j(`Invalid file type: ${e.name}. Please upload a CSV file (.csv extension).`),R.default.fromBackend("Invalid file type. Please upload a CSV file.")),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,s.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,s.jsx)(S.UploadOutlined,{className:"text-3xl text-gray-400 mb-2"}),(0,s.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,s.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,s.jsx)(u.Button,{size:"small",children:"Browse files"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-4",children:"Only CSV files (.csv) are supported"})]})}),h&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(z,{className:"h-5 w-5 text-yellow-500 mr-2 mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(b.Typography.Text,{strong:!0,className:"text-yellow-800",children:"CSV Structure Error"}),(0,s.jsx)(b.Typography.Paragraph,{className:"text-yellow-700 mt-1 mb-0",children:h}),(0,s.jsx)(b.Typography.Paragraph,{className:"text-yellow-700 mt-2 mb-0",children:"Please download our template and ensure your CSV follows the required format."})]})]})})]})]}):(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:n.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),m&&(0,s.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(k.WarningOutlined,{className:"text-red-500 mr-2 mt-1"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(N.Text,{className:"text-red-600 font-medium",children:m}),n.some(e=>!e.isValid)&&(0,s.jsxs)("ul",{className:"mt-2 list-disc list-inside text-red-600 text-sm",children:[(0,s.jsx)("li",{children:"Check the table below for specific errors in each row"}),(0,s.jsx)("li",{children:"Common issues include invalid email formats, missing required fields, or incorrect role values"}),(0,s.jsx)("li",{children:"Fix these issues in your CSV file and upload again"})]})]})]})}),(0,s.jsxs)("div",{className:"ml-11",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,s.jsx)("div",{className:"flex items-center",children:n.some(e=>"success"===e.status||"failed"===e.status)?(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(N.Text,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,s.jsxs)(N.Text,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded-sm mr-2",children:[n.filter(e=>"success"===e.status).length," Successful"]}),n.some(e=>"failed"===e.status)&&(0,s.jsxs)(N.Text,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded-sm",children:[n.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(N.Text,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,s.jsxs)(N.Text,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded-sm",children:[n.filter(e=>e.isValid).length," of ",n.length," users valid"]})]})}),!n.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex space-x-3",children:[(0,s.jsx)(u.Button,{onClick:()=>{d([]),x(null)},children:"Back"}),(0,s.jsx)(u.Button,{type:"primary",onClick:$,disabled:0===n.filter(e=>e.isValid).length||o,children:o?"Creating...":`Create ${n.filter(e=>e.isValid).length} Users`})]})]}),n.some(e=>"success"===e.status)&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"mr-3 mt-1",children:(0,s.jsx)(P.CheckCircleIcon,{className:"h-5 w-5 text-blue-500"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(N.Text,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,s.jsxs)(N.Text,{className:"block text-sm text-blue-700 mt-1",children:[(0,s.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing Virtual Keys and invitation links. Users will need these Virtual Keys to make LLM requests through LiteLLM."]})]})]})}),(0,s.jsx)(_.Table,{dataSource:n,columns:q,size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!n.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(u.Button,{onClick:()=>{d([]),x(null)},className:"mr-3",children:"Back"}),(0,s.jsx)(u.Button,{type:"primary",onClick:$,disabled:0===n.filter(e=>e.isValid).length||o,children:o?"Creating...":`Create ${n.filter(e=>e.isValid).length} Users`})]}),n.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(u.Button,{onClick:()=>{d([]),x(null)},className:"mr-3",children:"Start New Bulk Import"}),(0,s.jsx)(u.Button,{type:"primary",onClick:()=>{let e=n.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),s=new Blob([L.default.unparse(e)],{type:"text/csv"}),t=window.URL.createObjectURL(s),l=document.createElement("a");l.href=t,l.download="bulk_users_results.csv",document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(t)},icon:(0,s.jsx)(C.DownloadOutlined,{}),children:"Download User Credentials"})]})]})]})})})]})};var D=e.i(663435),$=e.i(355619);function q({isInvitationLinkModalVisible:e,setIsInvitationLinkModalVisible:t,baseUrl:l,invitationLinkData:a,modalType:r="invitation"}){let{Title:i,Paragraph:n}=b.Typography,d=()=>(function({baseUrl:e,invitationId:s,hasUserSetupSso:t,resetPassword:l}){if(!e)return"";let a=new URL(e).pathname,r=a&&"/"!==a?`${a}/ui`:"ui";return t?new URL(r,e).toString():s?new URL(`${r}/onboarding?invitation_id=${s}${l?"&action=reset_password":""}`,e).toString():""})({baseUrl:l,invitationId:a?.id,hasUserSetupSso:a?.has_user_setup_sso??!1,resetPassword:"resetPassword"===r});return(0,s.jsxs)(f.Modal,{title:"invitation"===r?"Invitation Link":"Reset Password Link",open:e,width:800,footer:null,onOk:()=>{t(!1)},onCancel:()=>{t(!1)},children:[(0,s.jsx)(n,{children:"invitation"===r?"Copy and send the generated link to onboard this user to the proxy.":"Copy and send the generated link to the user to reset their password."}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(N.Text,{className:"text-base",children:"User ID"}),(0,s.jsx)(N.Text,{children:a?.user_id})]}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(N.Text,{children:"invitation"===r?"Invitation Link":"Reset Password Link"}),(0,s.jsx)(N.Text,{children:(0,s.jsx)(N.Text,{children:d()})})]}),(0,s.jsx)("div",{className:"flex justify-end mt-5",children:(0,s.jsx)(E.CopyToClipboard,{text:d(),onCopy:()=>R.default.success("Copied!"),children:(0,s.jsx)(u.Button,{type:"primary",children:"invitation"===r?"Copy invitation link":"Copy password reset link"})})})]})}e.s(["default",0,q],172372);let{Option:K}=g.Select,{Text:G,Link:H,Title:W}=b.Typography;e.s(["CreateUserButton",0,({userID:e,accessToken:b,teams:N,possibleUIRoles:_,onUserCreated:w,isEmbedded:S=!1})=>{let C=(0,a.useQueryClient)(),[k,T]=(0,y.useState)(null),[I]=h.Form.useForm(),[U,V]=(0,y.useState)(!1),[F,B]=(0,y.useState)(!1),[L,P]=(0,y.useState)([]),[M,z]=(0,y.useState)(!1),[E,W]=(0,y.useState)(null),[J,Q]=(0,y.useState)(null),{data:Y=[]}=(0,r.useOrganizations)();(0,y.useMemo)(()=>{let e=Y.flatMap(e=>e.teams||[]);return e.length>0?e:N||[]},[Y,N]),(0,y.useEffect)(()=>{let s=async()=>{try{let s=await (0,O.modelAvailableCall)(b,e,"any"),t=[];for(let e=0;e{try{R.default.info("Making API Call"),S||V(!0),s.models&&0!==s.models.length||"proxy_admin"===s.user_role||(s.models=["no-default-models"]),s.organization_ids&&(s.organizations=s.organization_ids,delete s.organization_ids);let t=await (0,O.userCreateCall)(b,null,s);await C.invalidateQueries({queryKey:["userList"]}),B(!0);let l=t.data?.user_id||t.user_id;if(w&&S){w(l),I.resetFields();return}if(k?.SSO_ENABLED){let s={id:"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let s=16*Math.random()|0;return("x"==e?s:3&s|8).toString(16)}),user_id:l,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:e,updated_at:new Date,updated_by:e,has_user_setup_sso:!0};W(s),z(!0)}else(0,O.invitationCreateCall)(b,l).then(e=>{e.has_user_setup_sso=!1,W(e),z(!0)});R.default.success("API user Created"),I.resetFields(),localStorage.removeItem("userData"+e)}catch(s){let e=s.response?.data?.detail||s?.message||"Error creating the user";R.default.fromBackend(e),console.error("Error creating the user:",s)}};return S?(0,s.jsxs)(h.Form,{form:I,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer",send_invite_email:!0},children:[(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(H,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,s.jsx)(h.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(c.TextInput,{placeholder:""})}),(0,s.jsx)(h.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(g.Select,{children:_&&Object.entries(_).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(o.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)(G,{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(h.Form.Item,{label:"Team",name:"team_id",children:(0,s.jsx)(D.default,{})}),(0,s.jsx)(h.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(p.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsx)(h.Form.Item,{label:"Send invitation email",name:"send_invite_email",valuePropName:"checked",children:(0,s.jsx)(x.Checkbox,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{htmlType:"submit",children:"Create User"})})]}):(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.Button,{type:"primary",className:"mb-0",onClick:()=>V(!0),children:"+ Invite User"}),(0,s.jsx)(A,{accessToken:b,teams:N,possibleUIRoles:_}),(0,s.jsxs)(f.Modal,{title:"Invite User",open:U,width:800,footer:null,onOk:()=>{V(!1),I.resetFields()},onCancel:()=>{V(!1),B(!1),I.resetFields()},children:[(0,s.jsxs)(j.Space,{direction:"vertical",size:"middle",children:[(0,s.jsx)(G,{className:"mb-1",children:"Create a User who can own keys"}),(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(H,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"})]}),(0,s.jsxs)(h.Form,{form:I,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer",send_invite_email:!0},children:[(0,s.jsx)(h.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(p.Input,{})}),(0,s.jsx)(h.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(v.Tooltip,{title:"This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings",children:(0,s.jsx)(t.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(g.Select,{children:_&&Object.entries(_).map(([e,{ui_label:t,description:l}])=>(0,s.jsxs)(o.SelectItem,{value:e,title:t,children:[(0,s.jsx)(G,{children:t}),(0,s.jsxs)(G,{type:"secondary",children:[" - ",l]})]},e))})}),(0,s.jsx)(h.Form.Item,{label:"Team",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,s.jsx)(D.default,{})}),(0,s.jsx)(h.Form.Item,{label:"Organization",name:"organization_ids",help:"The user will be added to the selected organization(s).",children:(0,s.jsx)(g.Select,{mode:"multiple",placeholder:"Select Organization",style:{width:"100%"},children:Y.map(e=>(0,s.jsxs)(K,{value:e.organization_id,children:[e.organization_alias," (",e.organization_id,")"]},e.organization_id))})}),(0,s.jsx)(h.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(p.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsx)(h.Form.Item,{label:"Send invitation email",name:"send_invite_email",valuePropName:"checked",children:(0,s.jsx)(x.Checkbox,{})}),(0,s.jsxs)(i.Accordion,{children:[(0,s.jsx)(d.AccordionHeader,{children:(0,s.jsx)(G,{strong:!0,children:"Personal Key Creation"})}),(0,s.jsx)(n.AccordionBody,{children:(0,s.jsx)(h.Form.Item,{className:"gap-2",label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(v.Tooltip,{title:"Models user has access to, outside of team scope.",children:(0,s.jsx)(t.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,s.jsxs)(g.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,s.jsx)(g.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(g.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),L.map(e=>(0,s.jsx)(g.Select.Option,{value:e,children:(0,$.getModelDisplayName)(e)},e))]})})})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{type:"primary",icon:(0,s.jsx)(l.UserAddOutlined,{}),htmlType:"submit",children:"Invite User"})})]})]}),F&&(0,s.jsx)(q,{isInvitationLinkModalVisible:M,setIsInvitationLinkModalVisible:z,baseUrl:J||"",invitationLinkData:E})]})}],371455)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0m-x8i06te864.js b/litellm/proxy/_experimental/out/_next/static/chunks/0m-x8i06te864.js
deleted file mode 100644
index 9582f85058e..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0m-x8i06te864.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196361,e=>{e.q("/litellm-asset-prefix/_next/static/media/arize.2q0zcoh7v2j00.png")},614148,e=>{e.q("/litellm-asset-prefix/_next/static/media/aws.2vuu_29f0wx7g.svg")},858236,e=>{e.q("/litellm-asset-prefix/_next/static/media/braintrust.1qnhppdggfxdj.png")},508296,e=>{e.q("/litellm-asset-prefix/_next/static/media/datadog.20j6djly_hrsx.png")},324755,e=>{e.q("/litellm-asset-prefix/_next/static/media/galileo.1jnyj81fv75mp.ico")},475151,e=>{e.q("/litellm-asset-prefix/_next/static/media/lago.146vobxeazdxy.svg")},274286,e=>{e.q("/litellm-asset-prefix/_next/static/media/langfuse.1y39530irujaj.png")},436494,e=>{e.q("/litellm-asset-prefix/_next/static/media/langsmith.0cuekyutow5l_.png")},204086,e=>{e.q("/litellm-asset-prefix/_next/static/media/openmeter.1wzo3xv7qwtb8.png")},531150,e=>{e.q("/litellm-asset-prefix/_next/static/media/otel.1dei3v2u03nit.png")},244451,e=>{"use strict";let t;e.i(247167);var r=e.i(271645),l=e.i(343794),a=e.i(242064),s=e.i(763731),i=e.i(174428);let o=80*Math.PI,n=e=>{let{dotClassName:t,style:a,hasCircleCls:s}=e;return r.createElement("circle",{className:(0,l.default)(`${t}-circle`,{[`${t}-circle-bg`]:s}),r:40,cx:50,cy:50,strokeWidth:20,style:a})},c=({percent:e,prefixCls:t})=>{let a=`${t}-dot`,s=`${a}-holder`,c=`${s}-hidden`,[d,u]=r.useState(!1);(0,i.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!d)return null;let p={strokeDashoffset:`${o/4}`,strokeDasharray:`${o*m/100} ${o*(100-m)/100}`};return r.createElement("span",{className:(0,l.default)(s,`${a}-progress`,m<=0&&c)},r.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},r.createElement(n,{dotClassName:a,hasCircleCls:!0}),r.createElement(n,{dotClassName:a,style:p})))};function d(e){let{prefixCls:t,percent:a=0}=e,s=`${t}-dot`,i=`${s}-holder`,o=`${i}-hidden`;return r.createElement(r.Fragment,null,r.createElement("span",{className:(0,l.default)(i,a>0&&o)},r.createElement("span",{className:(0,l.default)(s,`${t}-dot-spin`)},[1,2,3,4].map(e=>r.createElement("i",{className:`${t}-dot-item`,key:e})))),r.createElement(c,{prefixCls:t,percent:a}))}function u(e){var t;let{prefixCls:a,indicator:i,percent:o}=e,n=`${a}-dot`;return i&&r.isValidElement(i)?(0,s.cloneElement)(i,{className:(0,l.default)(null==(t=i.props)?void 0:t.className,n),percent:o}):r.createElement(d,{prefixCls:a,percent:o})}e.i(296059);var m=e.i(694758),p=e.i(183293),g=e.i(246422),h=e.i(838378);let f=new m.Keyframes("antSpinMove",{to:{opacity:1}}),v=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(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 ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${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 ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:f,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:v,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,h.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:r}}),b=[[30,.05],[70,.03],[96,.01]];var x=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]]);return r};let S=e=>{var s;let{prefixCls:i,spinning:o=!0,delay:n=0,className:c,rootClassName:d,size:m="default",tip:p,wrapperClassName:g,style:h,children:f,fullscreen:v=!1,indicator:S,percent:w}=e,E=x(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:C,direction:k,className:N,style:_,indicator:$}=(0,a.useComponentConfig)("spin"),j=C("spin",i),[M,L,T]=y(j),[z,R]=r.useState(()=>o&&(!o||!n||!!Number.isNaN(Number(n)))),I=function(e,t){let[l,a]=r.useState(0),s=r.useRef(null),i="auto"===t;return r.useEffect(()=>(i&&e&&(a(0),s.current=setInterval(()=>{a(e=>{let t=100-e;for(let r=0;r{s.current&&(clearInterval(s.current),s.current=null)}),[i,e]),i?l:t}(z,w);r.useEffect(()=>{if(o){let e=function(e,t,r){var l,a=r||{},s=a.noTrailing,i=void 0!==s&&s,o=a.noLeading,n=void 0!==o&&o,c=a.debounceMode,d=void 0===c?void 0:c,u=!1,m=0;function p(){l&&clearTimeout(l)}function g(){for(var r=arguments.length,a=Array(r),s=0;se?n?(m=Date.now(),i||(l=setTimeout(d?h:g,e))):g():!0!==i&&(l=setTimeout(d?h:g,void 0===d?e-c:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},g}(n,()=>{R(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}R(!1)},[n,o]);let O=r.useMemo(()=>void 0!==f&&!v,[f,v]),P=(0,l.default)(j,N,{[`${j}-sm`]:"small"===m,[`${j}-lg`]:"large"===m,[`${j}-spinning`]:z,[`${j}-show-text`]:!!p,[`${j}-rtl`]:"rtl"===k},c,!v&&d,L,T),D=(0,l.default)(`${j}-container`,{[`${j}-blur`]:z}),q=null!=(s=null!=S?S:$)?s:t,A=Object.assign(Object.assign({},_),h),G=r.createElement("div",Object.assign({},E,{style:A,className:P,"aria-live":"polite","aria-busy":z}),r.createElement(u,{prefixCls:j,indicator:q,percent:I}),p&&(O||v)?r.createElement("div",{className:`${j}-text`},p):null);return M(O?r.createElement("div",Object.assign({},E,{className:(0,l.default)(`${j}-nested-loading`,g,L,T)}),z&&r.createElement("div",{key:"loading"},G),r.createElement("div",{className:D,key:"container"},f)):v?r.createElement("div",{className:(0,l.default)(`${j}-fullscreen`,{[`${j}-fullscreen-show`]:z},d,L,T)},G):G)};S.setDefaultIndicator=e=>{t=e},e.s(["default",0,S],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},435451,e=>{"use strict";var t=e.i(843476),r=e.i(290571),l=e.i(271645);let a=e=>{var t=(0,r.__rest)(e,[]);return l.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),l.default.createElement("path",{d:"M12 4v16m8-8H4"}))},s=e=>{var t=(0,r.__rest)(e,[]);return l.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),l.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),o=e.i(673706),n=e.i(677955);let c="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",u=l.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,f=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),v=(0,l.useRef)(null),[y,b]=l.default.useState(!1),x=l.default.useCallback(()=>{b(!0)},[]),S=l.default.useCallback(()=>{b(!1)},[]),[w,E]=l.default.useState(!1),C=l.default.useCallback(()=>{E(!0)},[]),k=l.default.useCallback(()=>{E(!1)},[]);return l.default.createElement(n.default,Object.assign({type:"number",ref:(0,o.mergeRefs)([v,t]),disabled:p,makeInputClassName:(0,o.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=v.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&x(),"ArrowUp"===e.key&&C()},onKeyUp:e=>{"ArrowDown"===e.key&&S(),"ArrowUp"===e.key&&k()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?l.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},l.default.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)||e.stepDown(),null==(t=v.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},l.default.createElement(s,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),l.default.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)||e.stepUp(),null==(t=v.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},l.default.createElement(a,{"data-testid":"step-up",className:(w?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},f))});u.displayName="NumberInput",e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:l="Enter a numerical value",min:a,max:s,onChange:i,...o})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:l,min:a,max:s,onChange:i,...o})],435451)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:l}=r.Select;e.s(["default",0,({value:e,onChange:a,className:s="",style:i={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...i},value:e||void 0,onChange:a,className:s,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(l,{value:"1h",children:"hourly"}),(0,t.jsx)(l,{value:"24h",children:"daily"}),(0,t.jsx)(l,{value:"7d",children:"weekly"}),(0,t.jsx)(l,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["UserAddOutlined",0,s],213205)},500727,e=>{"use strict";var t=e.i(266027),r=e.i(243652),l=e.i(602869),a=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,a.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,l.fetchMCPServers)(r,e),enabled:!!r})}])},699857,e=>{"use strict";var t=e.i(266027),r=e.i(243652),l=e.i(602869),a=e.i(135214);let s=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,a.default)();return(0,t.useQuery)({queryKey:s.list(),queryFn:async()=>await (0,l.fetchMCPToolsets)(e),enabled:!!e})}])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(199133),a=e.i(602869);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:o,placeholder:n="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){p(!0);try{let e=await (0,a.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(l.Select,{mode:"multiple",placeholder:n,onChange:e,value:s,loading:m,className:i,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var o=e.i(500727),n=e.i(699857),c=e.i(199133),d=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:l,className:m,accessToken:p,placeholder:g="Select MCP servers",disabled:h=!1,teamId:f,allowNoMcpServers:v=!1,allowAllProxyMcpServers:y=!1})=>{let{data:b=[],isLoading:x}=(0,o.useMCPServers)(f),{data:S=[],isLoading:w}=(()=>{let{accessToken:e}=(0,s.default)();return(0,r.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:E=[],isLoading:C}=(0,n.useMCPToolsets)(),k=new Set(S),N=[...S.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...b.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...E.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],_={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},$={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},j=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${u}${e}`)],M=v&&j.includes(d.NO_MCP_SERVERS_SENTINEL),L=j.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(c.Select,{mode:"multiple",placeholder:g,onChange:t=>{if(y&&t.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[d.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(v&&t.includes(d.NO_MCP_SERVERS_SENTINEL))return void e({servers:[d.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),l=t.filter(e=>!e.startsWith(u));e({servers:l.filter(e=>!k.has(e)),accessGroups:l.filter(e=>k.has(e)),toolsets:r})},value:j,loading:x||w||C,className:m,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:h,filterOption:(e,t)=>t?.value===d.NO_MCP_SERVERS_SENTINEL||t?.value===d.ALL_PROXY_MCP_SERVERS_SENTINEL||(N.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(y||L)&&(0,t.jsx)(c.Select.Option,{value:d.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},d.ALL_PROXY_MCP_SERVERS_SENTINEL),v&&(0,t.jsx)(c.Select.Option,{value:d.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},d.NO_MCP_SERVERS_SENTINEL),N.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,disabled:M||L,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:_[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:_[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:$[e.type]})]})},e.value))]})})}],75921)},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),l=e.i(673706),a=e.i(271645);let s={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"},i={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"},o={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"},n={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,s,"gridColsLg",0,n,"gridColsMd",0,o,"gridColsSm",0,i],46757);let c=(0,l.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=a.default.forwardRef((e,l)=>{let{numItems:u=1,numItemsSm:m,numItemsMd:p,numItemsLg:g,children:h,className:f}=e,v=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),y=d(u,s),b=d(m,i),x=d(p,o),S=d(g,n),w=(0,r.tremorTwMerge)(y,b,x,S);return a.default.createElement("div",Object.assign({ref:l,className:(0,r.tremorTwMerge)(c("root"),"grid",w,f)},v),h)});u.displayName="Grid",e.s(["Grid",0,u],350967)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["UploadOutlined",0,s],519756)},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},695411,e=>{"use strict";var t=e.i(602869);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["RobotOutlined",0,s],983561)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(779241),a=e.i(599724),s=e.i(199133),i=e.i(983561),o=e.i(343488),n=e.i(695411);e.s(["default",0,({accessToken:e,value:c,placeholder:d="Select a Model",onChange:u,disabled:m=!1,style:p,className:g,showLabel:h=!0,labelText:f="Select Model"})=>{let[v,y]=(0,r.useState)(c),[b,x]=(0,r.useState)(!1),[S,w]=(0,r.useState)([]);(0,r.useEffect)(()=>{y(c)},[c]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);t.length>0&&w(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]);let E=(0,o.useDebouncedCallback)(e=>{y(e),u?.(e)},{wait:500});return(0,t.jsxs)("div",{children:[h&&(0,t.jsxs)(a.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",f]}),(0,t.jsx)(s.Select,{value:v,placeholder:d,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),u&&u(e))},options:[...Array.from(new Set(S.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...p},showSearch:!0,className:`rounded-md ${g||""}`,disabled:m}),b&&(0,t.jsx)(l.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:E,disabled:m})]})}])},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},263147,e=>{"use strict";var t=e.i(266027),r=e.i(243652),l=e.i(602869),a=e.i(431703),s=e.i(708347),i=e.i(135214);let o=(0,r.createQueryKeys)("accessGroups"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),r=`${t}/v1/access_group`,s=await fetch(r,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,a.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return s.json()};e.s(["accessGroupKeys",0,o,"useAccessGroups",0,()=>{let{accessToken:e,userRole:r}=(0,i.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>n(e),enabled:!!e&&s.all_admin_roles.includes(r||"")})}])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,l){let a=(0,t.useDebouncer)(e,l).maybeExecute;return(0,r.useCallback)((...e)=>a(...e),[a])}])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},531516,696609,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(536916),a=e.i(599724),s=e.i(409797),i=e.i(233565);let o=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,n=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,c=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,d=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function u(e,t=""){let r=e.toLowerCase();if(d.test(r))return"read";if(o.test(r))return"delete";if(c.test(r))return"update";if(n.test(r))return"create";if(t){let e=t.toLowerCase();if(d.test(e))return"read";if(o.test(e))return"delete";if(c.test(e))return"update";if(n.test(e))return"create"}return"unknown"}function m(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[u(r.name,r.description)].push(r);return t}let p={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,p,"classifyToolOp",0,u,"groupToolsByCrud",0,m],696609);let g=["read","create","update","delete","unknown"],h={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},f={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},v={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:o,onChange:n,readOnly:c=!1,searchFilter:d=""})=>{let[u,y]=(0,r.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),b=(0,r.useMemo)(()=>m(e),[e]),x=(0,r.useMemo)(()=>new Set(void 0===o?e.map(e=>e.name):o),[o,e]),S=e=>{if(c)return;let t=new Set(x);t.has(e)?t.delete(e):t.add(e),n(Array.from(t))};return 0===e.length?null:(0,t.jsx)("div",{className:"space-y-3",children:g.map(e=>{let r,o=b[e];if(0===o.length)return null;if(d){let e=d.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let m=p[e],g=(r=b[e]).length>0&&r.every(e=>x.has(e.name)),w=(e=>{let t=b[e];if(0===t.length)return!1;let r=t.filter(e=>x.has(e.name)).length;return r>0&&r{y(t=>({...t,[e]:!t[e]}))},children:[E?(0,t.jsx)(i.ChevronRightIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}):(0,t.jsx)(s.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:m.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${h[m.risk]}`,children:"high"===m.risk?"High Risk":"medium"===m.risk?"Medium Risk":"low"===m.risk?"Safe":"Unclassified"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>x.has(e.name)).length,"/",o.length," allowed"]})]}),!c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:g?"All on":w?"Partial":"All off"}),(0,t.jsx)(l.Checkbox,{checked:g,indeterminate:w,onChange:t=>((e,t)=>{if(c)return;let r=new Set(x);for(let l of b[e])t?r.add(l.name):r.delete(l.name);n(Array.from(r))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!E&&(0,t.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:m.description}),!E&&(0,t.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!d||e.name.toLowerCase().includes(d.toLowerCase())||(e.description??"").toLowerCase().includes(d.toLowerCase())).map(e=>{let r,s=(r=e.name,x.has(r));return(0,t.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!c?"cursor-pointer":""} ${s?"":"opacity-60"}`,onClick:()=>S(e.name),children:[(0,t.jsx)(l.Checkbox,{checked:s,onChange:()=>S(e.name),disabled:c,onClick:e=>e.stopPropagation()}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,t.jsx)(a.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,t.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded shrink-0 ${s?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:s?"on":"off"})]},e.name)})})]},e)})})}],531516)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2wzbftaqumx8j.js b/litellm/proxy/_experimental/out/_next/static/chunks/0ma4y3uxzghhw.js
similarity index 51%
rename from litellm/proxy/_experimental/out/_next/static/chunks/2wzbftaqumx8j.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0ma4y3uxzghhw.js
index 9c9ee61f1f4..5c732772af1 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2wzbftaqumx8j.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0ma4y3uxzghhw.js
@@ -1,4 +1,4 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),l=e.i(540143),i=e.i(915823),r=e.i(619273),o=class extends i.Subscribable{#e;#t=void 0;#n;#l;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#r()}mutate(e,t){return this.#l=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){l.notifyManager.batch(()=>{if(this.#l&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#l.onSuccess?.(e.data,t,n,l)}catch(e){Promise.reject(e)}try{this.#l.onSettled?.(e.data,null,t,n,l)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#l.onError?.(e.error,t,n,l)}catch(e){Promise.reject(e)}try{this.#l.onSettled?.(void 0,e.error,t,n,l)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},a=e.i(912598);e.s(["useMutation",0,function(e,n){let i=(0,a.useQueryClient)(n),[s]=t.useState(()=>new o(i,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(l.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=t.useCallback((e,t)=>{s.mutate(e,t).catch(r.noop)},[s]);if(c.error&&(0,r.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}],954616)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let l={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"};var i=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(i.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExclamationCircleOutlined",0,r],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(529681),i=e.i(242064),r=e.i(517455),o=e.i(185793),a=e.i(721369),s=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let c=e=>{var{prefixCls:l,className:r,hoverable:o=!0}=e,a=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(i.ConfigContext),d=c("card",l),u=(0,n.default)(`${d}-grid`,r,{[`${d}-grid-hoverable`]:o});return t.createElement("div",Object.assign({},a,{className:u}))};e.i(296059);var d=e.i(915654),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=(0,g.genStyleHooks)("Card",e=>{let t=(0,m.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:l,colorBorderSecondary:i,boxShadowTertiary:r,bodyPadding:o,extraColor:a}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:l,headerPadding:i,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:l,marginBottom:-1,padding:`0 ${(0,d.unit)(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let l={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"};var i=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(i.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExclamationCircleOutlined",0,r],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(529681),i=e.i(242064),r=e.i(517455),o=e.i(185793),a=e.i(721369),s=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let c=e=>{var{prefixCls:l,className:r,hoverable:o=!0}=e,a=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(i.ConfigContext),d=c("card",l),u=(0,n.default)(`${d}-grid`,r,{[`${d}-grid-hoverable`]:o});return t.createElement("div",Object.assign({},a,{className:u}))};e.i(296059);var d=e.i(915654),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=(0,g.genStyleHooks)("Card",e=>{let t=(0,m.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:l,colorBorderSecondary:i,boxShadowTertiary:r,bodyPadding:o,extraColor:a}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:l,headerPadding:i,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:l,marginBottom:-1,padding:`0 ${(0,d.unit)(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
> ${n}-typography,
> ${n}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:a,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:l,lineWidth:i}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
@@ -7,4 +7,5 @@
${(0,d.unit)(i)} ${(0,d.unit)(i)} 0 0 ${n},
${(0,d.unit)(i)} 0 0 0 ${n} inset,
0 ${(0,d.unit)(i)} 0 0 ${n} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:l}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:l,cardActionsIconSize:i,colorBorderSecondary:r,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:o,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:l,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:(0,d.unit)(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:l}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:l,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(l)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(i)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:l,headerHeightSM:i,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${(0,d.unit)(l)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var b=e.i(792812),h=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let f=e=>{let{actionClasses:n,actions:l=[],actionStyle:i}=e;return t.createElement("ul",{className:n,style:i},l.map((e,n)=>{let i=`action-${n}`;return t.createElement("li",{style:{width:`${100/l.length}%`},key:i},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:g,rootClassName:m,style:y,extra:$,headStyle:v={},bodyStyle:O={},title:j,loading:x,bordered:S,variant:C,size:E,type:w,cover:M,actions:N,tabList:z,children:k,activeTabKey:B,defaultActiveTabKey:T,tabBarExtraContent:P,hoverable:L,tabProps:R={},classNames:I,styles:H}=e,G=h(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:D}=t.useContext(i.ConfigContext),[F]=(0,b.default)("card",C,S),X=e=>{var t;return(0,n.default)(null==(t=null==D?void 0:D.classNames)?void 0:t[e],null==I?void 0:I[e])},K=e=>{var t;return Object.assign(Object.assign({},null==(t=null==D?void 0:D.styles)?void 0:t[e]),null==H?void 0:H[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(k,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[k]),U=W("card",u),[V,Q,_]=p(U),J=t.createElement(o.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},k),Y=void 0!==B,Z=Object.assign(Object.assign({},R),{[Y?"activeKey":"defaultActiveKey"]:Y?B:T,tabBarExtraContent:P}),ee=(0,r.default)(E),et=ee&&"default"!==ee?ee:"large",en=z?t.createElement(a.default,Object.assign({size:et},Z,{className:`${U}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:z.map(e=>{var{tab:t}=e;return Object.assign({label:t},h(e,["tab"]))})})):null;if(j||$||en){let e=(0,n.default)(`${U}-head`,X("header")),l=(0,n.default)(`${U}-head-title`,X("title")),i=(0,n.default)(`${U}-extra`,X("extra")),r=Object.assign(Object.assign({},v),K("header"));d=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${U}-head-wrapper`},j&&t.createElement("div",{className:l,style:K("title")},j),$&&t.createElement("div",{className:i,style:K("extra")},$)),en)}let el=(0,n.default)(`${U}-cover`,X("cover")),ei=M?t.createElement("div",{className:el,style:K("cover")},M):null,er=(0,n.default)(`${U}-body`,X("body")),eo=Object.assign(Object.assign({},O),K("body")),ea=t.createElement("div",{className:er,style:eo},x?J:k),es=(0,n.default)(`${U}-actions`,X("actions")),ec=(null==N?void 0:N.length)?t.createElement(f,{actionClasses:es,actionStyle:K("actions"),actions:N}):null,ed=(0,l.default)(G,["onTabChange"]),eu=(0,n.default)(U,null==D?void 0:D.className,{[`${U}-loading`]:x,[`${U}-bordered`]:"borderless"!==F,[`${U}-hoverable`]:L,[`${U}-contain-grid`]:q,[`${U}-contain-tabs`]:null==z?void 0:z.length,[`${U}-${ee}`]:ee,[`${U}-type-${w}`]:!!w,[`${U}-rtl`]:"rtl"===A},g,m,Q,_),eg=Object.assign(Object.assign({},null==D?void 0:D.style),y);return V(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:eg}),d,ei,ea,ec))});var $=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};y.Grid=c,y.Meta=e=>{let{prefixCls:l,className:r,avatar:o,title:a,description:s}=e,c=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(i.ConfigContext),u=d("card",l),g=(0,n.default)(`${u}-meta`,r),m=o?t.createElement("div",{className:`${u}-meta-avatar`},o):null,p=a?t.createElement("div",{className:`${u}-meta-title`},a):null,b=s?t.createElement("div",{className:`${u}-meta-description`},s):null,h=p||b?t.createElement("div",{className:`${u}-meta-detail`},p,b):null;return t.createElement("div",Object.assign({},c,{className:g}),m,h)},e.s(["Card",0,y],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(908206),i=e.i(242064),r=e.i(517455),o=e.i(150073);let a={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var c=e.i(876556),d=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n},u=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let g=e=>{let{itemPrefixCls:l,component:i,span:r,className:o,style:a,labelStyle:c,contentStyle:d,bordered:u,label:g,content:m,colon:p,type:b,styles:h}=e,{classNames:f}=t.useContext(s),y=Object.assign(Object.assign({},c),null==h?void 0:h.label),$=Object.assign(Object.assign({},d),null==h?void 0:h.content);if(u)return t.createElement(i,{colSpan:r,style:a,className:(0,n.default)(o,{[`${l}-item-${b}`]:"label"===b||"content"===b,[null==f?void 0:f.label]:(null==f?void 0:f.label)&&"label"===b,[null==f?void 0:f.content]:(null==f?void 0:f.content)&&"content"===b})},null!=g&&t.createElement("span",{style:y},g),null!=m&&t.createElement("span",{style:$},m));return t.createElement(i,{colSpan:r,style:a,className:(0,n.default)(`${l}-item`,o)},t.createElement("div",{className:`${l}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${l}-item-label`,null==f?void 0:f.label,{[`${l}-item-no-colon`]:!p})},g),null!=m&&t.createElement("span",{style:$,className:(0,n.default)(`${l}-item-content`,null==f?void 0:f.content)},m)))};function m(e,{colon:n,prefixCls:l,bordered:i},{component:r,type:o,showLabel:a,showContent:s,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:m,prefixCls:p=l,className:b,style:h,labelStyle:f,contentStyle:y,span:$=1,key:v,styles:O},j)=>"string"==typeof r?t.createElement(g,{key:`${o}-${v||j}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),f),null==O?void 0:O.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),y),null==O?void 0:O.content)},span:$,colon:n,component:r,itemPrefixCls:p,bordered:i,label:a?e:null,content:s?m:null,type:o}):[t.createElement(g,{key:`label-${v||j}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),h),f),null==O?void 0:O.label),span:1,colon:n,component:r[0],itemPrefixCls:p,bordered:i,label:e,type:"label"}),t.createElement(g,{key:`content-${v||j}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),y),null==O?void 0:O.content),span:2*$-1,component:r[1],itemPrefixCls:p,bordered:i,content:m,type:"content"})])}let p=e=>{let n=t.useContext(s),{prefixCls:l,vertical:i,row:r,index:o,bordered:a}=e;return i?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${o}`,className:`${l}-row`},m(r,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${o}`,className:`${l}-row`},m(r,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:o,className:`${l}-row`},m(r,e,Object.assign({component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var b=e.i(915654),h=e.i(183293),f=e.i(246422),y=e.i(838378);let $=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:l,itemPaddingEnd:i,colonMarginRight:r,colonMarginLeft:o,titleMarginBottom:a}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.padding)} ${(0,b.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.paddingSM)} ${(0,b.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.paddingXS)} ${(0,b.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:Object.assign(Object.assign({},h.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:l,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,b.unit)(o)} ${(0,b.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var v=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let O=e=>{let g,{prefixCls:m,title:b,extra:h,column:f,colon:y=!0,bordered:O,layout:j,children:x,className:S,rootClassName:C,style:E,size:w,labelStyle:M,contentStyle:N,styles:z,items:k,classNames:B}=e,T=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:L,className:R,style:I,classNames:H,styles:G}=(0,i.useComponentConfig)("descriptions"),W=P("descriptions",m),A=(0,o.default)(),D=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,l.matchScreen)(A,Object.assign(Object.assign({},a),f)))?e:3},[A,f]),F=(g=t.useMemo(()=>k||(0,c.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[k,x]),t.useMemo(()=>g.map(e=>{var{span:t}=e,n=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,l.matchScreen)(A,t)})}),[g,A])),X=(0,r.default)(w),K=((e,n)=>{let[l,i]=(0,t.useMemo)(()=>{let t,l,i,r;return t=[],l=[],i=!1,r=0,n.filter(e=>e).forEach(n=>{let{filled:o}=n,a=u(n,["filled"]);if(o){l.push(a),t.push(l),l=[],r=0;return}let s=e-r;(r+=n.span||1)>=e?(r>e?(i=!0,l.push(Object.assign(Object.assign({},a),{span:s}))):l.push(a),t.push(l),l=[],r=0):l.push(a)}),l.length>0&&t.push(l),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:M,contentStyle:N,styles:{content:Object.assign(Object.assign({},G.content),null==z?void 0:z.content),label:Object.assign(Object.assign({},G.label),null==z?void 0:z.label)},classNames:{label:(0,n.default)(H.label,null==B?void 0:B.label),content:(0,n.default)(H.content,null==B?void 0:B.content)}}),[M,N,z,B,H,G]);return q(t.createElement(s.Provider,{value:Q},t.createElement("div",Object.assign({className:(0,n.default)(W,R,H.root,null==B?void 0:B.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!O,[`${W}-rtl`]:"rtl"===L},S,C,U,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),G.root),null==z?void 0:z.root),E)},T),(b||h)&&t.createElement("div",{className:(0,n.default)(`${W}-header`,H.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},G.header),null==z?void 0:z.header)},b&&t.createElement("div",{className:(0,n.default)(`${W}-title`,H.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},G.title),null==z?void 0:z.title)},b),h&&t.createElement("div",{className:(0,n.default)(`${W}-extra`,H.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},G.extra),null==z?void 0:z.extra)},h)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,K.map((e,n)=>t.createElement(p,{key:n,index:n,colon:y,prefixCls:W,vertical:"vertical"===j,bordered:O,row:e}))))))))};O.Item=({children:e})=>e,e.s(["Descriptions",0,O],869216)},368869,e=>{"use strict";e.i(296059);var t=e.i(868297),n=e.i(732961),l=e.i(289882),i=e.i(170517),r=e.i(628882),o=e.i(320890),a=e.i(104458),s=e.i(722319),c=e.i(8398),d=e.i(279728);e.i(765846);var u=e.i(602716),g=e.i(328052),m=e.i(135551);let p=(e,t)=>new m.FastColor(e).setA(t).toRgbString(),b=(e,t)=>new m.FastColor(e).lighten(t).toHexString(),h=e=>{let t=(0,u.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},f=(e,t)=>{let n=e||"#000",l=t||"#fff";return{colorBgBase:n,colorTextBase:l,colorText:p(l,.85),colorTextSecondary:p(l,.65),colorTextTertiary:p(l,.45),colorTextQuaternary:p(l,.25),colorFill:p(l,.18),colorFillSecondary:p(l,.12),colorFillTertiary:p(l,.08),colorFillQuaternary:p(l,.04),colorBgSolid:p(l,.95),colorBgSolidHover:p(l,1),colorBgSolidActive:p(l,.9),colorBgElevated:b(n,12),colorBgContainer:b(n,8),colorBgLayout:b(n,0),colorBgSpotlight:b(n,26),colorBgBlur:p(l,.04),colorBorder:b(n,26),colorBorderSecondary:b(n,19)}},y={defaultSeed:o.defaultConfig.token,useToken:function(){let[e,t,n]=(0,a.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:s.default,darkAlgorithm:(e,t)=>{let n=Object.keys(i.defaultPresetColors).map(t=>{let n=(0,u.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,l,i)=>(e[`${t}-${i+1}`]=n[i],e[`${t}${i+1}`]=n[i],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),l=null!=t?t:(0,s.default)(e),r=(0,g.default)(e,{generateColorPalettes:h,generateNeutralColorPalettes:f});return Object.assign(Object.assign(Object.assign(Object.assign({},l),n),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,s.default)(e),l=n.fontSizeSM,i=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,l=n-2;return{sizeXXL:t*(l+10),sizeXL:t*(l+6),sizeLG:t*(l+2),sizeMD:t*(l+2),sizeMS:t*(l+1),size:t*l,sizeSM:t*l,sizeXS:t*(l-1),sizeXXS:t*(l-1)}}(null!=t?t:e)),(0,d.default)(l)),{controlHeight:i}),(0,c.default)(Object.assign(Object.assign({},n),{controlHeight:i})))},getDesignToken:e=>{let o=(null==e?void 0:e.algorithm)?(0,t.createTheme)(e.algorithm):l.default,a=Object.assign(Object.assign({},i.default),null==e?void 0:e.token);return(0,n.getComputedToken)(a,{override:null==e?void 0:e.token},o,r.default)},defaultConfig:o.defaultConfig,_internalContext:o.DesignTokenContext};e.s(["theme",0,y],368869)},127952,e=>{"use strict";var t=e.i(843476),n=e.i(560445),l=e.i(175712),i=e.i(869216),r=e.i(311451),o=e.i(212931),a=e.i(898586),s=e.i(368869),c=e.i(270377),d=e.i(271645);e.s(["default",0,function({isOpen:e,title:u,alertMessage:g,message:m,resourceInformationTitle:p,resourceInformation:b,onCancel:h,onOk:f,confirmLoading:y,requiredConfirmation:$}){let{Title:v,Text:O}=a.Typography,{token:j}=s.theme.useToken(),[x,S]=(0,d.useState)("");return(0,d.useEffect)(()=>{e&&S("")},[e]),(0,t.jsx)(o.Modal,{title:u,open:e,onOk:f,onCancel:h,confirmLoading:y,okText:y?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!$&&x!==$||y},cancelButtonProps:{disabled:y},children:(0,t.jsxs)("div",{className:"space-y-4",children:[g&&(0,t.jsx)(n.Alert,{message:g,type:"warning"}),(0,t.jsx)(l.Card,{title:p,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:j.colorErrorBg,borderColor:j.colorErrorBorder}},style:{backgroundColor:j.colorErrorBg,borderColor:j.colorErrorBorder},children:(0,t.jsx)(i.Descriptions,{column:1,size:"small",children:b&&b.map(({label:e,value:n,...l})=>(0,t.jsx)(i.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(O,{...l,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(O,{children:m})}),$&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(O,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(O,{children:"Type "}),(0,t.jsx)(O,{strong:!0,type:"danger",children:$}),(0,t.jsx)(O,{children:" to confirm deletion:"})]}),(0,t.jsx)(r.Input,{value:x,onChange:e=>S(e.target.value),placeholder:$,className:"rounded-md",prefix:(0,t.jsx)(c.ExclamationCircleOutlined,{style:{color:j.colorError}}),autoFocus:!0})]})]})})}])},350967,46757,e=>{"use strict";var t=e.i(290571),n=e.i(444755),l=e.i(673706),i=e.i(271645);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"},a={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"},s={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,r,"gridColsLg",0,s,"gridColsMd",0,a,"gridColsSm",0,o],46757);let c=(0,l.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=i.default.forwardRef((e,l)=>{let{numItems:u=1,numItemsSm:g,numItemsMd:m,numItemsLg:p,children:b,className:h}=e,f=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),y=d(u,r),$=d(g,o),v=d(m,a),O=d(p,s),j=(0,n.tremorTwMerge)(y,$,v,O);return i.default.createElement("div",Object.assign({ref:l,className:(0,n.tremorTwMerge)(c("root"),"grid",j,h)},f),b)});u.displayName="Grid",e.s(["Grid",0,u],350967)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let l={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"};var i=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(i.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["UploadOutlined",0,r],519756)},530212,e=>{"use strict";var t=e.i(271645);let n=t.forwardRef(function(e,n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,n],530212)}]);
\ No newline at end of file
+ `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:l}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:l,cardActionsIconSize:i,colorBorderSecondary:r,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:o,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:l,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:(0,d.unit)(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:l}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:l,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(l)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(i)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:l,headerHeightSM:i,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${(0,d.unit)(l)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var b=e.i(792812),h=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let f=e=>{let{actionClasses:n,actions:l=[],actionStyle:i}=e;return t.createElement("ul",{className:n,style:i},l.map((e,n)=>{let i=`action-${n}`;return t.createElement("li",{style:{width:`${100/l.length}%`},key:i},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:g,rootClassName:m,style:y,extra:v,headStyle:$={},bodyStyle:O={},title:j,loading:S,bordered:x,variant:C,size:E,type:w,cover:k,actions:M,tabList:N,children:T,activeTabKey:P,defaultActiveTabKey:z,tabBarExtraContent:B,hoverable:L,tabProps:R={},classNames:I,styles:H}=e,A=h(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:F,direction:G,card:W}=t.useContext(i.ConfigContext),[D]=(0,b.default)("card",C,x),X=e=>{var t;return(0,n.default)(null==(t=null==W?void 0:W.classNames)?void 0:t[e],null==I?void 0:I[e])},K=e=>{var t;return Object.assign(Object.assign({},null==(t=null==W?void 0:W.styles)?void 0:t[e]),null==H?void 0:H[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(T,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[T]),U=F("card",u),[_,Q,V]=p(U),J=t.createElement(o.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},T),Y=void 0!==P,Z=Object.assign(Object.assign({},R),{[Y?"activeKey":"defaultActiveKey"]:Y?P:z,tabBarExtraContent:B}),ee=(0,r.default)(E),et=ee&&"default"!==ee?ee:"large",en=N?t.createElement(a.default,Object.assign({size:et},Z,{className:`${U}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:N.map(e=>{var{tab:t}=e;return Object.assign({label:t},h(e,["tab"]))})})):null;if(j||v||en){let e=(0,n.default)(`${U}-head`,X("header")),l=(0,n.default)(`${U}-head-title`,X("title")),i=(0,n.default)(`${U}-extra`,X("extra")),r=Object.assign(Object.assign({},$),K("header"));d=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${U}-head-wrapper`},j&&t.createElement("div",{className:l,style:K("title")},j),v&&t.createElement("div",{className:i,style:K("extra")},v)),en)}let el=(0,n.default)(`${U}-cover`,X("cover")),ei=k?t.createElement("div",{className:el,style:K("cover")},k):null,er=(0,n.default)(`${U}-body`,X("body")),eo=Object.assign(Object.assign({},O),K("body")),ea=t.createElement("div",{className:er,style:eo},S?J:T),es=(0,n.default)(`${U}-actions`,X("actions")),ec=(null==M?void 0:M.length)?t.createElement(f,{actionClasses:es,actionStyle:K("actions"),actions:M}):null,ed=(0,l.default)(A,["onTabChange"]),eu=(0,n.default)(U,null==W?void 0:W.className,{[`${U}-loading`]:S,[`${U}-bordered`]:"borderless"!==D,[`${U}-hoverable`]:L,[`${U}-contain-grid`]:q,[`${U}-contain-tabs`]:null==N?void 0:N.length,[`${U}-${ee}`]:ee,[`${U}-type-${w}`]:!!w,[`${U}-rtl`]:"rtl"===G},g,m,Q,V),eg=Object.assign(Object.assign({},null==W?void 0:W.style),y);return _(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:eg}),d,ei,ea,ec))});var v=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};y.Grid=c,y.Meta=e=>{let{prefixCls:l,className:r,avatar:o,title:a,description:s}=e,c=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(i.ConfigContext),u=d("card",l),g=(0,n.default)(`${u}-meta`,r),m=o?t.createElement("div",{className:`${u}-meta-avatar`},o):null,p=a?t.createElement("div",{className:`${u}-meta-title`},a):null,b=s?t.createElement("div",{className:`${u}-meta-description`},s):null,h=p||b?t.createElement("div",{className:`${u}-meta-detail`},p,b):null;return t.createElement("div",Object.assign({},c,{className:g}),m,h)},e.s(["Card",0,y],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(908206),i=e.i(242064),r=e.i(517455),o=e.i(150073);let a={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var c=e.i(876556),d=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n},u=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let g=e=>{let{itemPrefixCls:l,component:i,span:r,className:o,style:a,labelStyle:c,contentStyle:d,bordered:u,label:g,content:m,colon:p,type:b,styles:h}=e,{classNames:f}=t.useContext(s),y=Object.assign(Object.assign({},c),null==h?void 0:h.label),v=Object.assign(Object.assign({},d),null==h?void 0:h.content);if(u)return t.createElement(i,{colSpan:r,style:a,className:(0,n.default)(o,{[`${l}-item-${b}`]:"label"===b||"content"===b,[null==f?void 0:f.label]:(null==f?void 0:f.label)&&"label"===b,[null==f?void 0:f.content]:(null==f?void 0:f.content)&&"content"===b})},null!=g&&t.createElement("span",{style:y},g),null!=m&&t.createElement("span",{style:v},m));return t.createElement(i,{colSpan:r,style:a,className:(0,n.default)(`${l}-item`,o)},t.createElement("div",{className:`${l}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${l}-item-label`,null==f?void 0:f.label,{[`${l}-item-no-colon`]:!p})},g),null!=m&&t.createElement("span",{style:v,className:(0,n.default)(`${l}-item-content`,null==f?void 0:f.content)},m)))};function m(e,{colon:n,prefixCls:l,bordered:i},{component:r,type:o,showLabel:a,showContent:s,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:m,prefixCls:p=l,className:b,style:h,labelStyle:f,contentStyle:y,span:v=1,key:$,styles:O},j)=>"string"==typeof r?t.createElement(g,{key:`${o}-${$||j}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),f),null==O?void 0:O.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),y),null==O?void 0:O.content)},span:v,colon:n,component:r,itemPrefixCls:p,bordered:i,label:a?e:null,content:s?m:null,type:o}):[t.createElement(g,{key:`label-${$||j}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),h),f),null==O?void 0:O.label),span:1,colon:n,component:r[0],itemPrefixCls:p,bordered:i,label:e,type:"label"}),t.createElement(g,{key:`content-${$||j}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),y),null==O?void 0:O.content),span:2*v-1,component:r[1],itemPrefixCls:p,bordered:i,content:m,type:"content"})])}let p=e=>{let n=t.useContext(s),{prefixCls:l,vertical:i,row:r,index:o,bordered:a}=e;return i?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${o}`,className:`${l}-row`},m(r,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${o}`,className:`${l}-row`},m(r,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:o,className:`${l}-row`},m(r,e,Object.assign({component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var b=e.i(915654),h=e.i(183293),f=e.i(246422),y=e.i(838378);let v=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:l,itemPaddingEnd:i,colonMarginRight:r,colonMarginLeft:o,titleMarginBottom:a}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.padding)} ${(0,b.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.paddingSM)} ${(0,b.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.paddingXS)} ${(0,b.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:Object.assign(Object.assign({},h.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:l,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,b.unit)(o)} ${(0,b.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var $=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(n[l[i]]=e[l[i]]);return n};let O=e=>{let g,{prefixCls:m,title:b,extra:h,column:f,colon:y=!0,bordered:O,layout:j,children:S,className:x,rootClassName:C,style:E,size:w,labelStyle:k,contentStyle:M,styles:N,items:T,classNames:P}=e,z=$(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:B,direction:L,className:R,style:I,classNames:H,styles:A}=(0,i.useComponentConfig)("descriptions"),F=B("descriptions",m),G=(0,o.default)(),W=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,l.matchScreen)(G,Object.assign(Object.assign({},a),f)))?e:3},[G,f]),D=(g=t.useMemo(()=>T||(0,c.default)(S).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[T,S]),t.useMemo(()=>g.map(e=>{var{span:t}=e,n=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,l.matchScreen)(G,t)})}),[g,G])),X=(0,r.default)(w),K=((e,n)=>{let[l,i]=(0,t.useMemo)(()=>{let t,l,i,r;return t=[],l=[],i=!1,r=0,n.filter(e=>e).forEach(n=>{let{filled:o}=n,a=u(n,["filled"]);if(o){l.push(a),t.push(l),l=[],r=0;return}let s=e-r;(r+=n.span||1)>=e?(r>e?(i=!0,l.push(Object.assign(Object.assign({},a),{span:s}))):l.push(a),t.push(l),l=[],r=0):l.push(a)}),l.length>0&&t.push(l),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:k,contentStyle:M,styles:{content:Object.assign(Object.assign({},A.content),null==N?void 0:N.content),label:Object.assign(Object.assign({},A.label),null==N?void 0:N.label)},classNames:{label:(0,n.default)(H.label,null==P?void 0:P.label),content:(0,n.default)(H.content,null==P?void 0:P.content)}}),[k,M,N,P,H,A]);return q(t.createElement(s.Provider,{value:Q},t.createElement("div",Object.assign({className:(0,n.default)(F,R,H.root,null==P?void 0:P.root,{[`${F}-${X}`]:X&&"default"!==X,[`${F}-bordered`]:!!O,[`${F}-rtl`]:"rtl"===L},x,C,U,_),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),A.root),null==N?void 0:N.root),E)},z),(b||h)&&t.createElement("div",{className:(0,n.default)(`${F}-header`,H.header,null==P?void 0:P.header),style:Object.assign(Object.assign({},A.header),null==N?void 0:N.header)},b&&t.createElement("div",{className:(0,n.default)(`${F}-title`,H.title,null==P?void 0:P.title),style:Object.assign(Object.assign({},A.title),null==N?void 0:N.title)},b),h&&t.createElement("div",{className:(0,n.default)(`${F}-extra`,H.extra,null==P?void 0:P.extra),style:Object.assign(Object.assign({},A.extra),null==N?void 0:N.extra)},h)),t.createElement("div",{className:`${F}-view`},t.createElement("table",null,t.createElement("tbody",null,K.map((e,n)=>t.createElement(p,{key:n,index:n,colon:y,prefixCls:F,vertical:"vertical"===j,bordered:O,row:e}))))))))};O.Item=({children:e})=>e,e.s(["Descriptions",0,O],869216)},368869,e=>{"use strict";e.i(296059);var t=e.i(868297),n=e.i(732961),l=e.i(289882),i=e.i(170517),r=e.i(628882),o=e.i(320890),a=e.i(104458),s=e.i(722319),c=e.i(8398),d=e.i(279728);e.i(765846);var u=e.i(602716),g=e.i(328052),m=e.i(135551);let p=(e,t)=>new m.FastColor(e).setA(t).toRgbString(),b=(e,t)=>new m.FastColor(e).lighten(t).toHexString(),h=e=>{let t=(0,u.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},f=(e,t)=>{let n=e||"#000",l=t||"#fff";return{colorBgBase:n,colorTextBase:l,colorText:p(l,.85),colorTextSecondary:p(l,.65),colorTextTertiary:p(l,.45),colorTextQuaternary:p(l,.25),colorFill:p(l,.18),colorFillSecondary:p(l,.12),colorFillTertiary:p(l,.08),colorFillQuaternary:p(l,.04),colorBgSolid:p(l,.95),colorBgSolidHover:p(l,1),colorBgSolidActive:p(l,.9),colorBgElevated:b(n,12),colorBgContainer:b(n,8),colorBgLayout:b(n,0),colorBgSpotlight:b(n,26),colorBgBlur:p(l,.04),colorBorder:b(n,26),colorBorderSecondary:b(n,19)}},y={defaultSeed:o.defaultConfig.token,useToken:function(){let[e,t,n]=(0,a.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:s.default,darkAlgorithm:(e,t)=>{let n=Object.keys(i.defaultPresetColors).map(t=>{let n=(0,u.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,l,i)=>(e[`${t}-${i+1}`]=n[i],e[`${t}${i+1}`]=n[i],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),l=null!=t?t:(0,s.default)(e),r=(0,g.default)(e,{generateColorPalettes:h,generateNeutralColorPalettes:f});return Object.assign(Object.assign(Object.assign(Object.assign({},l),n),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,s.default)(e),l=n.fontSizeSM,i=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,l=n-2;return{sizeXXL:t*(l+10),sizeXL:t*(l+6),sizeLG:t*(l+2),sizeMD:t*(l+2),sizeMS:t*(l+1),size:t*l,sizeSM:t*l,sizeXS:t*(l-1),sizeXXS:t*(l-1)}}(null!=t?t:e)),(0,d.default)(l)),{controlHeight:i}),(0,c.default)(Object.assign(Object.assign({},n),{controlHeight:i})))},getDesignToken:e=>{let o=(null==e?void 0:e.algorithm)?(0,t.createTheme)(e.algorithm):l.default,a=Object.assign(Object.assign({},i.default),null==e?void 0:e.token);return(0,n.getComputedToken)(a,{override:null==e?void 0:e.token},o,r.default)},defaultConfig:o.defaultConfig,_internalContext:o.DesignTokenContext};e.s(["theme",0,y],368869)},127952,e=>{"use strict";var t=e.i(843476),n=e.i(560445),l=e.i(175712),i=e.i(869216),r=e.i(311451),o=e.i(212931),a=e.i(898586),s=e.i(368869),c=e.i(270377),d=e.i(271645);e.s(["default",0,function({isOpen:e,title:u,alertMessage:g,message:m,resourceInformationTitle:p,resourceInformation:b,onCancel:h,onOk:f,confirmLoading:y,requiredConfirmation:v}){let{Title:$,Text:O}=a.Typography,{token:j}=s.theme.useToken(),[S,x]=(0,d.useState)("");return(0,d.useEffect)(()=>{e&&x("")},[e]),(0,t.jsx)(o.Modal,{title:u,open:e,onOk:f,onCancel:h,confirmLoading:y,okText:y?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!v&&S!==v||y},cancelButtonProps:{disabled:y},children:(0,t.jsxs)("div",{className:"space-y-4",children:[g&&(0,t.jsx)(n.Alert,{message:g,type:"warning"}),(0,t.jsx)(l.Card,{title:p,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:j.colorErrorBg,borderColor:j.colorErrorBorder}},style:{backgroundColor:j.colorErrorBg,borderColor:j.colorErrorBorder},children:(0,t.jsx)(i.Descriptions,{column:1,size:"small",children:b&&b.map(({label:e,value:n,...l})=>(0,t.jsx)(i.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(O,{...l,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(O,{children:m})}),v&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(O,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(O,{children:"Type "}),(0,t.jsx)(O,{strong:!0,type:"danger",children:v}),(0,t.jsx)(O,{children:" to confirm deletion:"})]}),(0,t.jsx)(r.Input,{value:S,onChange:e=>x(e.target.value),placeholder:v,className:"rounded-md",prefix:(0,t.jsx)(c.ExclamationCircleOutlined,{style:{color:j.colorError}}),autoFocus:!0})]})]})})}])},954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),l=e.i(540143),i=e.i(915823),r=e.i(619273),o=class extends i.Subscribable{#e;#t=void 0;#n;#l;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#r()}mutate(e,t){return this.#l=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){l.notifyManager.batch(()=>{if(this.#l&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#l.onSuccess?.(e.data,t,n,l)}catch(e){Promise.reject(e)}try{this.#l.onSettled?.(e.data,null,t,n,l)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#l.onError?.(e.error,t,n,l)}catch(e){Promise.reject(e)}try{this.#l.onSettled?.(void 0,e.error,t,n,l)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},a=e.i(912598);e.s(["useMutation",0,function(e,n){let i=(0,a.useQueryClient)(n),[s]=t.useState(()=>new o(i,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(l.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=t.useCallback((e,t)=>{s.mutate(e,t).catch(r.noop)},[s]);if(c.error&&(0,r.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}],954616)},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},233538,e=>{"use strict";e.s(["isDisabledReactIssue7711",0,function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let l=(null==t?void 0:t.getAttribute("disabled"))==="";return!(l&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&l}])},83733,233137,e=>{"use strict";let t,n;var l,i,r=e.i(247167),o=e.i(271645),a=e.i(544508),s=e.i(746725),c=e.i(835696);void 0!==r.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(l=null==r.default?void 0:r.default.env)?void 0:l.NODE_ENV)==="test"&&void 0===(null==(i=null==Element?void 0:Element.prototype)?void 0:i.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
+`)),[]});var d=((t=d||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);e.s(["transitionDataAttributes",0,function(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t},"useTransition",0,function(e,t,n,l){let[i,r]=(0,o.useState)(n),{hasFlag:d,addFlag:u,removeFlag:g}=function(e=0){let[t,n]=(0,o.useState)(e),l=(0,o.useCallback)(e=>n(e),[t]),i=(0,o.useCallback)(e=>n(t=>t|e),[t]),r=(0,o.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:l,addFlag:i,hasFlag:r,removeFlag:(0,o.useCallback)(e=>n(t=>t&~e),[n]),toggleFlag:(0,o.useCallback)(e=>n(t=>t^e),[n])}}(e&&i?3:0),m=(0,o.useRef)(!1),p=(0,o.useRef)(!1),b=(0,s.useDisposables)();return(0,c.useIsoMorphicEffect)(()=>{var i;if(e){if(n&&r(!0),!t){n&&u(3);return}return null==(i=null==l?void 0:l.start)||i.call(l,n),function(e,{prepare:t,run:n,done:l,inFlight:i}){let r=(0,a.disposables)();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return n();let l=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=l}(e,{prepare:t,inFlight:i}),r.nextFrame(()=>{n(),r.requestAnimationFrame(()=>{r.add(function(e,t){var n,l;let i=(0,a.disposables)();if(!e)return i.dispose;let r=!1;i.add(()=>{r=!0});let o=null!=(l=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?l:[];return 0===o.length?t():Promise.allSettled(o.map(e=>e.finished)).then(()=>{r||t()}),i.dispose}(e,l))})}),r.dispose}(t,{inFlight:m,prepare(){p.current?p.current=!1:p.current=m.current,m.current=!0,p.current||(n?(u(3),g(4)):(u(4),g(2)))},run(){p.current?n?(g(3),u(4)):(g(4),u(3)):n?g(1):u(1)},done(){var e;p.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(m.current=!1,g(7),n||r(!1),null==(e=null==l?void 0:l.end)||e.call(l,n))}})}},[e,n,t,b]),e?[i,{closed:d(1),enter:d(2),leave:d(4),transition:d(2)||d(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}],83733);let u=(0,o.createContext)(null);u.displayName="OpenClosedContext";var g=((n=g||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);e.s(["OpenClosedProvider",0,function({value:e,children:t}){return o.default.createElement(u.Provider,{value:e},t)},"ResetOpenClosedProvider",0,function({children:e}){return o.default.createElement(u.Provider,{value:null},e)},"State",0,g,"useOpenClosed",0,function(){return(0,o.useContext)(u)}],233137)},350967,46757,e=>{"use strict";var t=e.i(290571),n=e.i(444755),l=e.i(673706),i=e.i(271645);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"},a={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"},s={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"};e.s(["colSpan",0,{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"},"colSpanLg",0,{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"},"colSpanMd",0,{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"},"colSpanSm",0,{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"},"gridCols",0,r,"gridColsLg",0,s,"gridColsMd",0,a,"gridColsSm",0,o],46757);let c=(0,l.makeClassName)("Grid"),d=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=i.default.forwardRef((e,l)=>{let{numItems:u=1,numItemsSm:g,numItemsMd:m,numItemsLg:p,children:b,className:h}=e,f=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),y=d(u,r),v=d(g,o),$=d(m,a),O=d(p,s),j=(0,n.tremorTwMerge)(y,v,$,O);return i.default.createElement("div",Object.assign({ref:l,className:(0,n.tremorTwMerge)(c("root"),"grid",j,h)},f),b)});u.displayName="Grid",e.s(["Grid",0,u],350967)},35983,220508,e=>{"use strict";var t=e.i(333771);e.s(["SelectItem",()=>t.default],35983);var n=e.i(271645);let l=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,l],220508)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0maan-7nzqqca.js b/litellm/proxy/_experimental/out/_next/static/chunks/0maan-7nzqqca.js
deleted file mode 100644
index 0458370bd37..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0maan-7nzqqca.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),o=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:a=0,side:n="bottom",sideOffset:i=4,className:l,...s}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:a,side:n,sideOffset:i,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,o.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...s})})})},"DropdownMenuItem",0,function({className:e,inset:a,variant:n="default",...i}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:(0,o.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})},"DropdownMenuSeparator",0,function({className:e,...a}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,o.cn)("-mx-1 my-1 h-px bg-border",e),...a})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,o,a=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),i=e.i(951437),l=e.i(146376),s=e.i(667865),d=e.i(552245),u=e.i(53687),c=e.i(733332);let g=n.createContext(void 0);function h(){let e=n.useContext(g);if(void 0===e)throw Error((0,c.default)(64));return e}let b=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),f={tabActivationDirection:e=>({[b.activationDirection]:e})};var p=e.i(675606),m=e.i(56434);let v=n.forwardRef(function(e,t){let{className:r,defaultValue:o=0,onValueChange:c,orientation:h="horizontal",render:b,value:v,style:w,...x}=e,C=void 0!==e.defaultValue,y=n.useRef([]),[R,S]=n.useState(()=>new Map),[M,T]=(0,i.useControlled)({controlled:v,default:o,name:"Tabs",state:"value"}),E=void 0!==v,[I,N]=n.useState(()=>new Map),O=n.useRef(void 0),z=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of I.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[I]),[P,L]=n.useState(()=>({previousValue:M,tabActivationDirection:"none"})),{previousValue:D,tabActivationDirection:A}=P,j=A,_=!1;D!==M&&(j=k(D,M,h,I),_=null!=D&&null!=M&&null==z(M));let H=_?D:M,W=D!==H||A!==j;(0,l.useIsoLayoutEffect)(()=>{W&&L({previousValue:H,tabActivationDirection:j})},[H,W,j]);let F=(0,s.useStableCallback)((e,t)=>{t.activationDirection=k(M,e,h,I),c?.(e,t),t.isCanceled||T(e)}),B=(0,s.useStableCallback)((e,t)=>{c?.(e,(0,p.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),Y=(0,s.useStableCallback)((e,t)=>{S(r=>{if(r.get(e)===t)return r;let o=new Map(r);return o.set(e,t),o})}),K=(0,s.useStableCallback)((e,t)=>{S(r=>{if(!r.has(e)||r.get(e)!==t)return r;let o=new Map(r);return o.delete(e),o})}),V=n.useCallback(e=>R.get(e),[R]),q=n.useCallback(e=>{for(let t of I.values())if(e===t?.value)return t?.id},[I]),$=n.useMemo(()=>({getTabElementBySelectedValue:z,getTabIdByPanelValue:q,getTabPanelIdByValue:V,onValueChange:F,orientation:h,registerMountedTabPanel:Y,setTabMap:N,unregisterMountedTabPanel:K,tabActivationDirection:j,value:M}),[z,q,V,F,h,Y,N,K,j,M]),U=n.useMemo(()=>{for(let e of I.values())if(null!=e&&e.value===M)return e},[I,M]),X=n.useMemo(()=>{for(let e of I.values())if(null!=e&&!e.disabled)return e.value},[I]),G=n.useRef(!C),Q=n.useRef(o),Z=n.useRef(C),J=n.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(E)return;function e(e,t){T(e),L(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),G.current=!1}if(0===I.size){J.current&&null!==M&&!O.current?.isConnected&&e(null,m.REASONS.missing);return}J.current=!0,O.current=I.keys().next().value;let t=U?.disabled,r=null==U&&null!==M;if(t||M!==Q.current||(Z.current=!1),Z.current&&t&&M===Q.current)return;let o=G.current;if(t||r){let r=X??null;if(M===r){G.current=!1;return}let a=m.REASONS.missing;o?a=m.REASONS.initial:t&&(a=m.REASONS.disabled),e(r,a);return}o&&null!=U&&(B(M,m.REASONS.initial),G.current=!1)},[X,E,B,U,T,I,M]);let ee={orientation:h,tabActivationDirection:j},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:x,stateAttributesMapping:f});return(0,a.jsx)(g.Provider,{value:$,children:(0,a.jsx)(u.CompositeList,{elementsRef:y,children:et})})});function k(e,t,r,o){if(null==e||null==t)return"none";let a=null,n=null;for(let[r,i]of o.entries()){if(null==i)continue;let o=i.value??i.index;if(e===o&&(a=r),t===o&&(n=r),null!=a&&null!=n)break}if(null==a||null==n)return a!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let i=a.getBoundingClientRect(),l=n.getBoundingClientRect();if("horizontal"===r){if(l.lefti.left)return"right"}else{if(l.topi.top)return"down"}return"none"}var w=e.i(108868),x=e.i(788015),C=e.i(540886);let y="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,y],370359);var R=e.i(395530);let S=n.createContext(void 0);function M(){let e=n.useContext(S);if(void 0===e)throw Error((0,c.default)(65));return e}var T=e.i(647554);let E=n.forwardRef(function(e,t){let{className:r,disabled:o=!1,render:a,value:i,id:s,nativeButton:u=!0,style:c,...g}=e,{value:b,getTabPanelIdByValue:v,orientation:k,tabActivationDirection:S}=h(),{activateOnFocus:E,highlightedTabIndex:I,onTabActivation:N,registerTabResizeObserverElement:O,setHighlightedTabIndex:z,tabsListElement:P}=M(),L=(0,x.useBaseUiId)(s),D=n.useMemo(()=>({disabled:o,id:L,value:i}),[o,L,i]),{compositeProps:A,compositeRef:j,index:_}=(0,R.useCompositeItem)({metadata:D}),H=i===b,W=n.useRef(!1),F=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=F.current;if(e)return O(e)},[O]),(0,l.useIsoLayoutEffect)(()=>{if(W.current){W.current=!1;return}if(H&&_>-1&&I!==_){if(null!=P){let e=(0,T.activeElement)((0,w.ownerDocument)(P));if(e&&(0,T.contains)(P,e))return}o||z(_)}},[H,_,I,z,o,P]);let{getButtonProps:B,buttonRef:Y}=(0,C.useButton)({disabled:o,native:u,focusableWhenDisabled:!0}),K=v(i),V=n.useRef(!1),q=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:o,active:H,orientation:k,tabActivationDirection:S},ref:[t,Y,j,F],props:[A,{role:"tab","aria-controls":K,"aria-selected":H,id:L,onClick:function(e){H||o||N(i,(0,p.createChangeEventDetails)(m.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){H||(_>-1&&!o&&z(_),!o&&E&&(!V.current||V.current&&q.current)&&N(i,(0,p.createChangeEventDetails)(m.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){H||o||(V.current=!0,e.button&&0!==e.button||(q.current=!0,(0,w.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){V.current=!1,q.current=!1},{once:!0})))},[y]:H?"":void 0,onKeyDownCapture(){W.current=!0}},g,B],stateAttributesMapping:f})});var I=e.i(73364),N=e.i(802239),O=e.i(956789);function z(){return O.NOOP}function P(){return!1}function L(){return!0}let D=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var A=e.i(172410);let j={...f,activeTabPosition:()=>null,activeTabSize:()=>null},_=n.forwardRef(function(e,t){let{className:r,render:o,renderBeforeHydration:i=!1,style:l,...s}=e,{nonce:u}=(0,A.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:g,tabActivationDirection:b,value:f}=h(),{tabsListElement:p,registerIndicatorUpdateListener:m}=M(),v=(0,N.useSyncExternalStore)(z,P,L),k=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>m(k),[m,k]);let w=0,x=0,C=0,y=0,R=0,S=0,T=!1;if(null!=f&&null!=p){let e=c(f);if(null!=e){T=!0;let{width:t,height:r}=(0,I.getCssDimensions)(e),{width:o,height:a}=(0,I.getCssDimensions)(p),n=e.getBoundingClientRect(),i=p.getBoundingClientRect(),l=o>0?i.width/o:1,s=a>0?i.height/a:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=n.left-i.left,t=n.top-i.top;w=e/l+p.scrollLeft-p.clientLeft,C=t/s+p.scrollTop-p.clientTop}else w=e.offsetLeft,C=e.offsetTop;R=t,S=r,x=p.scrollWidth-w-R,y=p.scrollHeight-C-S}}let E=T?{left:w,right:x,top:C,bottom:y}:null,O=T?{width:R,height:S}:null,_=T?{[D.activeTabLeft]:`${w}px`,[D.activeTabRight]:`${x}px`,[D.activeTabTop]:`${C}px`,[D.activeTabBottom]:`${y}px`,[D.activeTabWidth]:`${R}px`,[D.activeTabHeight]:`${S}px`}:void 0,H=T&&R>0&&S>0,W=(0,d.useRenderElement)("span",e,{state:{orientation:g,activeTabPosition:E,activeTabSize:O,tabActivationDirection:b},ref:t,props:[{role:"presentation",style:_,hidden:!H},s,{suppressHydrationWarning:!0}],stateAttributesMapping:j});return null==f?null:(0,a.jsxs)(n.Fragment,{children:[W,v&&i&&(0,a.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var H=e.i(144394),W=e.i(209407),F=e.i(137584),B=e.i(223910),Y=e.i(673553);let K=((o={}).index="data-index",o.activationDirection="data-activation-direction",o.orientation="data-orientation",o.hidden="data-hidden",o[o.startingStyle=W.TransitionStatusDataAttributes.startingStyle]="startingStyle",o[o.endingStyle=W.TransitionStatusDataAttributes.endingStyle]="endingStyle",o),V={...f,...W.transitionStatusMapping},q=n.forwardRef(function(e,t){let{className:r,value:o,render:a,keepMounted:i=!1,style:s,...u}=e,{value:c,getTabIdByPanelValue:g,orientation:b,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=h(),v=(0,x.useBaseUiId)(),k=n.useMemo(()=>({id:v,value:o}),[v,o]),{ref:w,index:C}=(0,Y.useCompositeListItem)({metadata:k}),y=o===c,{mounted:R,transitionStatus:S,setMounted:M}=(0,B.useTransitionStatus)(y),T=!R,E=g(o),I=n.useRef(null),N=(0,d.useRenderElement)("div",e,{state:{hidden:T,orientation:b,tabActivationDirection:f,transitionStatus:S},ref:[t,w,I],props:[{"aria-labelledby":E,hidden:T,id:v,role:"tabpanel",tabIndex:y?0:-1,inert:(0,H.inertValue)(!y),[K.index]:C},u],stateAttributesMapping:V});return((0,F.useOpenChangeComplete)({open:y,ref:I,onComplete(){y||M(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!T||i)&&null!=v)return p(o,v),()=>{m(o,v)}},[T,i,o,v,p,m]),i||R)?N:null});var $=e.i(590803),U=e.i(828918),X=e.i(673327),G=e.i(621082);let Q=[];var Z=e.i(838452),J=e.i(872855);function ee(e){let{render:t,className:r,style:o,refs:i=O.EMPTY_ARRAY,props:c=O.EMPTY_ARRAY,state:g=O.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:b,onHighlightedIndexChange:f,orientation:p,grid:m,loopFocus:v,onLoop:k,enableHomeAndEndKeys:w,onMapChange:x,stopEventPropagation:C=!0,rootRef:R,disabledIndices:S,modifierKeys:M,highlightItemOnHover:E=!1,tag:I="div",...N}=e,{props:z,highlightedIndex:P,onHighlightedIndexChange:L,elementsRef:D,onMapChange:A,relayKeyboardEvent:j}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:o,onLoop:a,direction:i,highlightedIndex:d,onHighlightedIndexChange:u,rootRef:c,enableHomeAndEndKeys:g=!1,stopEventPropagation:h=!1,disabledIndices:b,modifierKeys:f=Q}=e,[p,m]=n.useState(0),v=null!=o,k=n.useRef(null),w=(0,U.useMergedRefs)(k,c),x=n.useRef([]),C=n.useRef(!1),R=d??p,S=(0,s.useStableCallback)((e,t=!1)=>{if((u??m)(e),t){let t=x.current[e];(0,X.scrollIntoViewIfNeeded)(k.current,t,i,r)}}),M=(0,s.useStableCallback)(e=>{if(0===e.size||C.current)return;C.current=!0;let t=Array.from(e.keys()),o=t.find(e=>e?.hasAttribute(y))??null,a=o?t.indexOf(o):-1;if(-1!==a)S(a);else if((0,G.isListIndexDisabled)(t,R,b)){let e=(0,G.findNonDisabledListIndex)(t,{disabledIndices:b});(0,G.isIndexOutOfListBounds)(t,e)||S(e)}(0,X.scrollIntoViewIfNeeded)(k.current,o,i,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==b||null!=d||!C.current)return;let e=x.current;if((0,G.isListIndexDisabled)(e,R,b)){let t=(0,G.findNonDisabledListIndex)(e,{disabledIndices:b});(0,G.isIndexOutOfListBounds)(e,t)||S(t)}},[b,d,R,x,S]);let E=(0,s.useStableCallback)((e,t,r)=>a?a(e,t,r,x):r),I=(0,s.useStableCallback)(e=>{let n=g?X.COMPOSITE_KEYS:X.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of X.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,f)||!k.current)return;let l="rtl"===i,s=l?X.ARROW_LEFT:X.ARROW_RIGHT,d={horizontal:s,vertical:X.ARROW_DOWN,both:s}[r],u=l?X.ARROW_RIGHT:X.ARROW_LEFT,c={horizontal:u,vertical:X.ARROW_UP,both:u}[r],p=(0,T.getTarget)(e.nativeEvent);if(null!=p&&(0,X.isNativeInput)(p)&&!(0,$.isElementDisabled)(p)){let t=p.selectionStart,r=p.selectionEnd,o=p.value??"";if(null==t||e.shiftKey||t!==r||e.key!==c&&t0)return}let m=R,w=(0,G.getMinListIndex)(x,b),C=(0,G.getMaxListIndex)(x,b);null!=o&&(m=o({disabledIndices:b,elementsRef:x,event:e,highlightedIndex:R,loopFocus:t,maxIndex:C,minIndex:w,onLoop:E,orientation:r,rtl:l}));let y={horizontal:[s],vertical:[X.ARROW_DOWN],both:[s,X.ARROW_DOWN]}[r],M={horizontal:[u],vertical:[X.ARROW_UP],both:[u,X.ARROW_UP]}[r],I=v?n:({horizontal:g?X.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:X.HORIZONTAL_KEYS,vertical:g?X.VERTICAL_KEYS_WITH_EXTRA_KEYS:X.VERTICAL_KEYS,both:n})[r];g&&(e.key===X.HOME?m=w:e.key===X.END&&(m=C)),m===R&&(y.includes(e.key)||M.includes(e.key))&&(t&&m===C&&y.includes(e.key)?(m=w,a&&(m=a(e,R,m,x))):t&&m===w&&M.includes(e.key)?(m=C,a&&(m=a(e,R,m,x))):m=(0,G.findNonDisabledListIndex)(x.current,{startingIndex:m,decrement:M.includes(e.key),disabledIndices:b})),m===R||(0,G.isIndexOutOfListBounds)(x.current,m)||(h&&e.stopPropagation(),I.has(e.key)&&e.preventDefault(),S(m,!0),queueMicrotask(()=>{x.current[m]?.focus()}))});return{props:{ref:w,onFocus(e){let t=k.current,r=(0,T.getTarget)(e.nativeEvent);t&&null!=r&&(0,X.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:I},highlightedIndex:R,onHighlightedIndexChange:S,elementsRef:x,disabledIndices:b,onMapChange:M,relayKeyboardEvent:I}}({grid:m,loopFocus:v,onLoop:k,orientation:p,highlightedIndex:b,onHighlightedIndexChange:f,rootRef:R,stopEventPropagation:C,enableHomeAndEndKeys:w,direction:(0,J.useDirection)(),disabledIndices:S,modifierKeys:M}),_=(0,d.useRenderElement)(I,e,{state:g,ref:i,props:[z,...c,N],stateAttributesMapping:h}),H=n.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:L,highlightItemOnHover:E,relayKeyboardEvent:j}),[P,L,E,j]);return(0,a.jsx)(Z.CompositeRootContext.Provider,{value:H,children:(0,a.jsx)(u.CompositeList,{elementsRef:D,onMapChange:e=>{x?.(e),A(e)},children:_})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:o,loopFocus:i=!0,render:d,style:u,...c}=e,{onValueChange:g,orientation:b,value:p,setTabMap:m,tabActivationDirection:v}=h(),[k,w]=n.useState(0),[x,C]=n.useState(null),y=n.useRef(new Set),R=n.useRef(new Set),M=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{y.current.forEach(e=>{e()})});return M.current=e,x&&e.observe(x),R.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),M.current=null}},[x]);let T=(0,s.useStableCallback)(e=>(y.current.add(e),()=>{y.current.delete(e)})),E=(0,s.useStableCallback)(e=>(R.current.add(e),M.current?.observe(e),()=>{R.current.delete(e),M.current?.unobserve(e)})),I=(0,s.useStableCallback)((e,t)=>{e!==p&&g(e,t)}),N=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:E,onTabActivation:I,setHighlightedTabIndex:w,tabsListElement:x}),[r,k,T,E,I,w,x]);return(0,a.jsx)(S.Provider,{value:N,children:(0,a.jsx)(ee,{render:d,className:o,style:u,state:{orientation:b,tabActivationDirection:v},refs:[t,C],props:[{"aria-orientation":"vertical"===b?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:f,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:i,orientation:b,onHighlightedIndexChange:w,onMapChange:m,disabledIndices:O.EMPTY_ARRAY})})});e.s(["Indicator",0,_,"List",0,et,"Panel",0,q,"Root",0,v,"Tab",0,E],69281);var er=e.i(69281),er=er,eo=e.i(115504);let ea=(0,eo.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,a.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,eo.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,a.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,eo.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,a.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,eo.cn)(ea({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,a.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,eo.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},466828,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(678784);let a=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var n=e.i(650056);let i={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:l})=>{let[s,d]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:s?(0,t.jsx)(o.CheckIcon,{size:16}):(0,t.jsx)(a,{size:16})}),(0,t.jsx)(n.Prism,{language:l,style:i,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],466828)},972520,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],972520)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(829087),a=e.i(480731),n=e.i(444755),i=e.i(673706),l=e.i(95779);let s={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"}},u={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:""}},c=(0,i.makeClassName)("Icon"),g=r.default.forwardRef((e,g)=>{let{icon:h,variant:b="simple",tooltip:f,size:p=a.Sizes.SM,color:m,className:v}=e,k=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),w=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.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,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.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,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(b,m),{tooltipProps:x,getReferenceProps:C}=(0,o.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([g,x.refs.setReference]),className:(0,n.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,u[b].rounded,u[b].border,u[b].shadow,u[b].ring,s[p].paddingX,s[p].paddingY,v)},C,k),r.default.createElement(o.default,Object.assign({text:f},x)),r.default.createElement(h,{className:(0,n.tremorTwMerge)(c("icon"),"shrink-0",d[p].height,d[p].width)}))});g.displayName="Icon",e.s(["default",0,g],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:o}))});e.s(["ReloadOutlined",0,n],91979)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let o=void 0!==r,[a,n]=(0,t.useState)(e);return[o?r:a,e=>{o||n(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),o=e.i(433336),a=e.i(271645),n=e.i(394487),i=e.i(503269),l=e.i(214520),s=e.i(746725),d=e.i(914189),u=e.i(144279),c=e.i(294316),g=e.i(601893),h=e.i(140721),b=e.i(942803),f=e.i(233538),p=e.i(694421),m=e.i(700020),v=e.i(35889),k=e.i(998348),w=e.i(722678);let x=(0,a.createContext)(null);x.displayName="GroupContext";let C=a.Fragment,y=Object.assign((0,m.forwardRefWithAs)(function(e,t){var C;let y=(0,a.useId)(),R=(0,b.useProvidedId)(),S=(0,g.useDisabled)(),{id:M=R||`headlessui-switch-${y}`,disabled:T=S||!1,checked:E,defaultChecked:I,onChange:N,name:O,value:z,form:P,autoFocus:L=!1,...D}=e,A=(0,a.useContext)(x),[j,_]=(0,a.useState)(null),H=(0,a.useRef)(null),W=(0,c.useSyncRefs)(H,t,null===A?null:A.setSwitch,_),F=(0,l.useDefaultValue)(I),[B,Y]=(0,i.useControllable)(E,N,null!=F&&F),K=(0,s.useDisposables)(),[V,q]=(0,a.useState)(!1),$=(0,d.useEvent)(()=>{q(!0),null==Y||Y(!B),K.nextFrame(()=>{q(!1)})}),U=(0,d.useEvent)(e=>{if((0,f.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),$()}),X=(0,d.useEvent)(e=>{e.key===k.Keys.Space?(e.preventDefault(),$()):e.key===k.Keys.Enter&&(0,p.attemptSubmit)(e.currentTarget)}),G=(0,d.useEvent)(e=>e.preventDefault()),Q=(0,w.useLabelledBy)(),Z=(0,v.useDescribedBy)(),{isFocusVisible:J,focusProps:ee}=(0,r.useFocusRing)({autoFocus:L}),{isHovered:et,hoverProps:er}=(0,o.useHover)({isDisabled:T}),{pressed:eo,pressProps:ea}=(0,n.useActivePress)({disabled:T}),en=(0,a.useMemo)(()=>({checked:B,disabled:T,hover:et,focus:J,active:eo,autofocus:L,changing:V}),[B,et,J,eo,T,V,L]),ei=(0,m.mergeProps)({id:M,ref:W,role:"switch",type:(0,u.useResolveButtonType)(e,j),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":Q,"aria-describedby":Z,disabled:T||void 0,autoFocus:L,onClick:U,onKeyUp:X,onKeyPress:G},ee,er,ea),el=(0,a.useCallback)(()=>{if(void 0!==F)return null==Y?void 0:Y(F)},[Y,F]),es=(0,m.useRender)();return a.default.createElement(a.default.Fragment,null,null!=O&&a.default.createElement(h.FormFields,{disabled:T,data:{[O]:z||"on"},overrides:{type:"checkbox",checked:B},form:P,onReset:el}),es({ourProps:ei,theirProps:D,slot:en,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,o]=(0,a.useState)(null),[n,i]=(0,w.useLabels)(),[l,s]=(0,v.useDescriptions)(),d=(0,a.useMemo)(()=>({switch:r,setSwitch:o}),[r,o]),u=(0,m.useRender)();return a.default.createElement(s,{name:"Switch.Description",value:l},a.default.createElement(i,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},a.default.createElement(x.Provider,{value:d},u({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:w.Label,Description:v.Description});var R=e.i(888288),S=e.i(95779),M=e.i(444755),T=e.i(673706),E=e.i(829087);let I=(0,T.makeClassName)("Switch"),N=a.default.forwardRef((e,r)=>{let{checked:o,defaultChecked:n=!1,onChange:i,color:l,name:s,error:d,errorMessage:u,disabled:c,required:g,tooltip:h,id:b}=e,f=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p={bgColor:l?(0,T.getColorClassNames)(l,S.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,T.getColorClassNames)(l,S.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[m,v]=(0,R.default)(n,o),[k,w]=(0,a.useState)(!1),{tooltipProps:x,getReferenceProps:C}=(0,E.useTooltip)(300);return a.default.createElement("div",{className:"flex flex-row items-center justify-start"},a.default.createElement(E.default,Object.assign({text:h},x)),a.default.createElement("div",Object.assign({ref:(0,T.mergeRefs)([r,x.refs.setReference]),className:(0,M.tremorTwMerge)(I("root"),"flex flex-row relative h-5")},f,C),a.default.createElement("input",{type:"checkbox",className:(0,M.tremorTwMerge)(I("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:g,checked:m,onChange:e=>{e.preventDefault()}}),a.default.createElement(y,{checked:m,onChange:e=>{v(e),null==i||i(e)},disabled:c,className:(0,M.tremorTwMerge)(I("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",c?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:b},a.default.createElement("span",{className:(0,M.tremorTwMerge)(I("sr-only"),"sr-only")},"Switch ",m?"on":"off"),a.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(I("background"),m?p.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")}),a.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(I("round"),m?(0,M.tremorTwMerge)(p.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",k?(0,M.tremorTwMerge)("ring-2",p.ringColor):"")}))),d&&u?a.default.createElement("p",{className:(0,M.tremorTwMerge)(I("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});N.displayName="Switch",e.s(["Switch",0,N],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(174553);e.s(["ProviderLogo",0,({provider:e,className:o="w-4 h-4"})=>(0,t.jsx)(r.Logo,{provider:e,className:o})])},368670,e=>{"use strict";var t=e.i(602869),r=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},389543,e=>{"use strict";var t=e.i(843476),r=e.i(863679),o=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userRole:a,userId:n}=(0,o.default)();return(0,t.jsx)(r.default,{userID:n,userRole:a,accessToken:e})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js b/litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js
deleted file mode 100644
index 6684b00616e..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js
+++ /dev/null
@@ -1 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,788699,a=>{"use strict";let e=(0,a.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);a.s(["Pencil",0,e],788699)},332102,a=>{"use strict";let e=(0,a.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);a.s(["Inbox",0,e],332102)},515288,a=>{"use strict";var e=a.i(843476),t=a.i(271645),r=a.i(115504);let d=t.forwardRef(({className:a,size:t="default",...d},s)=>(0,e.jsx)("div",{ref:s,"data-slot":"card","data-size":t,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...d}));d.displayName="Card";let s=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...t}));s.displayName="CardHeader";let i=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-title",className:(0,r.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",a),...t}));i.displayName="CardTitle";let l=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",a),...t}));l.displayName="CardDescription";let c=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...t}));c.displayName="CardAction";let o=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",a),...t}));o.displayName="CardContent";let n=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",a),...t}));n.displayName="CardFooter",a.s(["Card",0,d,"CardAction",0,c,"CardContent",0,o,"CardDescription",0,l,"CardFooter",0,n,"CardHeader",0,s,"CardTitle",0,i])},879664,a=>{"use strict";let e=(0,a.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["default",0,e])},952571,a=>{"use strict";var e=a.i(879664);a.s(["Info",()=>e.default])},180127,a=>{"use strict";let e=(0,a.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["default",0,e])},871689,a=>{"use strict";var e=a.i(180127);a.s(["ArrowLeft",()=>e.default])},123287,a=>{"use strict";let e=(0,a.i(475254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);a.s(["default",0,e])},595468,a=>{"use strict";var e=a.i(123287);a.s(["CheckCircle2",()=>e.default])},582458,a=>{"use strict";let e=(0,a.i(475254).default)("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"}]]);a.s(["default",0,e])},878894,a=>{"use strict";var e=a.i(582458);a.s(["AlertTriangle",()=>e.default])},764453,a=>{a.q("/litellm-asset-prefix/_next/static/media/dataforseo.1g2jptyl8rcb1.png")},341367,a=>{a.q("/litellm-asset-prefix/_next/static/media/exa_ai.36h3hrkelbgj-.png")},732731,a=>{a.q("/litellm-asset-prefix/_next/static/media/google_pse.3hii8gkiytuod.png")},911676,a=>{a.q("/litellm-asset-prefix/_next/static/media/parallel_ai.0jx5g5pf0u355.png")},692745,a=>{a.q("/litellm-asset-prefix/_next/static/media/perplexity.2zhky1a8ufk3x.png")},380084,a=>{a.q("/litellm-asset-prefix/_next/static/media/tavily.15dorlkyzxydf.png")}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0nobv49ll5nyv.js b/litellm/proxy/_experimental/out/_next/static/chunks/0nobv49ll5nyv.js
new file mode 100644
index 00000000000..688a61a6b83
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0nobv49ll5nyv.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),s=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:a=0,side:n="bottom",sideOffset:i=4,className:l,...o}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:a,side:n,sideOffset:i,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,s.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...o})})})},"DropdownMenuItem",0,function({className:e,inset:a,variant:n="default",...i}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:(0,s.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})},"DropdownMenuSeparator",0,function({className:e,...a}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,s.cn)("-mx-1 my-1 h-px bg-border",e),...a})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,s,a){let[n,i,l]=(0,t.useDebouncedState)(e,s,a);return(0,r.useEffect)(()=>{i(e)},[e,i]),[n,l]}])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(353753),s=e.i(115504),a=e.i(519455),n=e.i(995926);function i({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...a}){return(0,t.jsx)(r.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,s.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:o,showCloseButton:d=!0,...c}){return(0,t.jsxs)(i,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(r.Dialog.Popup,{"data-slot":"dialog-content",className:(0,s.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[o,d&&(0,t.jsxs)(r.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(a.Button,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...a}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"dialog-description",className:(0,s.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:i,...l}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,s.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...l,children:[i,n&&(0,t.jsx)(r.Dialog.Close,{render:(0,t.jsx)(a.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("flex flex-col gap-2",e),...r})},"DialogTitle",0,function({className:e,...a}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"dialog-title",className:(0,s.cn)("leading-none font-medium",e),...a})}])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:s}))});e.s(["CalendarOutlined",0,n],72713)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},502547,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,r],502547)},953960,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(599724),a=e.i(389083);let n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});var i=e.i(871943),l=e.i(502547),o=e.i(592968),d=e.i(602869),c=e.i(234713);e.s(["default",0,function({mcpServers:e,mcpAccessGroups:u=[],mcpToolPermissions:m={},mcpToolsets:h=[],accessToken:f}){let[p,g]=(0,r.useState)([]),[v,x]=(0,r.useState)([]),[b,y]=(0,r.useState)(new Set),[w,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(f&&e.length>0)try{let e=await (0,d.fetchMCPServers)(f);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[f,e.length]),(0,r.useEffect)(()=>{(async()=>{if(f&&h.length>0)try{let e=await (0,d.fetchMCPToolsets)(f),t=Array.isArray(e)?e.filter(e=>h.includes(e.toolset_id)):[];x(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[f,h.length]);let S=e.includes(c.NO_MCP_SERVERS_SENTINEL),_=e.includes(c.ALL_PROXY_MCP_SERVERS_SENTINEL),C=[...e.filter(e=>e!==c.NO_MCP_SERVERS_SENTINEL&&e!==c.ALL_PROXY_MCP_SERVERS_SENTINEL).map(e=>({type:"server",value:e})),...u.map(e=>({type:"accessGroup",value:e}))],k=C.length+h.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(a.Badge,{color:S?"red":"blue",size:"xs",children:S?"Blocked":_?"All":k})]}),S?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-red-400"}),(0,t.jsx)(s.Text,{className:"text-red-700 text-sm",children:"No MCP servers — this key is blocked from all MCP servers, including its team's servers"})]}):_?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-blue-400"}),(0,t.jsx)(s.Text,{className:"text-blue-700 text-sm",children:"All Proxy MCP Servers"})]}):k>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[C.map((e,r)=>{let s="server"===e.type?m[e.value]:void 0,a=s&&s.length>0,n=b.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return a&&(t=e.value,void y(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${a?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(o.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=p.find(t=>t.server_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias||t.server_name||e} (${r})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded-sm uppercase tracking-wide shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:s.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===s.length?"tool":"tools"}),n?(0,t.jsx)(i.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(l.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&n&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.map((e,r)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},r))})})]},r)}),h.length>0&&h.map((e,r)=>{let s=v.find(t=>t.toolset_id===e),a=w.has(e),n=s?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>n>0&&void j(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${n>0?"cursor-pointer hover:bg-purple-50 hover:border-purple-300":"bg-white"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:s?.toolset_name??e}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-purple-600 bg-purple-50 border border-purple-200 rounded-sm uppercase tracking-wide shrink-0",children:"Toolset"})]}),n>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:n}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===n?"tool":"tools"}),a?(0,t.jsx)(i.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(l.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),n>0&&a&&s&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-purple-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.tools.map((e,r)=>(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-purple-50 border border-purple-200 text-purple-800 text-xs font-medium",children:[(0,t.jsxs)("span",{className:"text-purple-400 mr-1 text-[10px]",children:[e.server_id.slice(0,6),"…"]}),e.tool_name]},r))})})]},`toolset-${r}`)})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})}],953960)},384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),s=e.i(271645),a=e.i(389083);let n=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});var i=e.i(602869);let l=function({vectorStores:e,accessToken:l}){let[o,d]=(0,s.useState)([]);return(0,s.useEffect)(()=>{(async()=>{if(l&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(l);e.data&&d(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[l,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(a.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,r)=>{let s;return(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:(s=o.find(t=>t.vector_store_id===e))?`${s.vector_store_name||s.vector_store_id} (${s.vector_store_id})`:e},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})};var o=e.i(953960);let d=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});var c=e.i(592968);let u=function({agents:e,agentAccessGroups:n=[],accessToken:l}){let[o,u]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(l&&e.length>0)try{let e=await (0,i.getAgentsList)(l);e&&e.agents&&Array.isArray(e.agents)&&u(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[l,e.length]);let m=[...e.map(e=>({type:"agent",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],h=m.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.Badge,{color:"purple",size:"xs",children:h})]}),h>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:m.map((e,r)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(c.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=o.find(t=>t.agent_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${r})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded-sm uppercase tracking-wide shrink-0",children:"Group"})]})})})},r))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(d,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:s="card",className:a="",accessToken:n}){let i=e?.vector_stores||[],d=e?.mcp_servers||[],c=e?.mcp_access_groups||[],m=e?.mcp_tool_permissions||{},h=e?.mcp_toolsets||[],f=e?.agents||[],p=e?.agent_access_groups||[],g=e?.search_tools||[],v=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(l,{vectorStores:i,accessToken:n}),(0,t.jsx)(o.default,{mcpServers:d,mcpAccessGroups:c,mcpToolPermissions:m,mcpToolsets:h,accessToken:n}),(0,t.jsx)(u,{agents:f,agentAccessGroups:p,accessToken:n}),(0,t.jsxs)("div",{className:"rounded-md border border-gray-100 p-4",children:[(0,t.jsx)(r.Text,{className:"text-sm font-medium text-gray-800",children:"Search tools"}),0===g.length?(0,t.jsx)(r.Text,{className:"mt-1 block text-xs text-gray-500",children:"No restriction — all configured search tools are allowed for this team."}):(0,t.jsx)(r.Text,{className:"mt-1 block text-xs text-gray-700",children:g.join(", ")})]})]});return"card"===s?(0,t.jsxs)("div",{className:`@container bg-white border border-gray-200 rounded-lg p-6 ${a}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),v]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),v]})}],384767)},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(602869);e.s(["default",0,({onChange:e,value:n,className:i,accessToken:l,disabled:o})=>{let[d,c]=(0,r.useState)([]),[u,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(l){m(!0);try{let e=await (0,a.getGuardrailsList)(l);e.guardrails&&c(e.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[l]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{e(t)},value:n,loading:u,className:i,allowClear:!0,options:d.map(e=>({label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(602869);function n(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${s})${e.description?` — ${e.description}`:""}`,value:"production"===s?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:l,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[u,m]=(0,r.useState)([]),[h,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(m(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[o,c]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:d,placeholder:d?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:h,className:l,allowClear:!0,options:n(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",0,n])},595727,234662,677241,281092,688594,e=>{"use strict";let t=Symbol.for("constructDateFrom");function r(e,r){return"function"==typeof e?e(r):e&&"object"==typeof e&&t in e?e[t](r):e instanceof Date?new e.constructor(r):new Date(r)}function s(e,t){return r(t||e,e)}e.s(["constructFromSymbol",0,t,"millisecondsInDay",0,864e5,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInSecond",0,1e3,"millisecondsInWeek",0,6048e5],234662),e.s(["constructFrom",0,r],677241),e.s(["toDate",0,s],281092),e.s(["addDays",0,function(e,t,a){let n=s(e,a?.in);return isNaN(t)?r(a?.in||e,NaN):(t&&n.setDate(n.getDate()+t),n)}],595727),e.s(["addMonths",0,function(e,t,a){let n=s(e,a?.in);if(isNaN(t))return r(a?.in||e,NaN);if(!t)return n;let i=n.getDate(),l=r(a?.in||e,n.getTime());return(l.setMonth(n.getMonth()+t+1,0),i>=l.getDate())?l:(n.setFullYear(l.getFullYear(),l.getMonth(),i),n)}],688594)},24529,e=>{"use strict";var t=e.i(595727),r=e.i(688594),s=e.i(677241),a=e.i(281092);function n(e,n,i){let{years:l=0,months:o=0,weeks:d=0,days:c=0,hours:u=0,minutes:m=0,seconds:h=0}=n,f=(0,a.toDate)(e,i?.in),p=o||l?(0,r.addMonths)(f,o+12*l):f,g=c||d?(0,t.addDays)(p,c+7*d):p;return(0,s.constructFrom)(i?.in||e,+g+1e3*(h+60*(m+60*u)))}let i=/[zZ]$|[+-]\d{2}:?\d{2}$/;function l(e){return Date.parse(i.test(e)?e:`${e}Z`)}e.s(["calculateExpiryPreviewFromDuration",0,function(e){if(!e)return null;try{let t,r=parseInt(e);if(Number.isNaN(r))throw Error("Invalid duration format");let s=new Date;if(e.endsWith("mo"))t=n(s,{months:r});else if(e.endsWith("s"))t=n(s,{seconds:r});else if(e.endsWith("m"))t=n(s,{minutes:r});else if(e.endsWith("h"))t=n(s,{hours:r});else if(e.endsWith("d"))t=n(s,{days:r});else if(e.endsWith("w"))t=n(s,{weeks:r});else throw Error("Invalid duration format");return t.toLocaleString()}catch{return null}},"formatExpiresUtc",0,function(e){let t=l(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()},"isKeyExpired",0,function(e){if(!e)return!1;let t=l(e);return!Number.isNaN(t)&&t{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(115504);let a=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("textarea",{ref:a,"data-slot":"textarea",className:(0,s.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));a.displayName="Textarea",e.s(["Textarea",0,a])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(115504),a=e.i(519455),n=e.i(793479),i=e.i(624687);let l=(0,s.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,s.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:n="ghost",size:i="xs",...l},d)=>(0,t.jsx)(a.Button,{ref:d,type:r,"data-size":i,variant:n,className:(0,s.cn)(o({size:i}),e),...l}));d.displayName="InputGroupButton";let c=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(n.Input,{ref:a,"data-slot":"input-group-control",className:(0,s.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));c.displayName="InputGroupInput",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(i.Textarea,{ref:a,"data-slot":"input-group-control",className:(0,s.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,s.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...a}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,s.cn)(l({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...a})},"InputGroupButton",0,d,"InputGroupInput",0,c,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,s.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let s=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:a,onValueChange:n,placeholder:i="Select…",emptyText:l="No results",disabled:o=!1,className:d}){let c=e.find(e=>e.value===a)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:c,onValueChange:e=>n(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:s,disabled:o,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:i,showClear:null!=a&&""!==a,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:l}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},611363,e=>{"use strict";e.s(["navigateWithParams",0,function(e,t="push"){let r=new URLSearchParams(window.location.search);e(r);let s=r.toString(),a=s?`${window.location.pathname}?${s}`:window.location.pathname;"replace"===t?window.history.replaceState(null,"",a):window.history.pushState(null,"",a)}])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:s}))});e.s(["SaveOutlined",0,n],987432)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:s}))});e.s(["MinusCircleOutlined",0,n],564897)},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",s="hour",a="week",n="month",i="quarter",l="year",o="date",d="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m=function(e,t,r){var s=String(e);return!s||s.length>=t?e:""+Array(t+1-s.length).join(r)+e},h="en",f={};f[h]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var p="$isDayjsObject",g=function(e){return e instanceof y||!(!e||!e[p])},v=function e(t,r,s){var a;if(!t)return h;if("string"==typeof t){var n=t.toLowerCase();f[n]&&(a=n),r&&(f[n]=r,a=n);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var l=t.name;f[l]=t,a=l}return!s&&a&&(h=a),a||!s&&h},x=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new y(r)},b={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(r/60),2,"0")+":"+m(r%60,2,"0")},m:function e(t,r){if(t.date(){"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),s=e.i(271645);e.s(["default",0,e=>{var t=(0,r.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),s.default.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"}))}],446428);var a=e.i(746725),n=e.i(914189),i=e.i(553521),l=e.i(835696),o=e.i(941444),d=e.i(178677),c=e.i(294316),u=e.i(83733),m=e.i(233137),h=e.i(732607),f=e.i(397701),p=e.i(700020);function g(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:j)!==s.Fragment||1===s.default.Children.count(e.children)}let v=(0,s.createContext)(null);v.displayName="TransitionContext";var x=((t=x||{}).Visible="visible",t.Hidden="hidden",t);let b=(0,s.createContext)(null);function y(e){return"children"in e?y(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function w(e,t){let r=(0,o.useLatestValue)(e),l=(0,s.useRef)([]),d=(0,i.useIsMounted)(),c=(0,a.useDisposables)(),u=(0,n.useEvent)((e,t=p.RenderStrategy.Hidden)=>{let s=l.current.findIndex(({el:t})=>t===e);-1!==s&&((0,f.match)(t,{[p.RenderStrategy.Unmount](){l.current.splice(s,1)},[p.RenderStrategy.Hidden](){l.current[s].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&d.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,n.useEvent)(e=>{let t=l.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):l.current.push({el:e,state:"visible"}),()=>u(e,p.RenderStrategy.Unmount)}),h=(0,s.useRef)([]),g=(0,s.useRef)(Promise.resolve()),v=(0,s.useRef)({enter:[],leave:[]}),x=(0,n.useEvent)((e,r,s)=>{h.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(([t])=>t!==e)),null==t||t.chains.current[r].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(v.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?g.current=g.current.then(()=>null==t?void 0:t.wait.current).then(()=>s(r)):s(r)}),b=(0,n.useEvent)((e,t,r)=>{Promise.all(v.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>r(t))});return(0,s.useMemo)(()=>({children:l,register:m,unregister:u,onStart:x,onStop:b,wait:g,chains:v}),[m,u,l,x,b,v,g])}b.displayName="NestingContext";let j=s.Fragment,S=p.RenderFeatures.RenderStrategy,_=(0,p.forwardRefWithAs)(function(e,t){let{show:r,appear:a=!1,unmount:i=!0,...o}=e,u=(0,s.useRef)(null),h=g(e),f=(0,c.useSyncRefs)(...h?[u,t]:null===t?[]:[t]);(0,d.useServerHandoffComplete)();let x=(0,m.useOpenClosed)();if(void 0===r&&null!==x&&(r=(x&m.State.Open)===m.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,_]=(0,s.useState)(r?"visible":"hidden"),k=w(()=>{r||_("hidden")}),[N,M]=(0,s.useState)(!0),E=(0,s.useRef)([r]);(0,l.useIsoMorphicEffect)(()=>{!1!==N&&E.current[E.current.length-1]!==r&&(E.current.push(r),M(!1))},[E,r]);let T=(0,s.useMemo)(()=>({show:r,appear:a,initial:N}),[r,a,N]);(0,l.useIsoMorphicEffect)(()=>{r?_("visible"):y(k)||null===u.current||_("hidden")},[r,k]);let R={unmount:i},z=(0,n.useEvent)(()=>{var t;N&&M(!1),null==(t=e.beforeEnter)||t.call(e)}),$=(0,n.useEvent)(()=>{var t;N&&M(!1),null==(t=e.beforeLeave)||t.call(e)}),O=(0,p.useRender)();return s.default.createElement(b.Provider,{value:k},s.default.createElement(v.Provider,{value:T},O({ourProps:{...R,as:s.Fragment,children:s.default.createElement(C,{ref:f,...R,...o,beforeEnter:z,beforeLeave:$})},theirProps:{},defaultTag:s.Fragment,features:S,visible:"visible"===j,name:"Transition"})))}),C=(0,p.forwardRefWithAs)(function(e,t){var r,a;let{transition:i=!0,beforeEnter:o,afterEnter:x,beforeLeave:_,afterLeave:C,enter:k,enterFrom:N,enterTo:M,entered:E,leave:T,leaveFrom:R,leaveTo:z,...$}=e,[O,D]=(0,s.useState)(null),I=(0,s.useRef)(null),L=g(e),P=(0,c.useSyncRefs)(...L?[I,t,D]:null===t?[]:[t]),F=null==(r=$.unmount)||r?p.RenderStrategy.Unmount:p.RenderStrategy.Hidden,{show:A,appear:H,initial:B}=function(){let e=(0,s.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[V,U]=(0,s.useState)(A?"visible":"hidden"),W=function(){let e=(0,s.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:G,unregister:Y}=W;(0,l.useIsoMorphicEffect)(()=>G(I),[G,I]),(0,l.useIsoMorphicEffect)(()=>{if(F===p.RenderStrategy.Hidden&&I.current)return A&&"visible"!==V?void U("visible"):(0,f.match)(V,{hidden:()=>Y(I),visible:()=>G(I)})},[V,I,G,Y,A,F]);let q=(0,d.useServerHandoffComplete)();(0,l.useIsoMorphicEffect)(()=>{if(L&&q&&"visible"===V&&null===I.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[I,V,q,L]);let K=B&&!H,Q=H&&A&&B,X=(0,s.useRef)(!1),Z=w(()=>{X.current||(U("hidden"),Y(I))},W),J=(0,n.useEvent)(e=>{X.current=!0,Z.onStart(I,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==_||_())})}),ee=(0,n.useEvent)(e=>{let t=e?"enter":"leave";X.current=!1,Z.onStop(I,t,e=>{"enter"===e?null==x||x():"leave"===e&&(null==C||C())}),"leave"!==t||y(Z)||(U("hidden"),Y(I))});(0,s.useEffect)(()=>{L&&i||(J(A),ee(A))},[A,L,i]);let et=!(!i||!L||!q||K),[,er]=(0,u.useTransition)(et,O,A,{start:J,end:ee}),es=(0,p.compact)({ref:P,className:(null==(a=(0,h.classNames)($.className,Q&&k,Q&&N,er.enter&&k,er.enter&&er.closed&&N,er.enter&&!er.closed&&M,er.leave&&T,er.leave&&!er.closed&&R,er.leave&&er.closed&&z,!er.transition&&A&&E))?void 0:a.trim())||void 0,...(0,u.transitionDataAttributes)(er)}),ea=0;"visible"===V&&(ea|=m.State.Open),"hidden"===V&&(ea|=m.State.Closed),er.enter&&(ea|=m.State.Opening),er.leave&&(ea|=m.State.Closing);let en=(0,p.useRender)();return s.default.createElement(b.Provider,{value:Z},s.default.createElement(m.OpenClosedProvider,{value:ea},en({ourProps:es,theirProps:$,defaultTag:j,features:S,visible:"visible"===V,name:"Transition.Child"})))}),k=(0,p.forwardRefWithAs)(function(e,t){let r=null!==(0,s.useContext)(v),a=null!==(0,m.useOpenClosed)();return s.default.createElement(s.default.Fragment,null,!r&&a?s.default.createElement(_,{ref:t,...e}):s.default.createElement(C,{ref:t,...e}))}),N=Object.assign(_,{Child:k,Root:_});e.s(["Transition",0,N],854056)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let s=void 0!==r,[a,n]=(0,t.useState)(e);return[s?r:a,e=>{s||n(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),s=e.i(433336),a=e.i(271645),n=e.i(394487),i=e.i(503269),l=e.i(214520),o=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),f=e.i(942803),p=e.i(233538),g=e.i(694421),v=e.i(700020),x=e.i(35889),b=e.i(998348),y=e.i(722678);let w=(0,a.createContext)(null);w.displayName="GroupContext";let j=a.Fragment,S=Object.assign((0,v.forwardRefWithAs)(function(e,t){var j;let S=(0,a.useId)(),_=(0,f.useProvidedId)(),C=(0,m.useDisabled)(),{id:k=_||`headlessui-switch-${S}`,disabled:N=C||!1,checked:M,defaultChecked:E,onChange:T,name:R,value:z,form:$,autoFocus:O=!1,...D}=e,I=(0,a.useContext)(w),[L,P]=(0,a.useState)(null),F=(0,a.useRef)(null),A=(0,u.useSyncRefs)(F,t,null===I?null:I.setSwitch,P),H=(0,l.useDefaultValue)(E),[B,V]=(0,i.useControllable)(M,T,null!=H&&H),U=(0,o.useDisposables)(),[W,G]=(0,a.useState)(!1),Y=(0,d.useEvent)(()=>{G(!0),null==V||V(!B),U.nextFrame(()=>{G(!1)})}),q=(0,d.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),Y()}),K=(0,d.useEvent)(e=>{e.key===b.Keys.Space?(e.preventDefault(),Y()):e.key===b.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),Q=(0,d.useEvent)(e=>e.preventDefault()),X=(0,y.useLabelledBy)(),Z=(0,x.useDescribedBy)(),{isFocusVisible:J,focusProps:ee}=(0,r.useFocusRing)({autoFocus:O}),{isHovered:et,hoverProps:er}=(0,s.useHover)({isDisabled:N}),{pressed:es,pressProps:ea}=(0,n.useActivePress)({disabled:N}),en=(0,a.useMemo)(()=>({checked:B,disabled:N,hover:et,focus:J,active:es,autofocus:O,changing:W}),[B,et,J,es,N,W,O]),ei=(0,v.mergeProps)({id:k,ref:A,role:"switch",type:(0,c.useResolveButtonType)(e,L),tabIndex:-1===e.tabIndex?0:null!=(j=e.tabIndex)?j:0,"aria-checked":B,"aria-labelledby":X,"aria-describedby":Z,disabled:N||void 0,autoFocus:O,onClick:q,onKeyUp:K,onKeyPress:Q},ee,er,ea),el=(0,a.useCallback)(()=>{if(void 0!==H)return null==V?void 0:V(H)},[V,H]),eo=(0,v.useRender)();return a.default.createElement(a.default.Fragment,null,null!=R&&a.default.createElement(h.FormFields,{disabled:N,data:{[R]:z||"on"},overrides:{type:"checkbox",checked:B},form:$,onReset:el}),eo({ourProps:ei,theirProps:D,slot:en,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,s]=(0,a.useState)(null),[n,i]=(0,y.useLabels)(),[l,o]=(0,x.useDescriptions)(),d=(0,a.useMemo)(()=>({switch:r,setSwitch:s}),[r,s]),c=(0,v.useRender)();return a.default.createElement(o,{name:"Switch.Description",value:l},a.default.createElement(i,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},a.default.createElement(w.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:j,name:"Switch.Group"}))))},Label:y.Label,Description:x.Description});var _=e.i(888288),C=e.i(95779),k=e.i(444755),N=e.i(673706),M=e.i(829087);let E=(0,N.makeClassName)("Switch"),T=a.default.forwardRef((e,r)=>{let{checked:s,defaultChecked:n=!1,onChange:i,color:l,name:o,error:d,errorMessage:c,disabled:u,required:m,tooltip:h,id:f}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:l?(0,N.getColorClassNames)(l,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,N.getColorClassNames)(l,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,x]=(0,_.default)(n,s),[b,y]=(0,a.useState)(!1),{tooltipProps:w,getReferenceProps:j}=(0,M.useTooltip)(300);return a.default.createElement("div",{className:"flex flex-row items-center justify-start"},a.default.createElement(M.default,Object.assign({text:h},w)),a.default.createElement("div",Object.assign({ref:(0,N.mergeRefs)([r,w.refs.setReference]),className:(0,k.tremorTwMerge)(E("root"),"flex flex-row relative h-5")},p,j),a.default.createElement("input",{type:"checkbox",className:(0,k.tremorTwMerge)(E("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:v,onChange:e=>{e.preventDefault()}}),a.default.createElement(S,{checked:v,onChange:e=>{x(e),null==i||i(e)},disabled:u,className:(0,k.tremorTwMerge)(E("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>y(!0),onBlur:()=>y(!1),id:f},a.default.createElement("span",{className:(0,k.tremorTwMerge)(E("sr-only"),"sr-only")},"Switch ",v?"on":"off"),a.default.createElement("span",{"aria-hidden":"true",className:(0,k.tremorTwMerge)(E("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")}),a.default.createElement("span",{"aria-hidden":"true",className:(0,k.tremorTwMerge)(E("round"),v?(0,k.tremorTwMerge)(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,k.tremorTwMerge)("ring-2",g.ringColor):"")}))),d&&c?a.default.createElement("p",{className:(0,k.tremorTwMerge)(E("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});T.displayName="Switch",e.s(["Switch",0,T],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(174553);e.s(["ProviderLogo",0,({provider:e,className:s="w-4 h-4"})=>(0,t.jsx)(r.Logo,{provider:e,className:s})])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:s}))});e.s(["ReloadOutlined",0,n],91979)},368670,e=>{"use strict";var t=e.i(602869),r=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),s=e.i(829087),a=e.i(480731),n=e.i(444755),i=e.i(673706),l=e.i(95779);let o={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"}},c={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:""}},u=(0,i.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:h,variant:f="simple",tooltip:p,size:g=a.Sizes.SM,color:v,className:x}=e,b=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.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,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.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,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(f,v),{tooltipProps:w,getReferenceProps:j}=(0,s.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([m,w.refs.setReference]),className:(0,n.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,c[f].rounded,c[f].border,c[f].shadow,c[f].ring,o[g].paddingX,o[g].paddingY,x)},j,b),r.default.createElement(s.default,Object.assign({text:p},w)),r.default.createElement(h,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[g].height,d[g].width)}))});m.displayName="Icon",e.s(["default",0,m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},434626,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,r],434626)},902555,e=>{"use strict";var t=e.i(843476),r=e.i(591935),s=e.i(122577),a=e.i(278587),n=e.i(68155),i=e.i(360820),l=e.i(871943),o=e.i(434626),d=e.i(271645);let c=d.forwardRef(function(e,t){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});var u=e.i(592968),m=e.i(115504),h=e.i(752978);function f({icon:e,onClick:r,className:s,disabled:a,dataTestId:n}){return a?(0,t.jsx)(h.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":n}):(0,t.jsx)(h.Icon,{icon:e,size:"sm",onClick:r,className:(0,m.cx)("cursor-pointer",s),"data-testid":n})}let p={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:n.TrashIcon,className:"hover:text-red-600"},Test:{icon:s.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:a.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:l.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:c,className:"hover:text-blue-600"}};e.s(["default",0,function({onClick:e,tooltipText:r,disabled:s=!1,disabledTooltipText:a,dataTestId:n,variant:i}){let{icon:l,className:o}=p[i];return(0,t.jsx)(u.Tooltip,{title:s?a:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(f,{icon:l,onClick:e,className:o,disabled:s,dataTestId:n})})})}],902555)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),s=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:n}=(0,t.default)();return(0,s.useQuery)({queryKey:a.detail(n),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&n)})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),s=e.i(109799),a=e.i(785242),n=e.i(738014),i=e.i(199133),l=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},c={label:"No Default Models",value:"no-default-models"},u=[d,c],m={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["MODEL_SENTINEL_OPTIONS",0,u,"ModelSelect",0,e=>{let{teamID:h,organizationID:f,options:p,context:g,dataTestId:v,value:x=[],onChange:b,style:y}=e,{includeUserModels:w,showAllTeamModelsOption:j,showAllProxyModelsOverride:S,includeSpecialOptions:_}=p||{},{data:C,isLoading:k}=(0,r.useAllProxyModels)(),{data:N,isLoading:M}=(0,a.useTeam)(h),{data:E,isLoading:T}=(0,s.useOrganization)(f),{data:R,isLoading:z}=(0,n.useCurrentUser)(),$=e=>u.some(t=>t.value===e),O=x.some($),D=E?.models.includes(d.value)||E?.models.length===0;if(k||M||T||z)return(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0});let{wildcard:I,regular:L}=(e=>{let t=[],r=[];for(let s of e)s.endsWith("/*")?t.push(s):r.push(s);return{wildcard:t,regular:r}})(((e,t,r)=>{let s=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return s;let a=m[t.context];return a?a({allProxyModels:s,...r,options:t.options}):[]})(C?.data??[],e,{selectedTeam:N,selectedOrganization:E,userModels:R?.models}));return(0,t.jsx)(i.Select,{"data-testid":v,value:x,onChange:e=>{let t=e.filter($);b(t.length>0?[t[t.length-1]]:e)},style:y,options:[..._?[{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...S||D&&_||"global"===g?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>$(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:x.length>0&&x.some(e=>$(e)&&e!==c.value),key:c.value}]}]:[],...I.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:I.map(e=>{let r=e.replace("/*",""),s=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${s} models`}),value:e,disabled:O}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:L.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:O}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},907308,276173,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(212931),a=e.i(808613),n=e.i(464571),i=e.i(199133),l=e.i(592968),o=e.i(560445),d=e.i(213205),c=e.i(343488),u=e.i(602869),m=e.i(741466);e.s(["default",0,({isVisible:e,onCancel:h,onSubmit:f,accessToken:p,title:g="Add Team Member",roles:v=[{label:"admin",value:"admin",description:"Admin role. Can create team keys, add members, and manage settings."},{label:"user",value:"user",description:"User role. Can view team info, but not manage it."}],defaultRole:x="user",teamId:b})=>{let[y]=a.Form.useForm(),[w,j]=(0,r.useState)([]),[S,_]=(0,r.useState)(!1),[C,k]=(0,r.useState)("user_email"),[N,M]=(0,r.useState)(!1),E=async(e,t)=>{if(!e)return void j([]);_(!0);try{let r=new URLSearchParams;if(r.append(t,e),b&&r.append("team_id",b),null==p)return;let s=(await (0,u.userFilterUICall)(p,r)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));j(s)}catch(e){console.error("Error fetching users:",e)}finally{_(!1)}},T=(0,c.useDebouncedCallback)((e,t)=>E(e,t),{wait:m.DEBOUNCE_WAIT_MS}),R=(e,t)=>{k(t),T(e,t)},z=(e,t)=>{let r=t.user;y.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:y.getFieldValue("role")})},$=async e=>{M(!0);try{await f(e)}finally{M(!1)}};return(0,t.jsx)(s.Modal,{title:g,open:e,onCancel:()=>{y.resetFields(),j([]),h()},footer:null,width:800,maskClosable:!N,children:(0,t.jsxs)(a.Form,{form:y,onFinish:$,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(o.Alert,{type:"info",showIcon:!0,className:"mb-4",message:"Search selects from users that already exist. To add someone new, ask a proxy admin to create their account first.","data-testid":"member-existing-users-notice"}),(0,t.jsx)(a.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>R(e,"user_email"),onSelect:(e,t)=>z(e,t),options:"user_email"===C?w:[],loading:S,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(a.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>R(e,"user_id"),onSelect:(e,t)=>z(e,t),options:"user_id"===C?w:[],loading:S,allowClear:!0})}),(0,t.jsx)(a.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(i.Select,{defaultValue:x,children:v.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:(0,t.jsxs)(l.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(n.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(d.UserAddOutlined,{}),loading:N,children:N?"Adding...":"Add Member"})})]})})}],907308);var h=e.i(599724),f=e.i(779241),p=e.i(435451),g=e.i(860585);e.s(["default",0,({visible:e,onCancel:l,onSubmit:o,initialData:d,mode:c,config:u})=>{let m,[v]=a.Form.useForm(),[x,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e)if("edit"===c&&d){let e={...d,role:d.role||u.defaultRole,max_budget_in_team:d.max_budget_in_team||null,tpm_limit:d.tpm_limit||null,rpm_limit:d.rpm_limit||null,budget_duration:d.budget_duration||null,allowed_models:d.allowed_models||[]};v.setFieldsValue(e)}else v.resetFields(),v.setFieldsValue({role:u.defaultRole||u.roleOptions[0]?.value})},[e,d,c,v,u.defaultRole,u.roleOptions]);let y=async e=>{try{b(!0);let t=Object.entries(e).reduce((e,[t,r])=>{if("string"==typeof r){let s=r.trim();return""===s&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:s}}return{...e,[t]:r}},{});await Promise.resolve(o(t)),v.resetFields()}catch(e){console.error("Form submission error:",e)}finally{b(!1)}};return(0,t.jsx)(s.Modal,{title:u.title||("add"===c?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:l,children:(0,t.jsxs)(a.Form,{form:v,onFinish:y,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[u.showEmail&&(0,t.jsx)(a.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(f.TextInput,{placeholder:"user@example.com"})}),u.showEmail&&u.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(h.Text,{children:"OR"})}),u.showUserId&&(0,t.jsx)(a.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(f.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(a.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===c&&d&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(m=d.role,u.roleOptions.find(e=>e.value===m)?.label||m),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(i.Select,{children:"edit"===c&&d?[...u.roleOptions.filter(e=>e.value===d.role),...u.roleOptions.filter(e=>e.value!==d.role)].map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value)):u.roleOptions.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))})}),u.additionalFields?.map(e=>(0,t.jsx)(a.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(f.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(p.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(i.Select,{children:e.options?.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,t.jsx)(i.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});case"budget-duration":return(0,t.jsx)(g.default,{});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(n.Button,{onClick:l,className:"mr-2",disabled:x,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"default",htmlType:"submit",loading:x,children:"add"===c?x?"Adding...":"Add Member":x?"Saving...":"Save Changes"})]})]})})}],276173)},294612,e=>{"use strict";var t=e.i(843476),r=e.i(100486),s=e.i(827252),a=e.i(213205),n=e.i(771674),i=e.i(464571),l=e.i(770914),o=e.i(291542),d=e.i(262218),c=e.i(592968),u=e.i(898586),m=e.i(902555);let{Text:h}=u.Typography;e.s(["default",0,function({members:e,canEdit:u,onEdit:f,onDelete:p,onAddMember:g,roleColumnTitle:v="Role",roleTooltip:x,extraColumns:b=[],showDeleteForMember:y,emptyText:w}){let j=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(h,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(h,{children:e||"-"})},{title:x?(0,t.jsxs)(l.Space,{direction:"horizontal",children:[v,(0,t.jsx)(c.Tooltip,{title:x,children:(0,t.jsx)(s.InfoCircleOutlined,{})})]}):v,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(l.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(r.CrownOutlined,{}):(0,t.jsx)(n.UserOutlined,{}),(0,t.jsx)(h,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,r)=>u?(0,t.jsxs)(l.Space,{children:[(0,t.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>f(r)}),(!y||y(r))&&(0,t.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(r)})]}):null}];return(0,t.jsxs)(l.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:j,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:w?{emptyText:w}:void 0}),g&&u&&(0,t.jsx)(i.Button,{icon:(0,t.jsx)(a.UserAddOutlined,{}),type:"primary",onClick:g,children:"Add Member"})]})}])},286536,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["Eye",0,t],286536)},77705,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["EyeOff",0,t],77705)},153472,e=>{"use strict";var t,r,s=e.i(266027),a=e.i(954616),n=e.i(912598),i=e.i(243652),l=e.i(135214),o=e.i(602869),d=e.i(431703),c=((t={}).GENERAL_SETTINGS="general_settings",t),u=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let m=async(e,t)=>{try{let r=o.proxyBaseUrl?`${o.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,s=await fetch(r,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,d.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return await s.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},h=(0,i.createQueryKeys)("proxyConfig"),f=async(e,t)=>{try{let r=o.proxyBaseUrl?`${o.proxyBaseUrl}/config/field/delete`:"/config/field/delete",s=await fetch(r,{method:"POST",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){let e=await s.json(),t=(0,d.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return await s.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>c,"GeneralSettingsFieldName",()=>u,"proxyConfigKeys",0,h,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,l.default)(),t=(0,n.useQueryClient)();return(0,a.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await f(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:h.all})}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,l.default)();return(0,s.useQuery)({queryKey:h.list({filters:{configType:e}}),queryFn:async()=>await m(t,e),enabled:!!t})}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:s}))});e.s(["GlobalOutlined",0,n],160818)},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),s=e.i(444755),a=e.i(673706),n=e.i(271645);let i=n.default.forwardRef((e,i)=>{let{color:l,children:o,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return n.default.createElement("p",Object.assign({ref:i,className:(0,s.tremorTwMerge)(l?(0,a.getColorClassNames)(l,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",d)},c),o)});i.displayName="Subtitle",e.s(["Subtitle",0,i],37091)},516015,(e,t,r)=>{},898547,(e,t,r)=>{var s=e.i(247167);e.r(516015);var a=e.r(271645),n=a&&"object"==typeof a&&"default"in a?a:{default:a},i=void 0!==s.default&&s.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,r=t.name,s=void 0===r?"stylesheet":r,a=t.optimizeForSpeed,n=void 0===a?i:a;d(l(s),"`name` must be a string"),this._name=s,this._deletedRulePlaceholder="#"+s+"-deleted-rule____{}",d("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(i||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;ttypeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(s){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var s=this._tags[e];d(s,"old rule at index `"+e+"` not found"),s.textContent=t}return e},r.deleteRule=function(e){if("u"typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u">>0},u={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),s=e+r;return u[s]||(u[s]="jsx-"+c(e+"-"+r)),u[s]}function h(e,t){"u"typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),s=r.styleId,a=r.rules;if(s in this._instancesCounts){this._instancesCounts[s]+=1;return}var n=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[s]=n,this._instancesCounts[s]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var s=this._fromServer&&this._fromServer[r];s?(s.parentNode.removeChild(s),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],s=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:s}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,s=e.id;if(r){var a=m(s,r);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return h(a,e)}):[h(a,t)]}}return{styleId:m(s),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=a.createContext(null);function g(){return new f}function v(){return a.useContext(p)}p.displayName="StyleSheetContext";var x=n.default.useInsertionEffect||n.default.useLayoutEffect,b="u">typeof window?g():void 0;function y(e){var t=b||v();return t&&("u"{t.exports=e.r(898547).style},431343,e=>{"use strict";let t=(0,e.i(475254).default)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],431343)},800374,218129,210612,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}},{tag:"path",attrs:{d:"M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z"}},{tag:"path",attrs:{d:"M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}}]},name:"comment",theme:"outlined"},a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:s}))});e.s(["CommentOutlined",0,n],800374);let 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"};var l=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["ApiOutlined",0,l],218129);let o={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"};var d=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:o}))});e.s(["DatabaseOutlined",0,d],210612)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0onjeur4drmh-.js b/litellm/proxy/_experimental/out/_next/static/chunks/0onjeur4drmh-.js
new file mode 100644
index 00000000000..68eb5ca9ee2
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0onjeur4drmh-.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,655063,e=>{"use strict";var t=e.i(399029),a=e.i(271645);e.s(["useDebouncedValue",0,function(e,r,s){let[l,i,n]=(0,t.useDebouncedState)(e,r,s);return(0,a.useEffect)(()=>{i(e)},[e,i]),[l,n]}])},263005,e=>{"use strict";var t=e.i(843476);e.s(["PageHeader",0,function({title:e,subtitle:a,icon:r,actions:s}){return(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[null!=r&&(0,t.jsx)("span",{className:"flex flex-none items-center text-foreground",children:r}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),null!=a&&(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:a})]})]}),null!=s&&(0,t.jsx)("div",{className:"flex items-center gap-2",children:s})]})}])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["CalendarOutlined",0,l],72713)},278587,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,a],278587)},871943,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,a],871943)},502547,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,a],502547)},953960,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(599724),s=e.i(389083);let l=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});var i=e.i(871943),n=e.i(502547),o=e.i(592968),d=e.i(602869),c=e.i(234713);e.s(["default",0,function({mcpServers:e,mcpAccessGroups:u=[],mcpToolPermissions:m={},mcpToolsets:p=[],accessToken:g}){let[x,h]=(0,a.useState)([]),[f,v]=(0,a.useState)([]),[b,y]=(0,a.useState)(new Set),[w,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(g&&e.length>0)try{let e=await (0,d.fetchMCPServers)(g);e&&Array.isArray(e)?h(e):e.data&&Array.isArray(e.data)&&h(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[g,e.length]),(0,a.useEffect)(()=>{(async()=>{if(g&&p.length>0)try{let e=await (0,d.fetchMCPToolsets)(g),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];v(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[g,p.length]);let _=e.includes(c.NO_MCP_SERVERS_SENTINEL),N=e.includes(c.ALL_PROXY_MCP_SERVERS_SENTINEL),k=[...e.filter(e=>e!==c.NO_MCP_SERVERS_SENTINEL&&e!==c.ALL_PROXY_MCP_SERVERS_SENTINEL).map(e=>({type:"server",value:e})),...u.map(e=>({type:"accessGroup",value:e}))],S=k.length+p.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(s.Badge,{color:_?"red":"blue",size:"xs",children:_?"Blocked":N?"All":S})]}),_?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-red-400"}),(0,t.jsx)(r.Text,{className:"text-red-700 text-sm",children:"No MCP servers — this key is blocked from all MCP servers, including its team's servers"})]}):N?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-blue-400"}),(0,t.jsx)(r.Text,{className:"text-blue-700 text-sm",children:"All Proxy MCP Servers"})]}):S>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[k.map((e,a)=>{let r="server"===e.type?m[e.value]:void 0,s=r&&r.length>0,l=b.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return s&&(t=e.value,void y(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${s?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(o.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=x.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias||t.server_name||e} (${a})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded-sm uppercase tracking-wide shrink-0",children:"Group"})]})}),s&&(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:r.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===r.length?"tool":"tools"}),l?(0,t.jsx)(i.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(n.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),s&&l&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.map((e,a)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},a))})})]},a)}),p.length>0&&p.map((e,a)=>{let r=f.find(t=>t.toolset_id===e),s=w.has(e),l=r?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>l>0&&void j(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${l>0?"cursor-pointer hover:bg-purple-50 hover:border-purple-300":"bg-white"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:r?.toolset_name??e}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-purple-600 bg-purple-50 border border-purple-200 rounded-sm uppercase tracking-wide shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:l}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===l?"tool":"tools"}),s?(0,t.jsx)(i.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(n.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&s&&r&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-purple-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.tools.map((e,a)=>(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-purple-50 border border-purple-200 text-purple-800 text-xs font-medium",children:[(0,t.jsxs)("span",{className:"text-purple-400 mr-1 text-[10px]",children:[e.server_id.slice(0,6),"…"]}),e.tool_name]},a))})})]},`toolset-${a}`)})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})}],953960)},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),r=e.i(271645),s=e.i(389083);let l=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});var i=e.i(602869);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(n);e.data&&d(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[n,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,a)=>{let r;return(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:(r=o.find(t=>t.vector_store_id===e))?`${r.vector_store_name||r.vector_store_id} (${r.vector_store_id})`:e},a)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})};var o=e.i(953960);let d=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});var c=e.i(592968);let u=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,u]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&u(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let m=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],p=m.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(s.Badge,{color:"purple",size:"xs",children:p})]}),p>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:m.map((e,a)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(c.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=o.find(t=>t.agent_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${a})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded-sm uppercase tracking-wide shrink-0",children:"Group"})]})})})},a))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(d,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:r="card",className:s="",accessToken:l}){let i=e?.vector_stores||[],d=e?.mcp_servers||[],c=e?.mcp_access_groups||[],m=e?.mcp_tool_permissions||{},p=e?.mcp_toolsets||[],g=e?.agents||[],x=e?.agent_access_groups||[],h=e?.search_tools||[],f=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(o.default,{mcpServers:d,mcpAccessGroups:c,mcpToolPermissions:m,mcpToolsets:p,accessToken:l}),(0,t.jsx)(u,{agents:g,agentAccessGroups:x,accessToken:l}),(0,t.jsxs)("div",{className:"rounded-md border border-gray-100 p-4",children:[(0,t.jsx)(a.Text,{className:"text-sm font-medium text-gray-800",children:"Search tools"}),0===h.length?(0,t.jsx)(a.Text,{className:"mt-1 block text-xs text-gray-500",children:"No restriction — all configured search tools are allowed for this team."}):(0,t.jsx)(a.Text,{className:"mt-1 block text-xs text-gray-700",children:h.join(", ")})]})]});return"card"===r?(0,t.jsxs)("div",{className:`@container bg-white border border-gray-200 rounded-lg p-6 ${s}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),f]}):(0,t.jsxs)("div",{className:`${s}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),f]})}],384767)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,disabled:o})=>{let[d,c]=(0,a.useState)([]),[u,m]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);e.guardrails&&c(e.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{e(t)},value:l,loading:u,className:i,allowClear:!0,options:d.map(e=>({label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(199133),s=e.i(602869);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${r})${e.description?` — ${e.description}`:""}`,value:"production"===r?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[u,m]=(0,a.useState)([]),[p,g]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,c]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:d,placeholder:d?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:p,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",0,l])},595727,234662,677241,281092,688594,e=>{"use strict";let t=Symbol.for("constructDateFrom");function a(e,a){return"function"==typeof e?e(a):e&&"object"==typeof e&&t in e?e[t](a):e instanceof Date?new e.constructor(a):new Date(a)}function r(e,t){return a(t||e,e)}e.s(["constructFromSymbol",0,t,"millisecondsInDay",0,864e5,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInSecond",0,1e3,"millisecondsInWeek",0,6048e5],234662),e.s(["constructFrom",0,a],677241),e.s(["toDate",0,r],281092),e.s(["addDays",0,function(e,t,s){let l=r(e,s?.in);return isNaN(t)?a(s?.in||e,NaN):(t&&l.setDate(l.getDate()+t),l)}],595727),e.s(["addMonths",0,function(e,t,s){let l=r(e,s?.in);if(isNaN(t))return a(s?.in||e,NaN);if(!t)return l;let i=l.getDate(),n=a(s?.in||e,l.getTime());return(n.setMonth(l.getMonth()+t+1,0),i>=n.getDate())?n:(l.setFullYear(n.getFullYear(),n.getMonth(),i),l)}],688594)},24529,e=>{"use strict";var t=e.i(595727),a=e.i(688594),r=e.i(677241),s=e.i(281092);function l(e,l,i){let{years:n=0,months:o=0,weeks:d=0,days:c=0,hours:u=0,minutes:m=0,seconds:p=0}=l,g=(0,s.toDate)(e,i?.in),x=o||n?(0,a.addMonths)(g,o+12*n):g,h=c||d?(0,t.addDays)(x,c+7*d):x;return(0,r.constructFrom)(i?.in||e,+h+1e3*(p+60*(m+60*u)))}let i=/[zZ]$|[+-]\d{2}:?\d{2}$/;function n(e){return Date.parse(i.test(e)?e:`${e}Z`)}e.s(["calculateExpiryPreviewFromDuration",0,function(e){if(!e)return null;try{let t,a=parseInt(e);if(Number.isNaN(a))throw Error("Invalid duration format");let r=new Date;if(e.endsWith("mo"))t=l(r,{months:a});else if(e.endsWith("s"))t=l(r,{seconds:a});else if(e.endsWith("m"))t=l(r,{minutes:a});else if(e.endsWith("h"))t=l(r,{hours:a});else if(e.endsWith("d"))t=l(r,{days:a});else if(e.endsWith("w"))t=l(r,{weeks:a});else throw Error("Invalid duration format");return t.toLocaleString()}catch{return null}},"formatExpiresUtc",0,function(e){let t=n(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()},"isKeyExpired",0,function(e){if(!e)return!1;let t=n(e);return!Number.isNaN(t)&&t{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("textarea",{ref:s,"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));s.displayName="Textarea",e.s(["Textarea",0,s])},950594,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504),s=e.i(519455),l=e.i(793479),i=e.i(624687);let n=(0,r.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,r.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=a.forwardRef(({className:e,type:a="button",variant:l="ghost",size:i="xs",...n},d)=>(0,t.jsx)(s.Button,{ref:d,type:a,"data-size":i,variant:l,className:(0,r.cn)(o({size:i}),e),...n}));d.displayName="InputGroupButton";let c=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(l.Input,{ref:s,"data-slot":"input-group-control",className:(0,r.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a}));c.displayName="InputGroupInput",a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(i.Textarea,{ref:s,"data-slot":"input-group-control",className:(0,r.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,r.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})},"InputGroupAddon",0,function({className:e,align:a="inline-start",...s}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:(0,r.cn)(n({align:a}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...s})},"InputGroupButton",0,d,"InputGroupInput",0,c,"InputGroupText",0,function({className:e,...a}){return(0,t.jsx)("span",{className:(0,r.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}])},552546,e=>{"use strict";var t=e.i(843476),a=e.i(131792);let r=(e,t)=>{let a=t.trim().toLowerCase();return!a||e.label.toLowerCase().includes(a)||(e.sublabel?.toLowerCase().includes(a)??!1)};e.s(["SearchSelect",0,function({options:e,value:s,onValueChange:l,placeholder:i="Select…",emptyText:n="No results",disabled:o=!1,className:d}){let c=e.find(e=>e.value===s)??null;return(0,t.jsxs)(a.Combobox,{items:e,value:c,onValueChange:e=>l(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:r,disabled:o,children:[(0,t.jsx)(a.ComboboxInput,{placeholder:i,showClear:null!=s&&""!==s,className:`w-full ${d??""}`}),(0,t.jsxs)(a.ComboboxContent,{children:[(0,t.jsx)(a.ComboboxEmpty,{children:n}),(0,t.jsx)(a.ComboboxList,{children:e=>(0,t.jsx)(a.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},611363,e=>{"use strict";e.s(["navigateWithParams",0,function(e,t="push"){let a=new URLSearchParams(window.location.search);e(a);let r=a.toString(),s=r?`${window.location.pathname}?${r}`:window.location.pathname;"replace"===t?window.history.replaceState(null,"",s):window.history.pushState(null,"",s)}])},502501,e=>{"use strict";var t=e.i(843476),a=e.i(785242),r=e.i(135214),s=e.i(268004),l=e.i(309426),i=e.i(350967),n=e.i(947293),o=e.i(271645),d=e.i(602869);let c=async(e,t,a,r,s)=>{s("Admin"!=a&&"Admin Viewer"!=a?await (0,d.teamListCall)(e,r?.organization_id||null,t):await (0,d.teamListCall)(e,r?.organization_id||null))};var u=e.i(702597),m=e.i(618566),p=e.i(611363),g=e.i(266027),x=e.i(207082),h=e.i(109799),f=e.i(741466);e.i(707701);var v=e.i(807235),b=e.i(981080),y=e.i(531649),w=e.i(552546),j=e.i(263005),_=e.i(793479),N=e.i(655063),k=e.i(465261),S=e.i(20147),C=e.i(827252),I=e.i(282786),E=e.i(898586),T=e.i(494862),D=e.i(302747);e.i(622826);var z=e.i(200208),M=e.i(399536),R=e.i(997422),A=e.i(547227),L=e.i(630500),P=e.i(112179),U=e.i(304911);let V=[{id:"spend",label:"Spend"},{id:"max_budget",label:"Budget"}],K=({userAlias:e,userEmail:a,userId:r,width:s})=>{let l=e||a||r,i="default_user_id"===r,n=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:e},{label:"User Email",value:a},{label:"User ID",value:r}].map(({label:e,value:a})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),a?(0,t.jsx)(E.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:a},copyable:!0,children:a}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!i||e||a?(0,t.jsx)(I.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:s,overflow:"hidden"},children:l||"-"})}):(0,t.jsx)(I.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(U.default,{userId:r})})})},O=({label:e,tooltip:a})=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[e,(0,t.jsx)(I.Popover,{content:a,trigger:"hover",children:(0,t.jsx)(C.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),B={token:!1,organization_alias:!1,created_by:!1,updated_at:!1,expires:!1,rate_limits:!1},$=[{id:"created_at",desc:!0}],F={team_id:"Team",org_id:"Organization",user_id:"User ID",key_hash:"Key ID"};function G({headerActions:e}){let s,l,i,{data:n}=(0,h.useOrganizations)(),c=(0,o.useMemo)(()=>n??[],[n]),{data:u}=(0,a.useAllTeams)(),C=(0,o.useMemo)(()=>u??[],[u]),{keyId:I,openKey:E,close:U}=(s=(0,m.useSearchParams)(),l=(0,o.useCallback)(e=>{(0,p.navigateWithParams)(t=>{t.set("key",e)})},[]),i=(0,o.useCallback)(()=>{(0,p.navigateWithParams)(e=>{e.delete("key")})},[]),{keyId:s?.get("key")??null,openKey:l,close:i}),[H,W]=(0,o.useState)($),[q,Y]=(0,o.useState)({pageIndex:0,pageSize:50}),[J,X]=(0,o.useState)([]),[Z,Q]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(""),[ea]=(0,N.useDebouncedValue)(ee,{wait:f.DEBOUNCE_WAIT_MS}),er=(0,o.useCallback)(e=>{let t=J.find(t=>t.id===e);return"string"==typeof t?.value&&t.value.trim()?t.value.trim():void 0},[J]),es=H[0]?.id,el=(e=>{let t=e[0];if(t)return t.desc?"desc":"asc"})(H),ei={teamID:er("team_id"),organizationID:er("org_id"),selectedKeyAlias:ea.trim()||void 0,userID:er("user_id"),keyHash:er("key_hash"),sortBy:es,sortOrder:el,expand:"user"},{data:en,isPending:eo,isFetching:ed,refetch:ec}=(0,x.useKeys)(q.pageIndex+1,q.pageSize,ei),eu=(0,o.useMemo)(()=>en?.keys??[],[en]),em=en?.total_count??0,ep=(0,o.useCallback)(e=>{et(e),Y(e=>({...e,pageIndex:0}))},[]),eg=(0,o.useCallback)(e=>{W(e),Y(e=>({...e,pageIndex:0}))},[]),ex=(0,o.useCallback)(e=>{X(e),Y(e=>({...e,pageIndex:0}))},[]),eh=(0,o.useMemo)(()=>(({allTeams:e,organizations:a,onSelectKey:r})=>[{id:"key_alias",accessorKey:"key_alias",meta:{title:"Key",renderSkeleton:()=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,t.jsx)(D.Skeleton,{className:"h-4 w-32"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(D.Skeleton,{className:"h-3 w-20"}),(0,t.jsx)(D.Skeleton,{className:"h-5 w-16 rounded-full"})]})]})},header:({column:e})=>(0,t.jsx)(T.DataTableSortHeader,{column:e,title:"Key",variant:"header-cycle"}),size:260,enableSorting:!0,cell:({row:e})=>{let a=(e=>{if(!0===e.blocked)return{tone:"error",label:"Blocked",tooltip:e.metadata?.scim_blocked===!0?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401."};let t=e.expires?Date.parse(e.expires):NaN;return!Number.isNaN(t)&&tr(e.original)})}},{id:"token",accessorKey:"token",meta:{title:"Key ID"},header:({column:e})=>(0,t.jsx)(T.DataTableSortHeader,{column:e,title:"Key ID",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(M.IdCell,{value:e.getValue(),onClick:()=>r(e.row.original)})},{id:"team_alias",accessorKey:"team_id",meta:{title:"Team"},header:"Team",size:120,enableSorting:!1,cell:a=>{let r=a.getValue();if(!r)return"-";let s=e.find(e=>e.team_id===r),l=s?.team_alias||r,i=a.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:l})}},{id:"organization_alias",accessorKey:"org_id",meta:{title:"Organization"},header:"Organization",size:140,enableSorting:!1,cell:e=>{let r=e.getValue();if(!r)return"-";let s=a.find(e=>e.organization_id===r),l=s?.organization_alias||r,i=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:l})}},{id:"user",accessorKey:"user",meta:{title:"User"},header:()=>(0,t.jsx)(O,{label:"User",tooltip:"Displays the first available value: User Alias, User Email, or User ID."}),size:160,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsx)(K,{userAlias:a.user?.user_alias??null,userEmail:a.user?.user_email??a.user_email??null,userId:a.user_id??null,width:160})}},{id:"created_at",accessorKey:"created_at",meta:{title:"Created At"},header:({column:e})=>(0,t.jsx)(T.DataTableSortHeader,{column:e,title:"Created At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(z.DateCell,{value:e.getValue(),precision:"date"})},{id:"created_by",accessorKey:"created_by",meta:{title:"Created By"},header:"Created By",size:160,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"-";let r=e.row.original.created_by_user;return(0,t.jsx)(K,{userAlias:r?.user_alias??null,userEmail:r?.user_email??null,userId:a,width:160})}},{id:"updated_at",accessorKey:"updated_at",meta:{title:"Updated At"},header:({column:e})=>(0,t.jsx)(T.DataTableSortHeader,{column:e,title:"Updated At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(z.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"last_active",accessorKey:"last_active",meta:{title:"Last Active"},header:()=>(0,t.jsx)(O,{label:"Last Active",tooltip:"This is a new field and is not backfilled. Only new key usage will update this value."}),size:130,enableSorting:!1,cell:e=>(0,t.jsx)(z.DateCell,{value:e.getValue(),precision:"date",fallback:"Unknown"})},{id:"expires",accessorKey:"expires",meta:{title:"Expires"},header:"Expires",size:120,enableSorting:!1,cell:e=>(0,t.jsx)(z.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend / Budget",skeleton:"meter"},header:({table:e})=>(0,t.jsx)(T.DataTableMultiSortHeader,{table:e,fields:V}),size:180,enableSorting:!0,cell:({row:a})=>{let r=a.original.team_id,s=e.find(e=>e.team_id===r);return(0,t.jsx)(L.SpendBudgetCell,{spend:a.original.spend,maxBudget:a.original.max_budget,teamMaxBudget:s?.max_budget??null})}},{id:"budget_reset_at",accessorKey:"budget_reset_at",meta:{title:"Budget Reset"},header:"Budget Reset",size:130,enableSorting:!1,cell:e=>(0,t.jsx)(z.DateCell,{value:e.getValue(),fallback:"Never"})},{id:"models",accessorKey:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:220,enableSorting:!1,cell:e=>(0,t.jsx)(A.ModelsCell,{models:e.getValue(),allowedRoutes:e.row.original.allowed_routes,keyType:e.row.original.key_type})},{id:"rate_limits",meta:{title:"Rate Limits"},header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}])({allTeams:C,organizations:c,onSelectKey:e=>E(e.token)}),[C,c,E]),ef=(0,o.useMemo)(()=>eu.find(e=>e.token===I),[eu,I]),{data:ev,isError:eb}=function(e,t){let{accessToken:a}=(0,r.default)();return(0,g.useQuery)({queryKey:[...x.keyKeys.detail(e??""),a],queryFn:async()=>{if(!a||!e)throw Error("Missing access token or key id");return{...(await (0,d.keyInfoV1Call)(a,e)).info,token:e,api_key:e}},enabled:!!(a&&e)&&(t?.enabled??!0)})}(I,{enabled:!ef}),ey=ef??ev,ew=(0,o.useMemo)(()=>C.map(e=>({label:e.team_alias||e.team_id,value:e.team_id,sublabel:e.team_alias?e.team_id:void 0})),[C]),ej=(0,o.useMemo)(()=>c.filter(e=>e.organization_id).map(e=>{let t=e.organization_id;return{label:e.organization_alias||t,value:t,sublabel:e.organization_alias?t:void 0}}),[c]),e_=(0,o.useCallback)((e,t)=>{let a=String(t);return"team_id"===e?C.find(e=>e.team_id===a)?.team_alias||a:"org_id"===e&&c.find(e=>e.organization_id===a)?.organization_alias||a},[C,c]);return I?ey||eb?(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsx)(S.default,{keyId:I,onClose:U,keyData:ey,teams:C,onDelete:ec})}):(0,t.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading key..."}):(0,t.jsxs)("div",{className:"flex h-full flex-col gap-4 overflow-hidden py-2",children:[(0,t.jsx)(j.PageHeader,{icon:(0,t.jsx)(k.KeyRound,{className:"size-5"}),title:"Virtual Keys",subtitle:"Every key that authenticates requests to the gateway."}),e,(0,t.jsx)(v.DataTable,{data:eu,columns:eh,getRowId:e=>e.token,defaultColumnVisibility:B,sortingMode:"server",sorting:H,onSortingChange:eg,paginationMode:"server",pagination:q,onPaginationChange:Y,rowCount:em,filterMode:"server",columnFilters:J,onColumnFiltersChange:ex,enableColumnResizing:!0,columnResizeMode:"onChange",isLoading:eo,loadingMessage:"Loading keys...",noDataMessage:"No keys found",maxBodyHeight:"calc(75vh - 210px)",size:"compact",toolbar:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.DataTableToolbar,{table:e,searchValue:ee,onSearchChange:ep,searchPlaceholder:"Search by key alias…",onRefresh:()=>ec?.(),isRefreshing:ed,onOpenFilters:()=>Q(!0),filterLabels:F,formatFilterValue:e_}),(0,t.jsx)(b.DataTableFilterDrawer,{table:e,open:Z,onOpenChange:Q,title:"Filters",description:"Narrow down virtual keys",children:({get:e,set:a})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.DataTableFilterField,{label:"Team",children:(0,t.jsx)(w.SearchSelect,{options:ew,value:e("team_id")||void 0,onValueChange:e=>a("team_id",e),placeholder:"Select a team…",emptyText:"No teams found"})}),(0,t.jsx)(b.DataTableFilterField,{label:"Organization",children:(0,t.jsx)(w.SearchSelect,{options:ej,value:e("org_id")||void 0,onValueChange:e=>a("org_id",e),placeholder:"Select an organization…",emptyText:"No organizations found"})}),(0,t.jsx)(b.DataTableFilterField,{label:"User ID",children:(0,t.jsx)(_.Input,{value:e("user_id")??"",onChange:e=>a("user_id",e.target.value),placeholder:"Enter User ID…"})}),(0,t.jsx)(b.DataTableFilterField,{label:"Key ID",children:(0,t.jsx)(_.Input,{value:e("key_hash")??"",onChange:e=>a("key_hash",e.target.value),placeholder:"Enter Key ID…"})})]})})]})})]})}let H=({userID:e,userRole:a,teams:r,keys:m,setUserRole:p,userEmail:g,setUserEmail:x,setTeams:h,setKeys:f,premiumUser:v,addKey:b,createClicked:y,autoOpenCreate:w,prefillData:j})=>{let[_,N]=(0,o.useState)(null),[k,S]=(0,o.useState)(null),C=(0,s.getCookie)("token"),[I,E]=(0,o.useState)(null),[T,D]=(0,o.useState)(null),[z,M]=(0,o.useState)([]),[R,A]=(0,o.useState)(null),[L,P]=(0,o.useState)(null);function U(){(0,s.clearTokenCookies)();let e=(0,d.getProxyBaseUrl)(),t=e?`${e}/sso/key/generate`:"/sso/key/generate";return window.location.href=t,null}if((0,o.useEffect)(()=>{let e=()=>{let e=sessionStorage.getItem("token");sessionStorage.clear(),e&&sessionStorage.setItem("token",e)};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(C){let e=(0,n.jwtDecode)(C);e&&(E(e.key),e.user_role&&p(function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role)),e.user_email&&x(e.user_email))}if(e&&I&&a&&!_){let t=sessionStorage.getItem("userModels"+e);t?M(JSON.parse(t)):((async()=>{try{let t=await (0,d.getProxyUISettings)(I);A(t);let r=await (0,d.userGetInfoV2)(I,e);N(r),sessionStorage.setItem("userSpendData"+e,JSON.stringify(r));let s=(await (0,d.modelAvailableCall)(I,e,a)).data.map(e=>e.id);M(s),sessionStorage.setItem("userModels"+e,JSON.stringify(s))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&U()}})(),c(I,e,a,k,h))}},[e,C,I,a]),(0,o.useEffect)(()=>{I&&(async()=>{try{await (0,d.keyInfoCall)(I,[I])}catch(e){e.message.includes("Invalid proxy server token passed")&&U()}})()},[I]),(0,o.useEffect)(()=>{I&&c(I,e,a,k,h)},[k]),(0,o.useEffect)(()=>{if(null!==m&&null!=L&&null!==L.team_id){let e=0;for(let t of m)L.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===L.team_id&&(e+=t.spend);D(e)}else if(null!==m){let e=0;for(let t of m)e+=t.spend;D(e)}},[L]),null==C)return U(),null;try{let e=(0,n.jwtDecode)(C).exp,t=Math.floor(Date.now()/1e3);if(e&&t>=e)return U(),null}catch(e){return console.error("Error decoding token:",e),(0,s.clearTokenCookies)(),U(),null}if(null==I)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});null==a&&p("App Owner");let V="Admin Viewer"!==a&&"proxy_admin_viewer"!==a;return(0,t.jsx)("div",{className:"mx-4 h-[75vh]",children:(0,t.jsx)(i.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsx)(l.Col,{numColSpan:1,className:"flex flex-col gap-2",children:(0,t.jsx)(G,{headerActions:V?(0,t.jsx)(u.default,{team:L,teams:r,data:m,addKey:b,autoOpenCreate:w,prefillData:j},L?L.team_id:null):void 0})})})})};var W=e.i(557951);e.s(["default",0,function(){let{userId:e,userRole:s,userEmail:l,accessToken:i,premiumUser:n}=(0,r.default)(),{setUserRole:d,setUserEmail:c}=(0,W.useAuth)(),u=(0,m.useSearchParams)(),[p,g]=(0,o.useState)(null),[x,h]=(0,o.useState)([]),[f,v]=(0,o.useState)(!1),b="true"===u.get("create"),y=(0,o.useMemo)(()=>{if(!b)return;let e=u.get("owned_by"),t=u.get("team_id"),a=u.get("key_alias"),r=u.get("models"),s=u.get("key_type");if(!e&&!t&&!a&&!r&&!s)return;let l=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=s&&["default","llm_api","management"].includes(s)?s:void 0,n=a?a.trim().slice(0,256):void 0,o=r?r.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:l,team_id:t?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:i}},[u,b]);return(0,o.useEffect)(()=>{i&&e&&s&&(0,a.teamListCall)(i,1,100,{userID:"Admin"!==s&&"Admin Viewer"!==s?e:null}).then(e=>g(e.teams??[])).catch(console.error)},[i,e,s]),(0,t.jsx)(H,{userID:e,userRole:s,premiumUser:n??!1,teams:p,keys:x,setUserRole:d,userEmail:l,setUserEmail:c,setTeams:g,setKeys:h,addKey:e=>{h(t=>t?[...t,e]:[e]),v(e=>!e)},createClicked:f,autoOpenCreate:b,prefillData:y})}],502501)},871135,e=>{"use strict";var t=e.i(843476),a=e.i(502501),r=e.i(936578),s=e.i(602869),l=e.i(207082),i=e.i(708347),n=e.i(557951),o=e.i(321836),d=e.i(571353),c=e.i(618566),u=e.i(271645);function m(){let{authLoading:e,token:m,userRole:p,userID:g}=(0,n.useAuth)(),x=(0,c.useRouter)(),h=(0,c.useSearchParams)(),f=h.get("page"),v=(0,u.useRef)(!1),b=(0,u.useRef)(!1),y=!1===e&&null===m;(0,u.useEffect)(()=>{if(y){(0,o.storeReturnUrl)();let e=(0,o.getLoginUrl)(s.proxyBaseUrl||""),t=(0,o.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[y]);let w=null!==f&&f in d.MIGRATED_PAGES;(0,u.useEffect)(()=>{!e&&w&&x.replace((0,d.migratedHref)(d.MIGRATED_PAGES[f]))},[e,w,f,x]),(0,u.useEffect)(()=>{if(e||!m||v.current)return;v.current=!0;let t=(0,o.consumeReturnUrl)();if(t&&(0,o.isValidReturnUrl)(t)){let e=new URL(t,window.location.origin);if(e.origin!==window.location.origin)return;let a=window.location.href;(0,o.normalizeUrlForCompare)(t)!==(0,o.normalizeUrlForCompare)(a)&&(b.current=!0,window.location.replace(e.href))}},[e,m]),(0,u.useEffect)(()=>{m||(v.current=!1,b.current=!1)},[m]);let j="success"===h.get("login"),_=!e&&!!m,N=j&&_&&""===p,k=j&&_&&i.internalUserRoles.includes(p),{data:S,isLoading:C}=(0,l.useKeys)(1,1,{userID:g},k),I=k&&!C&&S?.keys?.length===0,E=k&&C||I;(0,u.useEffect)(()=>{I&&!b.current&&x.replace((0,d.migratedHref)("connect"))},[I,x]);let T=y||w||N||E;return e||T?(0,t.jsx)(r.default,{}):(0,t.jsx)(a.default,{})}e.s(["default",0,function(){return(0,t.jsx)(u.Suspense,{fallback:(0,t.jsx)(r.default,{}),children:(0,t.jsx)(m,{})})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0p_yh7pymv-5p.js b/litellm/proxy/_experimental/out/_next/static/chunks/0p_yh7pymv-5p.js
deleted file mode 100644
index deac6daab22..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0p_yh7pymv-5p.js
+++ /dev/null
@@ -1,7 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196361,e=>{e.q("/litellm-asset-prefix/_next/static/media/arize.2q0zcoh7v2j00.png")},614148,e=>{e.q("/litellm-asset-prefix/_next/static/media/aws.2vuu_29f0wx7g.svg")},858236,e=>{e.q("/litellm-asset-prefix/_next/static/media/braintrust.1qnhppdggfxdj.png")},508296,e=>{e.q("/litellm-asset-prefix/_next/static/media/datadog.20j6djly_hrsx.png")},324755,e=>{e.q("/litellm-asset-prefix/_next/static/media/galileo.1jnyj81fv75mp.ico")},475151,e=>{e.q("/litellm-asset-prefix/_next/static/media/lago.146vobxeazdxy.svg")},274286,e=>{e.q("/litellm-asset-prefix/_next/static/media/langfuse.1y39530irujaj.png")},436494,e=>{e.q("/litellm-asset-prefix/_next/static/media/langsmith.0cuekyutow5l_.png")},204086,e=>{e.q("/litellm-asset-prefix/_next/static/media/openmeter.1wzo3xv7qwtb8.png")},531150,e=>{e.q("/litellm-asset-prefix/_next/static/media/otel.1dei3v2u03nit.png")},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),l=e.i(673706),i=e.i(271645);let o=i.default.forwardRef((e,o)=>{let{color:n,children:s,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:o,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",n?(0,l.getColorClassNames)(n,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),s)});o.displayName="Title",e.s(["Title",0,o],629569)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),i=e.i(444755),o=e.i(673706);let n=(0,o.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:c="",decorationColor:d,children:u,className:f}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,i.tremorTwMerge)(n("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",d?(0,o.getColorClassNames)(d,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),f)},m),u)});s.displayName="Card",e.s(["Card",0,s],304967)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),l=e.i(392221),i=e.i(703923),o=e.i(343794),n=e.i(914949),s=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,s.forwardRef)(function(e,d){var u=e.prefixCls,f=void 0===u?"rc-checkbox":u,m=e.className,p=e.style,h=e.checked,b=e.disabled,v=e.defaultChecked,g=e.type,x=void 0===g?"checkbox":g,y=e.title,C=e.onChange,k=(0,i.default)(e,c),w=(0,s.useRef)(null),S=(0,s.useRef)(null),E=(0,n.default)(void 0!==v&&v,{value:h}),_=(0,l.default)(E,2),N=_[0],j=_[1];(0,s.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=w.current)||t.focus(e)},blur:function(){var e;null==(e=w.current)||e.blur()},input:w.current,nativeElement:S.current}});var $=(0,o.default)(f,m,(0,a.default)((0,a.default)({},"".concat(f,"-checked"),N),"".concat(f,"-disabled"),b));return s.createElement("span",{className:$,title:y,style:p,ref:S},s.createElement("input",(0,t.default)({},k,{className:"".concat(f,"-input"),ref:w,onChange:function(t){b||("checked"in e||j(t.target.checked),null==C||C({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:b,checked:!!N,type:x})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,d],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=s.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),l=e.i(611935),i=e.i(121872),o=e.i(26905),n=e.i(242064),s=e.i(937328),c=e.i(321883),d=e.i(62139);let u=t.default.createContext(null);e.i(296059);var f=e.i(915654),m=e.i(183293),p=e.i(246422),h=e.i(838378);function b(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,m.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,f.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
- ${r}:not(${r}-disabled),
- ${t}:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
- ${r}-checked:not(${r}-disabled),
- ${t}-checked:not(${t}-disabled)
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,h.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let v=(0,p.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[b(t,e)]);e.s(["default",0,v,"getStyle",0,b],236836);var g=e.i(681216),x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.forwardRef((e,f)=>{var m;let{prefixCls:p,className:h,rootClassName:b,children:y,indeterminate:C=!1,style:k,onMouseEnter:w,onMouseLeave:S,skipGroup:E=!1,disabled:_}=e,N=x(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:j,direction:$,checkbox:P}=t.useContext(n.ConfigContext),O=t.useContext(u),{isFormItemInput:R}=t.useContext(d.FormItemInputContext),M=t.useContext(s.default),L=null!=(m=(null==O?void 0:O.disabled)||_)?m:M,T=t.useRef(N.value),I=t.useRef(null),z=(0,l.composeRef)(f,I);t.useEffect(()=>{null==O||O.registerValue(N.value)},[]),t.useEffect(()=>{if(!E)return N.value!==T.current&&(null==O||O.cancelValue(T.current),null==O||O.registerValue(N.value),T.current=N.value),()=>null==O?void 0:O.cancelValue(N.value)},[N.value]),t.useEffect(()=>{var e;(null==(e=I.current)?void 0:e.input)&&(I.current.input.indeterminate=C)},[C]);let A=j("checkbox",p),q=(0,c.default)(A),[B,V,D]=v(A,q),G=Object.assign({},N);O&&!E&&(G.onChange=(...e)=>{N.onChange&&N.onChange.apply(N,e),O.toggleOption&&O.toggleOption({label:y,value:N.value})},G.name=O.name,G.checked=O.value.includes(N.value));let H=(0,r.default)(`${A}-wrapper`,{[`${A}-rtl`]:"rtl"===$,[`${A}-wrapper-checked`]:G.checked,[`${A}-wrapper-disabled`]:L,[`${A}-wrapper-in-form-item`]:R},null==P?void 0:P.className,h,b,D,q,V),W=(0,r.default)({[`${A}-indeterminate`]:C},o.TARGET_CLS,V),[X,F]=(0,g.default)(G.onClick);return B(t.createElement(i.default,{component:"Checkbox",disabled:L},t.createElement("label",{className:H,style:Object.assign(Object.assign({},null==P?void 0:P.style),k),onMouseEnter:w,onMouseLeave:S,onClick:X},t.createElement(a.default,Object.assign({},G,{onClick:F,prefixCls:A,className:W,disabled:L,ref:z})),null!=y&&t.createElement("span",{className:`${A}-label`},y))))});var C=e.i(8211),k=e.i(529681),w=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let S=t.forwardRef((e,a)=>{let{defaultValue:l,children:i,options:o=[],prefixCls:s,className:d,rootClassName:f,style:m,onChange:p}=e,h=w(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:b,direction:g}=t.useContext(n.ConfigContext),[x,S]=t.useState(h.value||l||[]),[E,_]=t.useState([]);t.useEffect(()=>{"value"in h&&S(h.value||[])},[h.value]);let N=t.useMemo(()=>o.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[o]),j=e=>{_(t=>t.filter(t=>t!==e))},$=e=>{_(t=>[].concat((0,C.default)(t),[e]))},P=e=>{let t=x.indexOf(e.value),r=(0,C.default)(x);-1===t?r.push(e.value):r.splice(t,1),"value"in h||S(r),null==p||p(r.filter(e=>E.includes(e)).sort((e,t)=>N.findIndex(t=>t.value===e)-N.findIndex(e=>e.value===t)))},O=b("checkbox",s),R=`${O}-group`,M=(0,c.default)(O),[L,T,I]=v(O,M),z=(0,k.default)(h,["value","disabled"]),A=o.length?N.map(e=>t.createElement(y,{prefixCls:O,key:e.value.toString(),disabled:"disabled"in e?e.disabled:h.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${R}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):i,q=t.useMemo(()=>({toggleOption:P,value:x,disabled:h.disabled,name:h.name,registerValue:$,cancelValue:j}),[P,x,h.disabled,h.name,$,j]),B=(0,r.default)(R,{[`${R}-rtl`]:"rtl"===g},d,f,I,M,T);return L(t.createElement("div",Object.assign({className:B,style:m},z,{ref:a}),t.createElement(u.Provider,{value:q},A)))});y.Group=S,y.__ANT_CHECKBOX=!0,e.s(["default",0,y],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:a}=r.Select;e.s(["default",0,({value:e,onChange:l,className:i="",style:o={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...o},value:e||void 0,onChange:l,className:i,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(a,{value:"1h",children:"hourly"}),(0,t.jsx)(a,{value:"24h",children:"daily"}),(0,t.jsx)(a,{value:"7d",children:"weekly"}),(0,t.jsx)(a,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var l=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["UserAddOutlined",0,i],213205)},500727,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(135214);let i=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,a.fetchMCPServers)(r,e),enabled:!!r})}])},699857,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),l=e.i(135214);let i=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,a.fetchMCPToolsets)(e),enabled:!!e})}])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:o,accessToken:n,placeholder:s="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,l.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:s,onChange:e,value:i,loading:f,className:o,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),l=e.i(602869),i=e.i(135214);let o=(0,a.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),s=e.i(699857),c=e.i(199133),d=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:a,className:f,accessToken:m,placeholder:p="Select MCP servers",disabled:h=!1,teamId:b,allowNoMcpServers:v=!1,allowAllProxyMcpServers:g=!1})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(b),{data:C=[],isLoading:k}=(()=>{let{accessToken:e}=(0,i.default)();return(0,r.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:w=[],isLoading:S}=(0,s.useMCPToolsets)(),E=new Set(C),_=[...C.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...w.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},j={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},$=[...a?.servers||[],...a?.accessGroups||[],...(a?.toolsets||[]).map(e=>`${u}${e}`)],P=v&&$.includes(d.NO_MCP_SERVERS_SENTINEL),O=$.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(c.Select,{mode:"multiple",placeholder:p,onChange:t=>{if(g&&t.includes(d.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[d.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(v&&t.includes(d.NO_MCP_SERVERS_SENTINEL))return void e({servers:[d.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),a=t.filter(e=>!e.startsWith(u));e({servers:a.filter(e=>!E.has(e)),accessGroups:a.filter(e=>E.has(e)),toolsets:r})},value:$,loading:y||k||S,className:f,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:h,filterOption:(e,t)=>t?.value===d.NO_MCP_SERVERS_SENTINEL||t?.value===d.ALL_PROXY_MCP_SERVERS_SENTINEL||(_.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(g||O)&&(0,t.jsx)(c.Select.Option,{value:d.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},d.ALL_PROXY_MCP_SERVERS_SENTINEL),v&&(0,t.jsx)(c.Select.Option,{value:d.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},d.NO_MCP_SERVERS_SENTINEL),_.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,disabled:P||O,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:j[e.type]})]})},e.value))]})})}],75921)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["RobotOutlined",0,i],983561)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(779241),l=e.i(599724),i=e.i(199133),o=e.i(983561),n=e.i(343488),s=e.i(695411);e.s(["default",0,({accessToken:e,value:c,placeholder:d="Select a Model",onChange:u,disabled:f=!1,style:m,className:p,showLabel:h=!0,labelText:b="Select Model"})=>{let[v,g]=(0,r.useState)(c),[x,y]=(0,r.useState)(!1),[C,k]=(0,r.useState)([]);(0,r.useEffect)(()=>{g(c)},[c]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,s.fetchAvailableModels)(e);t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]);let w=(0,n.useDebouncedCallback)(e=>{g(e),u?.(e)},{wait:500});return(0,t.jsxs)("div",{children:[h&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o.RobotOutlined,{className:"mr-2"})," ",b]}),(0,t.jsx)(i.Select,{value:v,placeholder:d,onChange:e=>{"custom"===e?(y(!0),g(void 0)):(y(!1),g(e),u&&u(e))},options:[...Array.from(new Set(C.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...m},showSearch:!0,className:`rounded-md ${p||""}`,disabled:f}),x&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:w,disabled:f})]})}])},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,a){let l=(0,t.useDebouncer)(e,a).maybeExecute;return(0,r.useCallback)((...e)=>l(...e),[l])}])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},531516,696609,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(536916),l=e.i(599724),i=e.i(409797),o=e.i(233565);let n=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,s=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,c=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,d=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function u(e,t=""){let r=e.toLowerCase();if(d.test(r))return"read";if(n.test(r))return"delete";if(c.test(r))return"update";if(s.test(r))return"create";if(t){let e=t.toLowerCase();if(d.test(e))return"read";if(n.test(e))return"delete";if(c.test(e))return"update";if(s.test(e))return"create"}return"unknown"}function f(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[u(r.name,r.description)].push(r);return t}let m={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,m,"classifyToolOp",0,u,"groupToolsByCrud",0,f],696609);let p=["read","create","update","delete","unknown"],h={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},b={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},v={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:n,onChange:s,readOnly:c=!1,searchFilter:d=""})=>{let[u,g]=(0,r.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),x=(0,r.useMemo)(()=>f(e),[e]),y=(0,r.useMemo)(()=>new Set(void 0===n?e.map(e=>e.name):n),[n,e]),C=e=>{if(c)return;let t=new Set(y);t.has(e)?t.delete(e):t.add(e),s(Array.from(t))};return 0===e.length?null:(0,t.jsx)("div",{className:"space-y-3",children:p.map(e=>{let r,n=x[e];if(0===n.length)return null;if(d){let e=d.toLowerCase();if(!n.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let f=m[e],p=(r=x[e]).length>0&&r.every(e=>y.has(e.name)),k=(e=>{let t=x[e];if(0===t.length)return!1;let r=t.filter(e=>y.has(e.name)).length;return r>0&&r{g(t=>({...t,[e]:!t[e]}))},children:[w?(0,t.jsx)(o.ChevronRightIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}):(0,t.jsx)(i.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 shrink-0"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:f.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${h[f.risk]}`,children:"high"===f.risk?"High Risk":"medium"===f.risk?"Medium Risk":"low"===f.risk?"Safe":"Unclassified"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[n.filter(e=>y.has(e.name)).length,"/",n.length," allowed"]})]}),!c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,t.jsx)(l.Text,{className:"text-xs text-gray-500",children:p?"All on":k?"Partial":"All off"}),(0,t.jsx)(a.Checkbox,{checked:p,indeterminate:k,onChange:t=>((e,t)=>{if(c)return;let r=new Set(y);for(let a of x[e])t?r.add(a.name):r.delete(a.name);s(Array.from(r))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!w&&(0,t.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:f.description}),!w&&(0,t.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:n.filter(e=>!d||e.name.toLowerCase().includes(d.toLowerCase())||(e.description??"").toLowerCase().includes(d.toLowerCase())).map(e=>{let r,i=(r=e.name,y.has(r));return(0,t.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!c?"cursor-pointer":""} ${i?"":"opacity-60"}`,onClick:()=>C(e.name),children:[(0,t.jsx)(a.Checkbox,{checked:i,onChange:()=>C(e.name),disabled:c,onClick:e=>e.stopPropagation()}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)(l.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,t.jsx)(l.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,t.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded shrink-0 ${i?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:i?"on":"off"})]},e.name)})})]},e)})})}],531516)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0q8q-21f1553f.js b/litellm/proxy/_experimental/out/_next/static/chunks/0q8q-21f1553f.js
new file mode 100644
index 00000000000..a3003396dbe
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0q8q-21f1553f.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={},i=!0)=>{let{accessToken:d}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(d,e,a,s),enabled:!!d&&i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={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"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let b=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(b.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:b.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:b})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(f),[v,A]=(0,l.useState)(f?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&b&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;b(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=b(u,i.colSpan),o=b(m,i.colSpanSm),d=b(g,i.colSpanMd),c=b(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:b,showExampleConfig:f=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),b&&b(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(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:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",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:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),b&&b(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),b&&b(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),f&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{})," # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),' "',e,'": "',l,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:b=[],onDisabledCallbacksChange:f})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:b,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,b]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[I,T]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;b({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else b({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&T(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:f.length>0?f:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,f.length>0?f:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,f]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:b,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:I})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),b=e.i(779241),f=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),I=e.i(898586),T=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:eb}=(0,n.default)(),ef=eb||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eI=(0,c.useQueryClient)(),[eT]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tb]=(0,E.useState)("30d"),[tf,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tI,tT]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eT)??[],tR=()=>{eE(!1),eT.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tb("30d"),tj(null),tT(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eT.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tb("30d"),tj(null),tT(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eT.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eT.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eT.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eT,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tf?.router_settings&&Object.values(tf.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tf.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eI.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eT.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eT.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eT.setFieldValue("models",[]),eT.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eT]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eT.setFieldsValue({models:e}),eW(null)},[eQ,eD,eT]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eT.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,T.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eT,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(f.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eT.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eT.setFieldValue("team_id",void 0),eT.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eT.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eT.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eT.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eT.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(f.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(b.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eT.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eT.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eT.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(f.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eT.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eT,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eT,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ef?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ef?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!ef,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:eb?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:eb?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:eb?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{accessToken:eh,placeholder:eb?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!eb,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eT.setFieldValue("allowed_vector_store_ids",e),value:eT.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eT.setFieldValue("allowed_mcp_servers_and_groups",e),value:eT.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eT.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eT.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eT.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eT.setFieldValue("allowed_agents_and_groups",e),value:eT.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),eb?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tf||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tI)})})]},`router-settings-accordion-${tI}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eT,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tb,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eT,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eT.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(f.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0qf84m09hg_q8.js b/litellm/proxy/_experimental/out/_next/static/chunks/0qf84m09hg_q8.js
new file mode 100644
index 00000000000..48ebb4791d2
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0qf84m09hg_q8.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,463059,246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t],246349),e.s(["ChevronRight",0,t],463059)},555436,54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t],54943),e.s(["Search",0,t],555436)},344523,e=>{"use strict";let t=(0,e.i(475254).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],344523)},550896,e=>{"use strict";var t=e.i(201675);e.s(["SCROLL_EDGE_TOLERANCE_PX",0,1,"getMaxScrollOffset",0,function(e,t){return Math.max(0,e-t)},"normalizeScrollOffset",0,function(e,o){if(o<=0)return 0;let a=(0,t.clamp)(e,0,o),n=o-a,r=a<=1,i=n<=1;return r&&i?a<=n?0:o:r?0:i?o:a}])},60837,e=>{"use strict";var t=e.i(843476);let o="base-ui-disable-scrollbar";e.s(["styleDisableScrollbar",0,{className:o,getElement:e=>(0,t.jsx)("style",{nonce:e,href:o,precedence:"base-ui:low",children:`.${o}{scrollbar-width:none}.${o}::-webkit-scrollbar{display:none}`})}])},652225,e=>{"use strict";var t=e.i(271645),o=e.i(552245);let a=t.forwardRef(function(e,t){let{className:a,render:n,orientation:r="horizontal",style:i,...s}=e;return(0,o.useRenderElement)("div",e,{state:{orientation:r},ref:t,props:[{role:"separator","aria-orientation":r},s]})});e.s(["Separator",0,a])},469690,875812,381104,e=>{"use strict";e.i(247167);var t,o=e.i(733332),a=e.i(271645),n=e.i(956789);let r=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),i={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},s={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},l={disabled:!1,...s};e.s(["DEFAULT_FIELD_ROOT_STATE",0,l,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,s,"DEFAULT_VALIDITY_STATE",0,i,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[r.valid]:""}:{[r.invalid]:""}}],875812);let u={invalid:void 0,name:void 0,validityData:{state:i,errors:[],error:"",value:"",initialValue:null},setValidityData:n.NOOP,disabled:void 0,touched:s.touched,setTouched:n.NOOP,dirty:s.dirty,setDirty:n.NOOP,filled:s.filled,setFilled:n.NOOP,focused:s.focused,setFocused:n.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:l,markedDirtyRef:{current:!1},registerFieldControl:n.NOOP,validation:{getValidationProps:(e,t=n.EMPTY_OBJECT)=>t,inputRef:{current:null},registerInput:n.NOOP,commit:async()=>{},change:n.NOOP}},d=a.createContext(u);function c(e=!0){let t=a.useContext(d);if(t.setValidityData===n.NOOP&&!e)throw Error((0,o.default)(28));return t}e.s(["DEFAULT_FIELD_ROOT_CONTEXT",0,u,"FieldRootContext",0,d,"useFieldRootContext",0,c],469690);var p=e.i(146376);e.s(["useRegisterFieldControl",0,function(e,t,o,n,r=!0,i){let{registerFieldControl:s}=c(),l=a.useRef(null);l.current||(l.current=Symbol()),(0,p.useIsoLayoutEffect)(()=>{let a=l.current;if(a&&r)return s(a,{controlRef:e,getValue:n,id:t,name:i,value:o}),()=>{s(a,void 0)}},[e,r,n,t,i,s,o])}],381104)},538489,247778,e=>{"use strict";var t=e.i(271645),o=e.i(146376),a=e.i(667865),n=e.i(921374),r=e.i(229315),i=e.i(956789),s=e.i(788015);e.i(247167);let l=t.createContext({controlId:void 0,registerControlId:i.NOOP,labelId:void 0,setLabelId:i.NOOP,messageIds:[],setMessageIds:i.NOOP,getDescriptionProps:e=>e});function u(){return t.useContext(l)}e.s(["useLabelableContext",0,u],247778),e.s(["useLabelableId",0,function(e={}){let{id:l,implicit:d=!1,controlRef:c}=e,{controlId:p,registerControlId:f}=u(),g=(0,s.useBaseUiId)(l),m=d?p:void 0,v=(0,n.useRefWithInit)(()=>Symbol("labelable-control")),b=t.useRef(!1),S=t.useRef(null!=l),h=(0,a.useStableCallback)(()=>{b.current&&f!==i.NOOP&&(b.current=!1,f(v.current,void 0))});return(0,o.useIsoLayoutEffect)(()=>{let e;if(f!==i.NOOP){if(d){let t=c?.current;e=(0,r.isElement)(t)&&null!=t.closest("label")?l??null:m??g}else if(null!=l)S.current=!0,e=l;else{if(!S.current)return void h();e=g}if(void 0===e)return void h();b.current=!0,f(v.current,e)}},[l,c,m,f,d,g,v,h]),t.useEffect(()=>h,[h]),p??g}],538489)},884708,e=>{"use strict";var t=e.i(271645),o=e.i(956789);let a=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:o.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(a)}])},33383,e=>{"use strict";var t=e.i(271645),o=e.i(108868),a=e.i(145484),n=e.i(146376);e.s(["useAnchoredPopupScrollLock",0,function(e,r,i,s){let[l,u]=t.useState(!1);(0,n.useIsoLayoutEffect)(()=>{if(!e||!r||null==i)return void u(!1);let t=(0,o.ownerDocument)(i).documentElement.clientWidth,a=i.offsetWidth;u(t>0&&a>0&&a>=t-20)},[e,r,i]),(0,a.useScrollLock)(e&&(!r||l),s)}])},96533,e=>{"use strict";var t=e.i(733332),o=e.i(271645);let a=o.createContext(void 0);e.s(["useToolbarRootContext",0,function(e){let n=o.useContext(a);if(void 0===n&&!e)throw Error((0,t.default)(69));return n}])},643531,e=>{"use strict";var t=e.i(678745);e.s(["Check",()=>t.default])},678745,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},664659,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDown",()=>t.default])},31421,e=>{"use strict";var t=e.i(271645),o=e.i(146376),a=e.i(788015);e.s(["useAriaLabelledBy",0,function(e,n,r,i=!0,s){let[l,u]=t.useState(),d=(0,a.useBaseUiId)(s?`${s}-label`:void 0),c=e??n??l;return(0,o.useIsoLayoutEffect)(()=>{let t=e||n||!i?void 0:function(e,t){let o=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let o=e.id;if(o){let t=e.nextElementSibling;if(t&&t.htmlFor===o)return t}let a=e.labels;return a&&a[0]}(e);if(o)return!o.id&&t&&(o.id=t),o.id||void 0}(r.current,d);l!==t&&u(t)}),c}])},346570,e=>{"use strict";var t=e.i(271645),o=e.i(174080),a=e.i(647554),n=e.i(383976),r=e.i(675606),i=e.i(56434);e.s(["useTriggerFocusGuards",0,function(e,s){let l=t.useRef(null);return{preFocusGuardRef:l,handlePreFocusGuardFocus:function(t){o.flushSync(()=>{e.setOpen(!1,(0,r.createChangeEventDetails)(i.REASONS.focusOut,t.nativeEvent,t.currentTarget))});let a=(0,n.getTabbableBeforeElement)(l.current);a?.focus()},handleFocusTargetFocus:function(t){let l=e.select("positionerElement");if(l&&(0,n.isOutsideEvent)(t,l))e.context.beforeContentFocusGuardRef.current?.focus();else{o.flushSync(()=>{e.setOpen(!1,(0,r.createChangeEventDetails)(i.REASONS.focusOut,t.nativeEvent,t.currentTarget))});let u=(0,n.getTabbableAfterElement)(e.context.triggerFocusTargetRef.current||s.current);for(;null!==u&&(0,a.contains)(l,u);){let e=u;if((u=(0,n.getNextTabbable)(u))===e)break}u?.focus()}}}}])},784774,e=>{"use strict";var t=e.i(843476),o=e.i(271645),a=e.i(115504);let n=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{ref:n,"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...o})}));n.displayName="Table";let r=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("thead",{ref:n,"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...o}));r.displayName="TableHeader";let i=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("tbody",{ref:n,"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...o}));i.displayName="TableBody";let s=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("tfoot",{ref:n,"data-slot":"table-footer",className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...o}));s.displayName="TableFooter";let l=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("tr",{ref:n,"data-slot":"table-row",className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...o}));l.displayName="TableRow";let u=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("th",{ref:n,"data-slot":"table-head",className:(0,a.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o}));u.displayName="TableHead";let d=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("td",{ref:n,"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o}));d.displayName="TableCell",o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("caption",{ref:n,"data-slot":"table-caption",className:(0,a.cn)("mt-4 text-sm text-muted-foreground",e),...o})).displayName="TableCaption",e.s(["Table",0,n,"TableBody",0,i,"TableCell",0,d,"TableFooter",0,s,"TableHead",0,u,"TableHeader",0,r,"TableRow",0,l])},302747,e=>{"use strict";var t=e.i(843476),o=e.i(271645),a=e.i(115504);let n=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"skeleton",className:(0,a.cn)("animate-pulse rounded-md bg-accent",e),...o}));n.displayName="Skeleton",e.s(["Skeleton",0,n])},108821,e=>{"use strict";var t=e.i(733332),o=e.i(271645);let a=o.createContext(!1),n=o.createContext(void 0);e.s(["DialogRootContext",0,n,"IsDrawerContext",0,a,"useDialogRootContext",0,function(e){let a=o.useContext(n);if(!1===e&&void 0===a)throw Error((0,t.default)(27));return a}])},402820,156736,209793,625834,784324,264951,e=>{"use strict";e.i(247167);var t,o,a=e.i(271645),n=e.i(108821),r=e.i(552245),i=e.i(405005),s=e.i(209407);let l={...i.popupStateMapping,...s.transitionStatusMapping},u=a.forwardRef(function(e,t){let{render:o,className:a,style:i,forceRender:s=!1,...u}=e,{store:d}=(0,n.useDialogRootContext)(),c=d.useState("open"),p=d.useState("nested"),f=d.useState("mounted"),g=d.useState("transitionStatus");return(0,r.useRenderElement)("div",e,{state:{open:c,transitionStatus:g},ref:[d.context.backdropRef,t],stateAttributesMapping:l,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:s||!p})});e.s(["DialogBackdrop",0,u],402820);var d=e.i(540886),c=e.i(675606),p=e.i(56434);let f=a.forwardRef(function(e,t){let{render:o,className:a,style:i,disabled:s=!1,nativeButton:l=!0,...u}=e,{store:f}=(0,n.useDialogRootContext)(),g=f.useState("open"),{getButtonProps:m,buttonRef:v}=(0,d.useButton)({disabled:s,native:l});return(0,r.useRenderElement)("button",e,{state:{disabled:s},ref:[t,v],props:[{onClick:function(e){g&&f.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.closePress,e.nativeEvent))}},u,m]})});e.s(["DialogClose",0,f],156736);var g=e.i(788015);let m=a.forwardRef(function(e,t){let{render:o,className:a,style:i,id:s,...l}=e,{store:u}=(0,n.useDialogRootContext)(),d=(0,g.useBaseUiId)(s);return u.useSyncedValueWithCleanup("descriptionElementId",d),(0,r.useRenderElement)("p",e,{ref:t,props:[{id:d},l]})});e.s(["DialogDescription",0,m],209793);var v=e.i(61487);let b=((t={}).nestedDialogs="--nested-dialogs",t),S=((o={})[o.open=i.CommonPopupDataAttributes.open]="open",o[o.closed=i.CommonPopupDataAttributes.closed]="closed",o[o.startingStyle=i.CommonPopupDataAttributes.startingStyle]="startingStyle",o[o.endingStyle=i.CommonPopupDataAttributes.endingStyle]="endingStyle",o.nested="data-nested",o.nestedDialogOpen="data-nested-dialog-open",o);var h=e.i(733332);let C=a.createContext(void 0);function D(){let e=a.useContext(C);if(void 0===e)throw Error((0,h.default)(26));return e}e.s(["DialogPortalContext",0,C,"useDialogPortalContext",0,D],625834);var R=e.i(137584),x=e.i(673327),O=e.i(264111),E=e.i(843476);let y={...i.popupStateMapping,...s.transitionStatusMapping,nestedDialogOpen:e=>e?{[S.nestedDialogOpen]:""}:null},P=a.forwardRef(function(e,t){let{render:o,className:a,style:i,finalFocus:s,initialFocus:l,...u}=e,{store:d}=(0,n.useDialogRootContext)(),c=d.useState("descriptionElementId"),p=d.useState("disablePointerDismissal"),f=d.useState("floatingRootContext"),g=d.useState("popupProps"),m=d.useState("modal"),S=d.useState("mounted"),h=d.useState("nested"),C=d.useState("nestedOpenDialogCount"),P=d.useState("open"),T=d.useState("openMethod"),w=d.useState("titleElementId"),I=d.useState("transitionStatus"),N=d.useState("role"),k=f.useState("floatingId"),A=u.id??k;D(),(0,R.useOpenChangeComplete)({open:P,ref:d.context.popupRef,onComplete(){P&&d.context.onOpenChangeComplete?.(!0)}});let M=void 0===l?(0,O.createDefaultInitialFocus)(d.context.popupRef):l,F=d.useStateSetter("popupElement"),B=(0,r.useRenderElement)("div",e,{state:{open:P,nested:h,transitionStatus:I,nestedDialogOpen:C>0},props:[g,{id:A,"aria-labelledby":w??void 0,"aria-describedby":c??void 0,role:N,...O.FOCUSABLE_POPUP_PROPS,hidden:!S,onKeyDown(e){x.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[b.nestedDialogs]:C}},u],ref:[t,d.context.popupRef,F],stateAttributesMapping:y});return(0,E.jsx)(v.FloatingFocusManager,{context:f,openInteractionType:T,disabled:!S,closeOnFocusOut:!p,initialFocus:M,returnFocus:s,modal:!1!==m,restoreFocus:"popup",children:B})});e.s(["DialogPopup",0,P],784324);var T=e.i(144394),w=e.i(726674),I=e.i(426);let N=a.forwardRef(function(e,t){let{keepMounted:o=!1,...a}=e,{store:r}=(0,n.useDialogRootContext)(),i=r.useState("mounted"),s=r.useState("modal"),l=r.useState("open");return i||o?(0,E.jsx)(C.Provider,{value:o,children:(0,E.jsxs)(w.FloatingPortal,{ref:t,...a,children:[i&&!0===s&&(0,E.jsx)(I.InternalBackdrop,{ref:r.context.internalBackdropRef,inert:(0,T.inertValue)(!l)}),e.children]})}):null});e.s(["DialogPortal",0,N],264951)},67530,e=>{"use strict";var t=e.i(271645),o=e.i(145484),a=e.i(956789),n=e.i(17989),r=e.i(647554),i=e.i(675606),s=e.i(56434),l=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:i,isDrawer:s}){let u=e.useState("open"),d=e.useState("disablePointerDismissal"),c=e.useState("modal"),p=e.useState("popupElement"),f=e.useState("floatingRootContext"),[g,m]=t.useState(0),[v,b]=t.useState(0),S=0===g,h=(0,n.useDismiss)(f,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===c?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let o=(0,r.getTarget)(t);return!!S&&!d&&(!c||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===o||e.context.backdropRef.current===o||(0,r.contains)(o,p)&&!o?.hasAttribute("data-base-ui-portal"))},escapeKey:S});(0,o.useScrollLock)(u&&!0===c,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{m(e),b(t)}),e.useContextCallback("onNestedDialogClose",()=>{m(0),b(0)}),t.useEffect(()=>(i?.onNestedDialogOpen&&u&&i.onNestedDialogOpen(g+1,v+ +!!s),i?.onNestedDialogClose&&!u&&i.onNestedDialogClose(),()=>{i?.onNestedDialogClose&&u&&i.onNestedDialogClose()}),[s,u,g,v,i]);let C=h.reference??a.EMPTY_OBJECT,D=h.trigger??a.EMPTY_OBJECT,R=h.floating??a.EMPTY_OBJECT;return(0,l.usePopupInteractionProps)(e,{activeTriggerProps:C,inactiveTriggerProps:D,popupProps:R,nestedOpenDialogCount:g,nestedOpenDrawerCount:v}),null},"useDialogRoot",0,function(e){let{store:o,actionsRef:a}=e,n=o.useState("open");(0,l.usePopupRootSync)(o,n),(0,l.useImplicitActiveTrigger)(o);let{forceUnmount:r}=(0,l.useOpenStateTransitions)(n,o),u=t.useCallback(()=>{o.setOpen(!1,(0,i.createChangeEventDetails)(s.REASONS.imperativeAction))},[o]);t.useImperativeHandle(a,()=>({unmount:r,close:u}),[r,u])}])},366250,301807,e=>{"use strict";var t=e.i(271645),o=e.i(713203),a=e.i(67530),n=e.i(108821),r=e.i(616269),i=e.i(301252),s=e.i(116786),l=e.i(990627),u=e.i(264111);let d={...s.popupStoreSelectors,modal:(0,r.createSelector)(e=>e.modal),nested:(0,r.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,r.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,r.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,r.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,r.createSelector)(e=>e.openMethod),descriptionElementId:(0,r.createSelector)(e=>e.descriptionElementId),titleElementId:(0,r.createSelector)(e=>e.titleElementId),viewportElement:(0,r.createSelector)(e=>e.viewportElement),role:(0,r.createSelector)(e=>e.role)};class c extends i.ReactStore{constructor(e,o,a=!1){const n=new l.PopupTriggerMap,r=function(e={}){return{...(0,s.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);r.floatingRootContext=(0,s.createPopupFloatingRootContext)(n,o,a),super(r,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0},d)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o={open:e};(0,u.setPopupOpenState)(o,e,t.trigger),this.update(o)};static useStore(e,t){return(0,u.usePopupStore)(e,(e,o)=>new c(t,e,o),!0).store}}e.s(["DialogStore",0,c],301807);var p=e.i(843476);e.s(["useRenderDialogRoot",0,function(e,r="dialog"){let{children:i,open:s,defaultOpen:l=!1,onOpenChange:u,onOpenChangeComplete:d,disablePointerDismissal:f=!1,modal:g=!0,actionsRef:m,handle:v,triggerId:b,defaultTriggerId:S=null}=e,h="alert-dialog"===r,C=(0,n.useDialogRootContext)(!0),D={modal:!!h||g,disablePointerDismissal:h||f,nested:!!C,role:h?"alertdialog":"dialog"},R=c.useStore(v?.store,{open:l,openProp:s,activeTriggerId:S,triggerIdProp:b,...D});(0,o.useOnFirstRender)(()=>{let e=void 0===s&&!1===R.state.open&&!0===l?{open:!0,activeTriggerId:S}:null;h?R.update(e?{...D,...e}:D):e&&R.update(e)}),R.useControlledProp("openProp",s),R.useControlledProp("triggerIdProp",b),R.useSyncedValues(D),R.useContextCallback("onOpenChange",u),R.useContextCallback("onOpenChangeComplete",d);let x=R.useState("open"),O=R.useState("mounted"),E=R.useState("payload");(0,a.useDialogRoot)({store:R,actionsRef:m});let y=t.useMemo(()=>({store:R}),[R]);return(0,p.jsx)(n.IsDrawerContext.Provider,{value:!1,children:(0,p.jsxs)(n.DialogRootContext.Provider,{value:y,children:[(x||O)&&(0,p.jsx)(a.DialogInteractions,{store:R,parentContext:C?.store.context,isDrawer:"drawer"===r}),"function"==typeof i?i({payload:E}):i]})})}],366250)},974217,e=>{"use strict";e.i(247167);var t,o=e.i(271645),a=e.i(552245),n=e.i(405005),r=e.i(209407),i=e.i(108821),s=e.i(625834);let l=((t={})[t.open=n.CommonPopupDataAttributes.open]="open",t[t.closed=n.CommonPopupDataAttributes.closed]="closed",t[t.startingStyle=n.CommonPopupDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=n.CommonPopupDataAttributes.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t),u={...n.popupStateMapping,...r.transitionStatusMapping,nested:e=>e?{[l.nested]:""}:null,nestedDialogOpen:e=>e?{[l.nestedDialogOpen]:""}:null},d=o.forwardRef(function(e,t){let{render:o,className:n,style:r,children:l,...d}=e,c=(0,s.useDialogPortalContext)(),{store:p}=(0,i.useDialogRootContext)(),f=p.useState("open"),g=p.useState("nested"),m=p.useState("transitionStatus"),v=p.useState("nestedOpenDialogCount"),b=p.useState("mounted"),S=p.useStateSetter("viewportElement");return(0,a.useRenderElement)("div",e,{enabled:c||b,state:{open:f,nested:g,transitionStatus:m,nestedDialogOpen:v>0},ref:[t,S],stateAttributesMapping:u,props:[{role:"presentation",hidden:!b,style:{pointerEvents:f?void 0:"none"},children:l},d]})});e.s(["DialogViewport",0,d],974217)},77173,313488,e=>{"use strict";e.i(247167);var t=e.i(271645),o=e.i(108821),a=e.i(552245),n=e.i(788015);let r=t.forwardRef(function(e,t){let{render:r,className:i,style:s,id:l,...u}=e,{store:d}=(0,o.useDialogRootContext)(),c=(0,n.useBaseUiId)(l);return d.useSyncedValueWithCleanup("titleElementId",c),(0,a.useRenderElement)("h2",e,{ref:t,props:[{id:c},u]})});e.s(["DialogTitle",0,r],77173);var i=e.i(733332),s=e.i(540886),l=e.i(405005),u=e.i(638396),d=e.i(264111),c=e.i(385689),p=e.i(32199);let f=t.forwardRef(function(e,r){let{render:f,className:g,style:m,disabled:v=!1,nativeButton:b=!0,id:S,payload:h,handle:C,...D}=e,R=(0,o.useDialogRootContext)(!0),x=C?.store??R?.store;if(!x)throw Error((0,i.default)(79));let O=(0,n.useBaseUiId)(S),E=x.useState("floatingRootContext"),y=x.useState("isOpenedByTrigger",O),P=x.useState("triggerPopupId",O),T=t.useRef(null),{registerTrigger:w,isMountedByThisTrigger:I}=(0,d.useTriggerDataForwarding)(O,T,x,{payload:h}),{getButtonProps:N,buttonRef:k}=(0,s.useButton)({disabled:v,native:b}),A=(0,c.useClick)(E,{enabled:null!=E}),M=(0,p.useOpenMethodTriggerProps)(()=>x.select("open"),e=>{x.set("openMethod",e)}),F=x.useState("triggerProps",I);return(0,a.useRenderElement)("button",e,{state:{disabled:v,open:y},ref:[k,r,w,T],props:[A.reference,F,M,{[u.CLICK_TRIGGER_IDENTIFIER]:"",id:O,"aria-haspopup":"dialog","aria-expanded":y,"aria-controls":P},D,N],stateAttributesMapping:l.triggerOpenStateMapping})});e.s(["DialogTrigger",0,f],313488)},325326,e=>{"use strict";var t=e.i(301807),o=e.i(675606),a=e.i(56434);class n{constructor(e){this.store=e??new t.DialogStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,o.createChangeEventDetails)(a.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,o.createChangeEventDetails)(a.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,o.createChangeEventDetails)(a.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["DialogHandle",0,n,"createDialogHandle",0,function(){return new n}])},353753,e=>{"use strict";e.s([],914651),e.i(914651);var t=e.i(402820),o=e.i(156736),a=e.i(209793),n=e.i(784324),r=e.i(264951),i=e.i(271645),s=e.i(108821),l=e.i(366250),u=e.i(974217),d=e.i(77173),c=e.i(313488),p=e.i(325326);e.s(["Backdrop",()=>t.DialogBackdrop,"Close",()=>o.DialogClose,"Description",()=>a.DialogDescription,"Handle",()=>p.DialogHandle,"Popup",()=>n.DialogPopup,"Portal",()=>r.DialogPortal,"Root",0,function(e){let t=i.useContext(s.IsDrawerContext)?"drawer":"dialog";return(0,l.useRenderDialogRoot)(e,t)},"Title",()=>d.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>u.DialogViewport,"createHandle",()=>p.createDialogHandle],828376);var f=e.i(828376);e.s(["Dialog",0,f],353753)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},110204,e=>{"use strict";var t=e.i(843476),o=e.i(271645),a=e.i(115504);let n=o.forwardRef(({className:e,...o},n)=>(0,t.jsx)("label",{ref:n,"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...o}));n.displayName="Label",e.s(["Label",0,n])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0if4h9a-qzqx4.js b/litellm/proxy/_experimental/out/_next/static/chunks/0qkqkii3nce2s.js
similarity index 61%
rename from litellm/proxy/_experimental/out/_next/static/chunks/0if4h9a-qzqx4.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0qkqkii3nce2s.js
index ca487300b91..3b450b7c99e 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0if4h9a-qzqx4.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0qkqkii3nce2s.js
@@ -1,11 +1,11 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),o=e.i(540143),i=e.i(915823),a=e.i(619273),n=class extends i.Subscribable{#e;#t=void 0;#r;#o;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.hashKey)(t.mutationKey)!==(0,a.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#a()}mutate(e,t){return this.#o=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#a(e){o.notifyManager.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#o.onSuccess?.(e.data,t,r,o)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(e.data,null,t,r,o)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#o.onError?.(e.error,t,r,o)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(void 0,e.error,t,r,o)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},s=e.i(912598);e.s(["useMutation",0,function(e,r){let i=(0,s.useQueryClient)(r),[l]=t.useState(()=>new n(i,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let c=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(o.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d=t.useCallback((e,t)=>{l.mutate(e,t).catch(a.noop)},[l]);if(c.error&&(0,a.shouldThrowError)(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}],954616)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(242064),i=e.i(529681);let a=e=>{let{prefixCls:o,className:i,style:a,size:n,shape:s}=e,l=(0,r.default)({[`${o}-lg`]:"large"===n,[`${o}-sm`]:"small"===n}),c=(0,r.default)({[`${o}-circle`]:"circle"===s,[`${o}-square`]:"square"===s,[`${o}-round`]:"round"===s}),d=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(o,l,c,i),style:Object.assign(Object.assign({},d),a)})};e.i(296059);var n=e.i(694758),s=e.i(915654),l=e.i(246422),c=e.i(838378);let d=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,s.unit)(e)}),p=e=>Object.assign({width:e},u(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),h=e=>Object.assign({width:e},u(e)),f=(e,t,r)=>{let{skeletonButtonCls:o}=e;return{[`${r}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${o}-round`]:{borderRadius:t}}},g=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),b=(0,l.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:o,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:n,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:b,padding:v,marginSM:x,borderRadius:y,titleHeight:_,blockRadius:k,paragraphLiHeight:w,controlHeightXS:j,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:b},p(l)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},p(c)),[`${r}-sm`]:Object.assign({},p(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[o]:{width:"100%",height:_,background:b,borderRadius:k,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:b,borderRadius:k,"+ li":{marginBlockStart:j}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${i} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[o]:{marginBlockStart:x,[`+ ${i}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:o,controlHeightLG:i,controlHeightSM:a,gradientFromColor:n,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:t,width:s(o).mul(2).equal(),minWidth:s(o).mul(2).equal()},g(o,s))},f(e,o,r)),{[`${r}-lg`]:Object.assign({},g(i,s))}),f(e,i,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},g(a,s))}),f(e,a,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:o,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},p(o)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(i)),[`${t}${t}-sm`]:Object.assign({},p(a))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:o,controlHeightLG:i,controlHeightSM:a,gradientFromColor:n,calc:s}=e;return{[o]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},m(t,s)),[`${o}-lg`]:Object.assign({},m(i,s)),[`${o}-sm`]:Object.assign({},m(a,s))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:o,borderRadiusSM:i,calc:a}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:o,borderRadius:i},h(a(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(r)),{maxWidth:a(r).mul(4).equal(),maxHeight:a(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[a]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[`
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(242064),i=e.i(529681);let a=e=>{let{prefixCls:o,className:i,style:a,size:n,shape:s}=e,l=(0,r.default)({[`${o}-lg`]:"large"===n,[`${o}-sm`]:"small"===n}),c=(0,r.default)({[`${o}-circle`]:"circle"===s,[`${o}-square`]:"square"===s,[`${o}-round`]:"round"===s}),d=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(o,l,c,i),style:Object.assign(Object.assign({},d),a)})};e.i(296059);var n=e.i(694758),s=e.i(915654),l=e.i(246422),c=e.i(838378);let d=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,s.unit)(e)}),p=e=>Object.assign({width:e},u(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),h=e=>Object.assign({width:e},u(e)),f=(e,t,r)=>{let{skeletonButtonCls:o}=e;return{[`${r}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${o}-round`]:{borderRadius:t}}},g=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),b=(0,l.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:o,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:n,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:b,padding:v,marginSM:x,borderRadius:y,titleHeight:_,blockRadius:k,paragraphLiHeight:w,controlHeightXS:j,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:b},p(l)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},p(c)),[`${r}-sm`]:Object.assign({},p(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[o]:{width:"100%",height:_,background:b,borderRadius:k,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:b,borderRadius:k,"+ li":{marginBlockStart:j}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${i} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[o]:{marginBlockStart:x,[`+ ${i}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:o,controlHeightLG:i,controlHeightSM:a,gradientFromColor:n,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:t,width:s(o).mul(2).equal(),minWidth:s(o).mul(2).equal()},g(o,s))},f(e,o,r)),{[`${r}-lg`]:Object.assign({},g(i,s))}),f(e,i,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},g(a,s))}),f(e,a,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:o,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},p(o)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(i)),[`${t}${t}-sm`]:Object.assign({},p(a))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:o,controlHeightLG:i,controlHeightSM:a,gradientFromColor:n,calc:s}=e;return{[o]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},m(t,s)),[`${o}-lg`]:Object.assign({},m(i,s)),[`${o}-sm`]:Object.assign({},m(a,s))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:o,borderRadiusSM:i,calc:a}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:o,borderRadius:i},h(a(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(r)),{maxWidth:a(r).mul(4).equal(),maxHeight:a(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[a]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[`
${o},
${i} > li,
${r},
${a},
${n},
${s}
- `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,c.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v=e=>{let{prefixCls:o,className:i,style:a,rows:n=0}=e,s=Array.from({length:n}).map((r,o)=>t.createElement("li",{key:o,style:{width:((e,t)=>{let{width:r,rows:o=2}=t;return Array.isArray(r)?r[e]:o-1===e?r:void 0})(o,e)}}));return t.createElement("ul",{className:(0,r.default)(o,i),style:a},s)},x=({prefixCls:e,className:o,width:i,style:a})=>t.createElement("h3",{className:(0,r.default)(e,o),style:Object.assign({width:i},a)});function y(e){return e&&"object"==typeof e?e:{}}let _=e=>{let{prefixCls:i,loading:n,className:s,rootClassName:l,style:c,children:d,avatar:u=!1,title:p=!0,paragraph:m=!0,active:h,round:f}=e,{getPrefixCls:g,direction:_,className:k,style:w}=(0,o.useComponentConfig)("skeleton"),j=g("skeleton",i),[S,C,z]=b(j);if(n||!("loading"in e)){let e,o,i=!!u,n=!!p,d=!!m;if(i){let r=Object.assign(Object.assign({prefixCls:`${j}-avatar`},n&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(u));e=t.createElement("div",{className:`${j}-header`},t.createElement(a,Object.assign({},r)))}if(n||d){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${j}-title`},!i&&d?{width:"38%"}:i&&d?{width:"50%"}:{}),y(p));e=t.createElement(x,Object.assign({},r))}if(d){let e,o=Object.assign(Object.assign({prefixCls:`${j}-paragraph`},(e={},i&&n||(e.width="61%"),!i&&n?e.rows=3:e.rows=2,e)),y(m));r=t.createElement(v,Object.assign({},o))}o=t.createElement("div",{className:`${j}-content`},e,r)}let g=(0,r.default)(j,{[`${j}-with-avatar`]:i,[`${j}-active`]:h,[`${j}-rtl`]:"rtl"===_,[`${j}-round`]:f},k,s,l,C,z);return S(t.createElement("div",{className:g,style:Object.assign(Object.assign({},w),c)},e,o))}return null!=d?d:null};_.Button=e=>{let{prefixCls:n,className:s,rootClassName:l,active:c,block:d=!1,size:u="default"}=e,{getPrefixCls:p}=t.useContext(o.ConfigContext),m=p("skeleton",n),[h,f,g]=b(m),v=(0,i.default)(e,["prefixCls"]),x=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},s,l,f,g);return h(t.createElement("div",{className:x},t.createElement(a,Object.assign({prefixCls:`${m}-button`,size:u},v))))},_.Avatar=e=>{let{prefixCls:n,className:s,rootClassName:l,active:c,shape:d="circle",size:u="default"}=e,{getPrefixCls:p}=t.useContext(o.ConfigContext),m=p("skeleton",n),[h,f,g]=b(m),v=(0,i.default)(e,["prefixCls","className"]),x=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c},s,l,f,g);return h(t.createElement("div",{className:x},t.createElement(a,Object.assign({prefixCls:`${m}-avatar`,shape:d,size:u},v))))},_.Input=e=>{let{prefixCls:n,className:s,rootClassName:l,active:c,block:d,size:u="default"}=e,{getPrefixCls:p}=t.useContext(o.ConfigContext),m=p("skeleton",n),[h,f,g]=b(m),v=(0,i.default)(e,["prefixCls"]),x=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},s,l,f,g);return h(t.createElement("div",{className:x},t.createElement(a,Object.assign({prefixCls:`${m}-input`,size:u},v))))},_.Image=e=>{let{prefixCls:i,className:a,rootClassName:n,style:s,active:l}=e,{getPrefixCls:c}=t.useContext(o.ConfigContext),d=c("skeleton",i),[u,p,m]=b(d),h=(0,r.default)(d,`${d}-element`,{[`${d}-active`]:l},a,n,p,m);return u(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${d}-image`,a),style:s},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},_.Node=e=>{let{prefixCls:i,className:a,rootClassName:n,style:s,active:l,children:c}=e,{getPrefixCls:d}=t.useContext(o.ConfigContext),u=d("skeleton",i),[p,m,h]=b(u),f=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:l},m,a,n,h);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${u}-image`,a),style:s},c)))},e.s(["default",0,_],185793)},922611,e=>{"use strict";var t=e.i(271645),r=e.i(175066);function o(){}let i=t.createContext({add:o,remove:o});e.s(["usePanelRef",0,function(e){let o=t.useContext(i),a=t.useRef(null);return(0,r.default)(t=>{if(t){let r=e?t.querySelector(e):t;r&&(o.add(r),a.current=r)}else o.remove(a.current)})}])},678784,e=>{"use strict";var t=e.i(678745);e.s(["CheckIcon",()=>t.default])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",0,t])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["ExclamationCircleOutlined",0,a],270377)},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,o,i){let[a,n,s]=(0,t.useDebouncedState)(e,o,i);return(0,r.useEffect)(()=>{n(e)},[e,n]),[a,s]}])},541202,e=>{"use strict";var t=e.i(843476),r=e.i(522016),o=e.i(560445);e.s(["DeprecationBanner",0,({featureName:e})=>(0,t.jsx)(o.Alert,{message:`${e} is on a draft deprecation list`,description:(0,t.jsxs)(t.Fragment,{children:[`${e} is one of several experimental features we're considering removing, potentially as early as September 1, 2026. This list is a draft and is not final. If you rely on this feature, please share feedback on the `,(0,t.jsx)(r.default,{href:"https://github.com/BerriAI/litellm/discussions/32090",target:"_blank",rel:"noopener noreferrer",children:"deprecation discussion"}),"."]}),type:"info",showIcon:!0,closable:!0,style:{marginBottom:16}})])},768371,e=>{"use strict";let t,r;var o=e.i(247167);let i=/\{[^{}]+\}/g;function a(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function n(e,t,r){if(!t||"object"!=typeof t)return"";let o=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)o.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let i=o.join(",");switch(r.style){case"form":return`${e}=${i}`;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return i}}for(let i in t){let n="deepObject"===r.style?`${e}[${i}]`:i;o.push(a(n,t[i],r))}let n=o.join(i);return"label"===r.style||"matrix"===r.style?`${i}${n}`:n}function s(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",i=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(o);switch(r.style){case"simple":return i;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return`${e}=${i}`}}let o={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(let o of t)"simple"===r.style||"label"===r.style?i.push(!0===r.allowReserved?o:encodeURIComponent(o)):i.push(a(e,o,r));return"label"===r.style||"matrix"===r.style?`${o}${i.join(o)}`:i.join(o)}function l(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let o in t){let i=t[o];if(null!=i){if(Array.isArray(i)){if(0===i.length)continue;r.push(s(o,i,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof i){r.push(n(o,i,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(a(o,i,e))}}return r.join("&")}}function c(e,t){let r=e;for(let o of e.match(i)??[]){let e=o.substring(1,o.length-1),i=!1,l="simple";if(e.endsWith("*")&&(i=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(l="label",e=e.substring(1)):e.startsWith(";")&&(l="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let c=t[e];if(Array.isArray(c)){r=r.replace(o,s(e,c,{style:l,explode:i}));continue}if("object"==typeof c){r=r.replace(o,n(e,c,{style:l,explode:i}));continue}if("matrix"===l){r=r.replace(o,`;${a(e,c)}`);continue}r=r.replace(o,"label"===l?`.${encodeURIComponent(c)}`:encodeURIComponent(c))}return r}function d(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function u(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,o]of r instanceof Headers?r.entries():Object.entries(r))if(null===o)t.delete(e);else if(Array.isArray(o))for(let r of o)t.append(e,r);else void 0!==o&&t.set(e,o);return t}function p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var m=e.i(954616),h=e.i(621482),f=e.i(869230),g=e.i(469637),b=e.i(254440),v=e.i(266027),x=e.i(431703),y=e.i(97198);let _=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),k=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:i=globalThis.fetch,querySerializer:a,bodySerializer:n,pathSerializer:s,headers:m,requestInitExt:h,...f}={...e};h="object"==typeof o.default&&Number.parseInt(o.default?.versions?.node?.substring(0,2))>=18&&o.default.versions.undici?h:void 0,t=p(t);let g=[];async function b(e,o){var b,v;let x,y,_,k,w,{baseUrl:j,fetch:S=i,Request:C=r,headers:z,params:R={},parseAs:O="json",querySerializer:M,bodySerializer:$=n??d,pathSerializer:E,body:N,middleware:T=[],...A}=o||{},I=t;j&&(I=p(j)??t);let L="function"==typeof a?a:l(a);M&&(L="function"==typeof M?M:l({..."object"==typeof a?a:{},...M}));let H=E||s||c,B=void 0===N?void 0:$(N,u(m,z,R.header)),q=u(void 0===B||B instanceof FormData?{}:{"Content-Type":"application/json"},m,z,R.header),P=[...g,...T],F={redirect:"follow",...f,...A,body:B,headers:q},V=new C((b=e,v={baseUrl:I,params:R,querySerializer:L,pathSerializer:H},x=`${v.baseUrl}${b}`,v.params?.path&&(x=v.pathSerializer(x,v.params.path)),(y=v.querySerializer(v.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(x+=`?${y}`),x),F);for(let e in A)e in V||(V[e]=A[e]);if(P.length){for(let t of(_=Math.random().toString(36).slice(2,11),k=Object.freeze({baseUrl:I,fetch:S,parseAs:O,querySerializer:L,bodySerializer:$,pathSerializer:H}),P))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:V,schemaPath:e,params:R,options:k,id:_});if(r)if(r instanceof C)V=r;else if(r instanceof Response){w=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!w){try{w=await S(V,h)}catch(r){let t=r;if(P.length)for(let r=P.length-1;r>=0;r--){let o=P[r];if(o&&"object"==typeof o&&"function"==typeof o.onError){let r=await o.onError({request:V,error:t,schemaPath:e,params:R,options:k,id:_});if(r){if(r instanceof Response){t=void 0,w=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(P.length)for(let t=P.length-1;t>=0;t--){let r=P[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:V,response:w,schemaPath:e,params:R,options:k,id:_});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");w=t}}}}let D=w.headers.get("Content-Length");if(204===w.status||"HEAD"===V.method||"0"===D&&!w.headers.get("Transfer-Encoding")?.includes("chunked"))return w.ok?{data:void 0,response:w}:{error:void 0,response:w};if(w.ok){let e=async()=>{if("stream"===O)return w.body;if("json"===O&&!D){let e=await w.text();return e?JSON.parse(e):void 0}return await w[O]()};return{data:await e(),response:w}}let U=await w.text();try{U=JSON.parse(U)}catch{}return{error:U,response:w}}return{request:(e,t,r)=>b(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>b(e,{...t,method:"GET"}),PUT:(e,t)=>b(e,{...t,method:"PUT"}),POST:(e,t)=>b(e,{...t,method:"POST"}),DELETE:(e,t)=>b(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>b(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>b(e,{...t,method:"HEAD"}),PATCH:(e,t)=>b(e,{...t,method:"PATCH"}),TRACE:(e,t)=>b(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");g.push(t)}},eject(...e){for(let t of e){let e=g.indexOf(t);-1!==e&&g.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});k.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await _(e,((e,t)=>{let{pathname:r,search:o}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${o}`})(e.url,t)):e,o=(0,y.getAuthToken)();return o&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${o}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),o=r;try{o=JSON.parse(r),t=(0,x.deriveErrorMessage)(o)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new x.ApiError(t,e.status,o)}});let w=(t=async({queryKey:[e,t,r],signal:o})=>{let i=k[e.toUpperCase()],{data:a,error:n,response:s}=await i(t,{signal:o,...r});if(n)throw n;return 204===s.status||"0"===s.headers.get("Content-Length")?a??null:a},{queryOptions:r=(e,r,...[o,i])=>({queryKey:void 0===o?[e,r]:[e,r,o],queryFn:t,...i}),useQuery:(e,t,...[o,i,a])=>(0,v.useQuery)(r(e,t,o,i),a),useSuspenseQuery:(e,t,...[o,i,a])=>{var n;return n=r(e,t,o,i),(0,g.useBaseQuery)({...n,enabled:!0,suspense:!0,throwOnError:b.defaultThrowOnError,placeholderData:void 0},f.QueryObserver,a)},useInfiniteQuery:(e,t,o,i,a)=>{let{pageParamName:n="cursor",...s}=i,{queryKey:l}=r(e,t,o);return(0,h.useInfiniteQuery)({queryKey:l,queryFn:async({queryKey:[e,t,r],pageParam:o=0,signal:i})=>{let a=k[e.toUpperCase()],s={...r,signal:i,params:{...r?.params||{},query:{...r?.params?.query,[n]:o}}},{data:l,error:c}=await a(t,s);if(c)throw c;return l},...s},a)},useMutation:(e,t,r,o)=>(0,m.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let o=k[e.toUpperCase()],{data:i,error:a}=await o(t,r);if(a)throw a;return i},...r},o)});e.s(["$api",0,w,"fetchClient",0,k],768371)},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},466828,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(678784);let i=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var a=e.i(650056);let n={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:s})=>{let[l,c]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:l?(0,t.jsx)(o.CheckIcon,{size:16}):(0,t.jsx)(i,{size:16})}),(0,t.jsx)(a.Prism,{language:s,style:n,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],466828)},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["KeyOutlined",0,a],438957)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["ExperimentOutlined",0,a],19732)},518617,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["CloseCircleOutlined",0,a],518617)},366308,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["ToolOutlined",0,a],366308)},313603,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["SettingOutlined",0,a],313603)},782273,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z"}}]},name:"sound",theme:"outlined"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["SoundOutlined",0,a],782273)},793916,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["AudioOutlined",0,a],793916)},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["LinkOutlined",0,a],596239)},339019,865361,e=>{"use strict";var t,r,o=((t={}).AUDIO_SPEECH="audio_speech",t.AUDIO_TRANSCRIPTION="audio_transcription",t.IMAGE_GENERATION="image_generation",t.VIDEO_GENERATION="video_generation",t.CHAT="chat",t.RESPONSES="responses",t.IMAGE_EDITS="image_edits",t.ANTHROPIC_MESSAGES="anthropic_messages",t.EMBEDDING="embedding",t),i=((r={}).IMAGE="image",r.VIDEO="video",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",r.EMBEDDINGS="embeddings",r.SPEECH="speech",r.TRANSCRIPTION="transcription",r.A2A_AGENTS="a2a_agents",r.MCP="mcp",r.REALTIME="realtime",r.INTERACTIONS="interactions",r);let a={image_generation:"image",video_generation:"video",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages",audio_speech:"speech",audio_transcription:"transcription",embedding:"embeddings"};e.s(["EndpointType",()=>i,"getEndpointType",0,e=>Object.values(o).includes(e)?a[e]:"chat"],865361),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:r,accessToken:o,apiKey:a,inputMessage:n,chatHistory:s,selectedTags:l,selectedVectorStores:c,selectedGuardrails:d,selectedPolicies:u,selectedMCPServers:p,mcpServers:m,mcpServerToolRestrictions:h,selectedVoice:f,endpointType:g,selectedModel:b,selectedSdk:v,proxySettings:x}=e,y="session"===r?o:a,_=window.location.origin,k=x?.LITELLM_UI_API_DOC_BASE_URL;k&&k.trim()?_=k:x?.PROXY_BASE_URL&&(_=x.PROXY_BASE_URL);let w=n||"Your prompt here",j=w.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),S=s.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),C={};l.length>0&&(C.tags=l),c.length>0&&(C.vector_stores=c),d.length>0&&(C.guardrails=d),u.length>0&&(C.policies=u);let z=b||"your-model-name",R="azure"===v?`import openai
+ `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,c.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v=e=>{let{prefixCls:o,className:i,style:a,rows:n=0}=e,s=Array.from({length:n}).map((r,o)=>t.createElement("li",{key:o,style:{width:((e,t)=>{let{width:r,rows:o=2}=t;return Array.isArray(r)?r[e]:o-1===e?r:void 0})(o,e)}}));return t.createElement("ul",{className:(0,r.default)(o,i),style:a},s)},x=({prefixCls:e,className:o,width:i,style:a})=>t.createElement("h3",{className:(0,r.default)(e,o),style:Object.assign({width:i},a)});function y(e){return e&&"object"==typeof e?e:{}}let _=e=>{let{prefixCls:i,loading:n,className:s,rootClassName:l,style:c,children:d,avatar:u=!1,title:p=!0,paragraph:m=!0,active:h,round:f}=e,{getPrefixCls:g,direction:_,className:k,style:w}=(0,o.useComponentConfig)("skeleton"),j=g("skeleton",i),[S,C,z]=b(j);if(n||!("loading"in e)){let e,o,i=!!u,n=!!p,d=!!m;if(i){let r=Object.assign(Object.assign({prefixCls:`${j}-avatar`},n&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(u));e=t.createElement("div",{className:`${j}-header`},t.createElement(a,Object.assign({},r)))}if(n||d){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${j}-title`},!i&&d?{width:"38%"}:i&&d?{width:"50%"}:{}),y(p));e=t.createElement(x,Object.assign({},r))}if(d){let e,o=Object.assign(Object.assign({prefixCls:`${j}-paragraph`},(e={},i&&n||(e.width="61%"),!i&&n?e.rows=3:e.rows=2,e)),y(m));r=t.createElement(v,Object.assign({},o))}o=t.createElement("div",{className:`${j}-content`},e,r)}let g=(0,r.default)(j,{[`${j}-with-avatar`]:i,[`${j}-active`]:h,[`${j}-rtl`]:"rtl"===_,[`${j}-round`]:f},k,s,l,C,z);return S(t.createElement("div",{className:g,style:Object.assign(Object.assign({},w),c)},e,o))}return null!=d?d:null};_.Button=e=>{let{prefixCls:n,className:s,rootClassName:l,active:c,block:d=!1,size:u="default"}=e,{getPrefixCls:p}=t.useContext(o.ConfigContext),m=p("skeleton",n),[h,f,g]=b(m),v=(0,i.default)(e,["prefixCls"]),x=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},s,l,f,g);return h(t.createElement("div",{className:x},t.createElement(a,Object.assign({prefixCls:`${m}-button`,size:u},v))))},_.Avatar=e=>{let{prefixCls:n,className:s,rootClassName:l,active:c,shape:d="circle",size:u="default"}=e,{getPrefixCls:p}=t.useContext(o.ConfigContext),m=p("skeleton",n),[h,f,g]=b(m),v=(0,i.default)(e,["prefixCls","className"]),x=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c},s,l,f,g);return h(t.createElement("div",{className:x},t.createElement(a,Object.assign({prefixCls:`${m}-avatar`,shape:d,size:u},v))))},_.Input=e=>{let{prefixCls:n,className:s,rootClassName:l,active:c,block:d,size:u="default"}=e,{getPrefixCls:p}=t.useContext(o.ConfigContext),m=p("skeleton",n),[h,f,g]=b(m),v=(0,i.default)(e,["prefixCls"]),x=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},s,l,f,g);return h(t.createElement("div",{className:x},t.createElement(a,Object.assign({prefixCls:`${m}-input`,size:u},v))))},_.Image=e=>{let{prefixCls:i,className:a,rootClassName:n,style:s,active:l}=e,{getPrefixCls:c}=t.useContext(o.ConfigContext),d=c("skeleton",i),[u,p,m]=b(d),h=(0,r.default)(d,`${d}-element`,{[`${d}-active`]:l},a,n,p,m);return u(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${d}-image`,a),style:s},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},_.Node=e=>{let{prefixCls:i,className:a,rootClassName:n,style:s,active:l,children:c}=e,{getPrefixCls:d}=t.useContext(o.ConfigContext),u=d("skeleton",i),[p,m,h]=b(u),f=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:l},m,a,n,h);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${u}-image`,a),style:s},c)))},e.s(["default",0,_],185793)},922611,e=>{"use strict";var t=e.i(271645),r=e.i(175066);function o(){}let i=t.createContext({add:o,remove:o});e.s(["usePanelRef",0,function(e){let o=t.useContext(i),a=t.useRef(null);return(0,r.default)(t=>{if(t){let r=e?t.querySelector(e):t;r&&(o.add(r),a.current=r)}else o.remove(a.current)})}])},678784,e=>{"use strict";var t=e.i(678745);e.s(["CheckIcon",()=>t.default])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",0,t])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["ExclamationCircleOutlined",0,a],270377)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),o=e.i(540143),i=e.i(915823),a=e.i(619273),n=class extends i.Subscribable{#e;#t=void 0;#r;#o;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.hashKey)(t.mutationKey)!==(0,a.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#a()}mutate(e,t){return this.#o=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#a(e){o.notifyManager.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#o.onSuccess?.(e.data,t,r,o)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(e.data,null,t,r,o)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#o.onError?.(e.error,t,r,o)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(void 0,e.error,t,r,o)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},s=e.i(912598);e.s(["useMutation",0,function(e,r){let i=(0,s.useQueryClient)(r),[l]=t.useState(()=>new n(i,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let c=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(o.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d=t.useCallback((e,t)=>{l.mutate(e,t).catch(a.noop)},[l]);if(c.error&&(0,a.shouldThrowError)(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}],954616)},107233,603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t],603908),e.s(["Plus",0,t],107233)},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,o,i){let[a,n,s]=(0,t.useDebouncedState)(e,o,i);return(0,r.useEffect)(()=>{n(e)},[e,n]),[a,s]}])},541202,e=>{"use strict";var t=e.i(843476),r=e.i(522016),o=e.i(560445);e.s(["DeprecationBanner",0,({featureName:e})=>(0,t.jsx)(o.Alert,{message:`${e} is on a draft deprecation list`,description:(0,t.jsxs)(t.Fragment,{children:[`${e} is one of several experimental features we're considering removing, potentially as early as September 1, 2026. This list is a draft and is not final. If you rely on this feature, please share feedback on the `,(0,t.jsx)(r.default,{href:"https://github.com/BerriAI/litellm/discussions/32090",target:"_blank",rel:"noopener noreferrer",children:"deprecation discussion"}),"."]}),type:"info",showIcon:!0,closable:!0,style:{marginBottom:16}})])},768371,e=>{"use strict";let t,r;var o=e.i(247167);let i=/\{[^{}]+\}/g;function a(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function n(e,t,r){if(!t||"object"!=typeof t)return"";let o=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)o.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let i=o.join(",");switch(r.style){case"form":return`${e}=${i}`;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return i}}for(let i in t){let n="deepObject"===r.style?`${e}[${i}]`:i;o.push(a(n,t[i],r))}let n=o.join(i);return"label"===r.style||"matrix"===r.style?`${i}${n}`:n}function s(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",i=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(o);switch(r.style){case"simple":return i;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return`${e}=${i}`}}let o={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(let o of t)"simple"===r.style||"label"===r.style?i.push(!0===r.allowReserved?o:encodeURIComponent(o)):i.push(a(e,o,r));return"label"===r.style||"matrix"===r.style?`${o}${i.join(o)}`:i.join(o)}function l(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let o in t){let i=t[o];if(null!=i){if(Array.isArray(i)){if(0===i.length)continue;r.push(s(o,i,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof i){r.push(n(o,i,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(a(o,i,e))}}return r.join("&")}}function c(e,t){let r=e;for(let o of e.match(i)??[]){let e=o.substring(1,o.length-1),i=!1,l="simple";if(e.endsWith("*")&&(i=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(l="label",e=e.substring(1)):e.startsWith(";")&&(l="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let c=t[e];if(Array.isArray(c)){r=r.replace(o,s(e,c,{style:l,explode:i}));continue}if("object"==typeof c){r=r.replace(o,n(e,c,{style:l,explode:i}));continue}if("matrix"===l){r=r.replace(o,`;${a(e,c)}`);continue}r=r.replace(o,"label"===l?`.${encodeURIComponent(c)}`:encodeURIComponent(c))}return r}function d(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function u(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,o]of r instanceof Headers?r.entries():Object.entries(r))if(null===o)t.delete(e);else if(Array.isArray(o))for(let r of o)t.append(e,r);else void 0!==o&&t.set(e,o);return t}function p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var m=e.i(954616),h=e.i(621482),f=e.i(869230),g=e.i(469637),b=e.i(254440),v=e.i(266027),x=e.i(431703),y=e.i(97198);let _=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),k=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:i=globalThis.fetch,querySerializer:a,bodySerializer:n,pathSerializer:s,headers:m,requestInitExt:h,...f}={...e};h="object"==typeof o.default&&Number.parseInt(o.default?.versions?.node?.substring(0,2))>=18&&o.default.versions.undici?h:void 0,t=p(t);let g=[];async function b(e,o){var b,v;let x,y,_,k,w,{baseUrl:j,fetch:S=i,Request:C=r,headers:z,params:R={},parseAs:O="json",querySerializer:M,bodySerializer:$=n??d,pathSerializer:E,body:N,middleware:T=[],...A}=o||{},I=t;j&&(I=p(j)??t);let L="function"==typeof a?a:l(a);M&&(L="function"==typeof M?M:l({..."object"==typeof a?a:{},...M}));let H=E||s||c,B=void 0===N?void 0:$(N,u(m,z,R.header)),q=u(void 0===B||B instanceof FormData?{}:{"Content-Type":"application/json"},m,z,R.header),P=[...g,...T],F={redirect:"follow",...f,...A,body:B,headers:q},V=new C((b=e,v={baseUrl:I,params:R,querySerializer:L,pathSerializer:H},x=`${v.baseUrl}${b}`,v.params?.path&&(x=v.pathSerializer(x,v.params.path)),(y=v.querySerializer(v.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(x+=`?${y}`),x),F);for(let e in A)e in V||(V[e]=A[e]);if(P.length){for(let t of(_=Math.random().toString(36).slice(2,11),k=Object.freeze({baseUrl:I,fetch:S,parseAs:O,querySerializer:L,bodySerializer:$,pathSerializer:H}),P))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:V,schemaPath:e,params:R,options:k,id:_});if(r)if(r instanceof C)V=r;else if(r instanceof Response){w=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!w){try{w=await S(V,h)}catch(r){let t=r;if(P.length)for(let r=P.length-1;r>=0;r--){let o=P[r];if(o&&"object"==typeof o&&"function"==typeof o.onError){let r=await o.onError({request:V,error:t,schemaPath:e,params:R,options:k,id:_});if(r){if(r instanceof Response){t=void 0,w=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(P.length)for(let t=P.length-1;t>=0;t--){let r=P[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:V,response:w,schemaPath:e,params:R,options:k,id:_});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");w=t}}}}let D=w.headers.get("Content-Length");if(204===w.status||"HEAD"===V.method||"0"===D&&!w.headers.get("Transfer-Encoding")?.includes("chunked"))return w.ok?{data:void 0,response:w}:{error:void 0,response:w};if(w.ok){let e=async()=>{if("stream"===O)return w.body;if("json"===O&&!D){let e=await w.text();return e?JSON.parse(e):void 0}return await w[O]()};return{data:await e(),response:w}}let U=await w.text();try{U=JSON.parse(U)}catch{}return{error:U,response:w}}return{request:(e,t,r)=>b(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>b(e,{...t,method:"GET"}),PUT:(e,t)=>b(e,{...t,method:"PUT"}),POST:(e,t)=>b(e,{...t,method:"POST"}),DELETE:(e,t)=>b(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>b(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>b(e,{...t,method:"HEAD"}),PATCH:(e,t)=>b(e,{...t,method:"PATCH"}),TRACE:(e,t)=>b(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");g.push(t)}},eject(...e){for(let t of e){let e=g.indexOf(t);-1!==e&&g.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});k.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await _(e,((e,t)=>{let{pathname:r,search:o}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${o}`})(e.url,t)):e,o=(0,y.getAuthToken)();return o&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${o}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),o=r;try{o=JSON.parse(r),t=(0,x.deriveErrorMessage)(o)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new x.ApiError(t,e.status,o)}});let w=(t=async({queryKey:[e,t,r],signal:o})=>{let i=k[e.toUpperCase()],{data:a,error:n,response:s}=await i(t,{signal:o,...r});if(n)throw n;return 204===s.status||"0"===s.headers.get("Content-Length")?a??null:a},{queryOptions:r=(e,r,...[o,i])=>({queryKey:void 0===o?[e,r]:[e,r,o],queryFn:t,...i}),useQuery:(e,t,...[o,i,a])=>(0,v.useQuery)(r(e,t,o,i),a),useSuspenseQuery:(e,t,...[o,i,a])=>{var n;return n=r(e,t,o,i),(0,g.useBaseQuery)({...n,enabled:!0,suspense:!0,throwOnError:b.defaultThrowOnError,placeholderData:void 0},f.QueryObserver,a)},useInfiniteQuery:(e,t,o,i,a)=>{let{pageParamName:n="cursor",...s}=i,{queryKey:l}=r(e,t,o);return(0,h.useInfiniteQuery)({queryKey:l,queryFn:async({queryKey:[e,t,r],pageParam:o=0,signal:i})=>{let a=k[e.toUpperCase()],s={...r,signal:i,params:{...r?.params||{},query:{...r?.params?.query,[n]:o}}},{data:l,error:c}=await a(t,s);if(c)throw c;return l},...s},a)},useMutation:(e,t,r,o)=>(0,m.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let o=k[e.toUpperCase()],{data:i,error:a}=await o(t,r);if(a)throw a;return i},...r},o)});e.s(["$api",0,w,"fetchClient",0,k],768371)},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},466828,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(678784);let i=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var a=e.i(650056);let n={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:s})=>{let[l,c]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:l?(0,t.jsx)(o.CheckIcon,{size:16}):(0,t.jsx)(i,{size:16})}),(0,t.jsx)(a.Prism,{language:s,style:n,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],466828)},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["KeyOutlined",0,a],438957)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["ExperimentOutlined",0,a],19732)},518617,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["CloseCircleOutlined",0,a],518617)},366308,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["ToolOutlined",0,a],366308)},313603,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["SettingOutlined",0,a],313603)},782273,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z"}}]},name:"sound",theme:"outlined"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["SoundOutlined",0,a],782273)},793916,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["AudioOutlined",0,a],793916)},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={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"};var i=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(i.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["LinkOutlined",0,a],596239)},339019,865361,e=>{"use strict";var t,r,o=((t={}).AUDIO_SPEECH="audio_speech",t.AUDIO_TRANSCRIPTION="audio_transcription",t.IMAGE_GENERATION="image_generation",t.VIDEO_GENERATION="video_generation",t.CHAT="chat",t.RESPONSES="responses",t.IMAGE_EDITS="image_edits",t.ANTHROPIC_MESSAGES="anthropic_messages",t.EMBEDDING="embedding",t),i=((r={}).IMAGE="image",r.VIDEO="video",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",r.EMBEDDINGS="embeddings",r.SPEECH="speech",r.TRANSCRIPTION="transcription",r.A2A_AGENTS="a2a_agents",r.MCP="mcp",r.REALTIME="realtime",r.INTERACTIONS="interactions",r);let a={image_generation:"image",video_generation:"video",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages",audio_speech:"speech",audio_transcription:"transcription",embedding:"embeddings"};e.s(["EndpointType",()=>i,"getEndpointType",0,e=>Object.values(o).includes(e)?a[e]:"chat"],865361),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:r,accessToken:o,apiKey:a,inputMessage:n,chatHistory:s,selectedTags:l,selectedVectorStores:c,selectedGuardrails:d,selectedPolicies:u,selectedMCPServers:p,mcpServers:m,mcpServerToolRestrictions:h,selectedVoice:f,endpointType:g,selectedModel:b,selectedSdk:v,proxySettings:x}=e,y="session"===r?o:a,_=window.location.origin,k=x?.LITELLM_UI_API_DOC_BASE_URL;k&&k.trim()?_=k:x?.PROXY_BASE_URL&&(_=x.PROXY_BASE_URL);let w=n||"Your prompt here",j=w.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),S=s.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),C={};l.length>0&&(C.tags=l),c.length>0&&(C.vector_stores=c),d.length>0&&(C.guardrails=d),u.length>0&&(C.policies=u);let z=b||"your-model-name",R="azure"===v?`import openai
client = openai.AzureOpenAI(
api_key="${y||"YOUR_LITELLM_API_KEY"}",
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0qtmfaeayrb_n.js b/litellm/proxy/_experimental/out/_next/static/chunks/0qtmfaeayrb_n.js
deleted file mode 100644
index 344bc3a6923..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0qtmfaeayrb_n.js
+++ /dev/null
@@ -1,10 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),i=e.i(114272),a=e.i(540143),l=e.i(915823),r=e.i(619273),s=class extends l.Subscribable{#e;#t=void 0;#i;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#l(),this.#r()}mutate(e,t){return this.#a=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#l(){let e=this.#i?.state??(0,i.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,i=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,i,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,i,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,i,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,i,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);e.s(["useMutation",0,function(e,i){let l=(0,n.useQueryClient)(i),[o]=t.useState(()=>new s(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(d.error&&(0,r.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}],954616)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ExclamationCircleOutlined",0,r],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(529681),l=e.i(242064),r=e.i(517455),s=e.i(185793),n=e.i(721369),o=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let d=e=>{var{prefixCls:a,className:r,hoverable:s=!0}=e,n=o(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),u=(0,i.default)(`${c}-grid`,r,{[`${c}-grid-hoverable`]:s});return t.createElement("div",Object.assign({},n,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),A=e.i(246422),g=e.i(838378);let h=(0,A.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:i,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:r,bodyPadding:s,extraColor:n}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:i,headerHeight:a,headerPadding:l,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,c.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
- > ${i}-typography,
- > ${i}-typography-edit-content
- `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:i,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
- ${(0,c.unit)(l)} 0 0 0 ${i},
- 0 ${(0,c.unit)(l)} 0 0 ${i},
- ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${i},
- ${(0,c.unit)(l)} 0 0 0 ${i} inset,
- 0 ${(0,c.unit)(l)} 0 0 ${i} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:i,actionsLiMargin:a,cardActionsIconSize:l,colorBorderSecondary:r,actionsBg:s}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:s,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:a,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${i}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${i}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:i}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:a}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:i,headerPadding:a,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(a)}`,background:i,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:i,headerPaddingSM:a,headerHeightSM:l,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(a)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:i}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,i;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(i=e.headerPadding)?i:e.paddingLG}});var m=e.i(792812),f=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let b=e=>{let{actionClasses:i,actions:a=[],actionStyle:l}=e;return t.createElement("ul",{className:i,style:l},a.map((e,i)=>{let l=`action-${i}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:l},t.createElement("span",null,e))}))},p=t.forwardRef((e,o)=>{let c,{prefixCls:u,className:A,rootClassName:g,style:p,extra:x,headStyle:O={},bodyStyle:v={},title:E,loading:y,bordered:C,variant:I,size:w,type:S,cover:R,actions:L,tabList:B,children:k,activeTabKey:_,defaultActiveTabKey:T,tabBarExtraContent:j,hoverable:M,tabProps:H={},classNames:$,styles:N}=e,z=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:P,direction:D,card:U}=t.useContext(l.ConfigContext),[W]=(0,m.default)("card",I,C),G=e=>{var t;return(0,i.default)(null==(t=null==U?void 0:U.classNames)?void 0:t[e],null==$?void 0:$[e])},q=e=>{var t;return Object.assign(Object.assign({},null==(t=null==U?void 0:U.styles)?void 0:t[e]),null==N?void 0:N[e])},F=t.useMemo(()=>{let e=!1;return t.Children.forEach(k,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[k]),Q=P("card",u),[V,K,Y]=h(Q),J=t.createElement(s.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},k),X=void 0!==_,Z=Object.assign(Object.assign({},H),{[X?"activeKey":"defaultActiveKey"]:X?_:T,tabBarExtraContent:j}),ee=(0,r.default)(w),et=ee&&"default"!==ee?ee:"large",ei=B?t.createElement(n.default,Object.assign({size:et},Z,{className:`${Q}-head-tabs`,onChange:t=>{var i;null==(i=e.onTabChange)||i.call(e,t)},items:B.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(E||x||ei){let e=(0,i.default)(`${Q}-head`,G("header")),a=(0,i.default)(`${Q}-head-title`,G("title")),l=(0,i.default)(`${Q}-extra`,G("extra")),r=Object.assign(Object.assign({},O),q("header"));c=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${Q}-head-wrapper`},E&&t.createElement("div",{className:a,style:q("title")},E),x&&t.createElement("div",{className:l,style:q("extra")},x)),ei)}let ea=(0,i.default)(`${Q}-cover`,G("cover")),el=R?t.createElement("div",{className:ea,style:q("cover")},R):null,er=(0,i.default)(`${Q}-body`,G("body")),es=Object.assign(Object.assign({},v),q("body")),en=t.createElement("div",{className:er,style:es},y?J:k),eo=(0,i.default)(`${Q}-actions`,G("actions")),ed=(null==L?void 0:L.length)?t.createElement(b,{actionClasses:eo,actionStyle:q("actions"),actions:L}):null,ec=(0,a.default)(z,["onTabChange"]),eu=(0,i.default)(Q,null==U?void 0:U.className,{[`${Q}-loading`]:y,[`${Q}-bordered`]:"borderless"!==W,[`${Q}-hoverable`]:M,[`${Q}-contain-grid`]:F,[`${Q}-contain-tabs`]:null==B?void 0:B.length,[`${Q}-${ee}`]:ee,[`${Q}-type-${S}`]:!!S,[`${Q}-rtl`]:"rtl"===D},A,g,K,Y),eA=Object.assign(Object.assign({},null==U?void 0:U.style),p);return V(t.createElement("div",Object.assign({ref:o},ec,{className:eu,style:eA}),c,el,en,ed))});var x=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};p.Grid=d,p.Meta=e=>{let{prefixCls:a,className:r,avatar:s,title:n,description:o}=e,d=x(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("card",a),A=(0,i.default)(`${u}-meta`,r),g=s?t.createElement("div",{className:`${u}-meta-avatar`},s):null,h=n?t.createElement("div",{className:`${u}-meta-title`},n):null,m=o?t.createElement("div",{className:`${u}-meta-description`},o):null,f=h||m?t.createElement("div",{className:`${u}-meta-detail`},h,m):null;return t.createElement("div",Object.assign({},d,{className:A}),g,f)},e.s(["Card",0,p],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),i=e.i(343794),a=e.i(908206),l=e.i(242064),r=e.i(517455),s=e.i(150073);let n={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},o=t.default.createContext({});var d=e.i(876556),c=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i},u=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let A=e=>{let{itemPrefixCls:a,component:l,span:r,className:s,style:n,labelStyle:d,contentStyle:c,bordered:u,label:A,content:g,colon:h,type:m,styles:f}=e,{classNames:b}=t.useContext(o),p=Object.assign(Object.assign({},d),null==f?void 0:f.label),x=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(u)return t.createElement(l,{colSpan:r,style:n,className:(0,i.default)(s,{[`${a}-item-${m}`]:"label"===m||"content"===m,[null==b?void 0:b.label]:(null==b?void 0:b.label)&&"label"===m,[null==b?void 0:b.content]:(null==b?void 0:b.content)&&"content"===m})},null!=A&&t.createElement("span",{style:p},A),null!=g&&t.createElement("span",{style:x},g));return t.createElement(l,{colSpan:r,style:n,className:(0,i.default)(`${a}-item`,s)},t.createElement("div",{className:`${a}-item-container`},null!=A&&t.createElement("span",{style:p,className:(0,i.default)(`${a}-item-label`,null==b?void 0:b.label,{[`${a}-item-no-colon`]:!h})},A),null!=g&&t.createElement("span",{style:x,className:(0,i.default)(`${a}-item-content`,null==b?void 0:b.content)},g)))};function g(e,{colon:i,prefixCls:a,bordered:l},{component:r,type:s,showLabel:n,showContent:o,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:g,prefixCls:h=a,className:m,style:f,labelStyle:b,contentStyle:p,span:x=1,key:O,styles:v},E)=>"string"==typeof r?t.createElement(A,{key:`${s}-${O||E}`,className:m,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),b),null==v?void 0:v.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),p),null==v?void 0:v.content)},span:x,colon:i,component:r,itemPrefixCls:h,bordered:l,label:n?e:null,content:o?g:null,type:s}):[t.createElement(A,{key:`label-${O||E}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),b),null==v?void 0:v.label),span:1,colon:i,component:r[0],itemPrefixCls:h,bordered:l,label:e,type:"label"}),t.createElement(A,{key:`content-${O||E}`,className:m,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),f),p),null==v?void 0:v.content),span:2*x-1,component:r[1],itemPrefixCls:h,bordered:l,content:g,type:"content"})])}let h=e=>{let i=t.useContext(o),{prefixCls:a,vertical:l,row:r,index:s,bordered:n}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${s}`,className:`${a}-row`},g(r,e,Object.assign({component:"th",type:"label",showLabel:!0},i))),t.createElement("tr",{key:`content-${s}`,className:`${a}-row`},g(r,e,Object.assign({component:"td",type:"content",showContent:!0},i)))):t.createElement("tr",{key:s,className:`${a}-row`},g(r,e,Object.assign({component:n?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},i)))};e.i(296059);var m=e.i(915654),f=e.i(183293),b=e.i(246422),p=e.i(838378);let x=(0,b.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:i,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:r,colonMarginLeft:s,titleMarginBottom:n}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:i}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.padding)} ${(0,m.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:i,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingSM)} ${(0,m.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,m.unit)(e.paddingXS)} ${(0,m.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:n},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:i,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:a,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,m.unit)(s)} ${(0,m.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,p.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var O=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(i[a[l]]=e[a[l]]);return i};let v=e=>{let A,{prefixCls:g,title:m,extra:f,column:b,colon:p=!0,bordered:v,layout:E,children:y,className:C,rootClassName:I,style:w,size:S,labelStyle:R,contentStyle:L,styles:B,items:k,classNames:_}=e,T=O(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:j,direction:M,className:H,style:$,classNames:N,styles:z}=(0,l.useComponentConfig)("descriptions"),P=j("descriptions",g),D=(0,s.default)(),U=t.useMemo(()=>{var e;return"number"==typeof b?b:null!=(e=(0,a.matchScreen)(D,Object.assign(Object.assign({},n),b)))?e:3},[D,b]),W=(A=t.useMemo(()=>k||(0,d.default)(y).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[k,y]),t.useMemo(()=>A.map(e=>{var{span:t}=e,i=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},i),{filled:!0}):Object.assign(Object.assign({},i),{span:"number"==typeof t?t:(0,a.matchScreen)(D,t)})}),[A,D])),G=(0,r.default)(S),q=((e,i)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,r;return t=[],a=[],l=!1,r=0,i.filter(e=>e).forEach(i=>{let{filled:s}=i,n=u(i,["filled"]);if(s){a.push(n),t.push(a),a=[],r=0;return}let o=e-r;(r+=i.span||1)>=e?(r>e?(l=!0,a.push(Object.assign(Object.assign({},n),{span:o}))):a.push(n),t.push(a),a=[],r=0):a.push(n)}),a.length>0&&t.push(a),[t=t.map(t=>{let i=t.reduce((e,t)=>e+(t.span||1),0);if(i({labelStyle:R,contentStyle:L,styles:{content:Object.assign(Object.assign({},z.content),null==B?void 0:B.content),label:Object.assign(Object.assign({},z.label),null==B?void 0:B.label)},classNames:{label:(0,i.default)(N.label,null==_?void 0:_.label),content:(0,i.default)(N.content,null==_?void 0:_.content)}}),[R,L,B,_,N,z]);return F(t.createElement(o.Provider,{value:K},t.createElement("div",Object.assign({className:(0,i.default)(P,H,N.root,null==_?void 0:_.root,{[`${P}-${G}`]:G&&"default"!==G,[`${P}-bordered`]:!!v,[`${P}-rtl`]:"rtl"===M},C,I,Q,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},$),z.root),null==B?void 0:B.root),w)},T),(m||f)&&t.createElement("div",{className:(0,i.default)(`${P}-header`,N.header,null==_?void 0:_.header),style:Object.assign(Object.assign({},z.header),null==B?void 0:B.header)},m&&t.createElement("div",{className:(0,i.default)(`${P}-title`,N.title,null==_?void 0:_.title),style:Object.assign(Object.assign({},z.title),null==B?void 0:B.title)},m),f&&t.createElement("div",{className:(0,i.default)(`${P}-extra`,N.extra,null==_?void 0:_.extra),style:Object.assign(Object.assign({},z.extra),null==B?void 0:B.extra)},f)),t.createElement("div",{className:`${P}-view`},t.createElement("table",null,t.createElement("tbody",null,q.map((e,i)=>t.createElement(h,{key:i,index:i,colon:p,prefixCls:P,vertical:"vertical"===E,bordered:v,row:e}))))))))};v.Item=({children:e})=>e,e.s(["Descriptions",0,v],869216)},368869,e=>{"use strict";e.i(296059);var t=e.i(868297),i=e.i(732961),a=e.i(289882),l=e.i(170517),r=e.i(628882),s=e.i(320890),n=e.i(104458),o=e.i(722319),d=e.i(8398),c=e.i(279728);e.i(765846);var u=e.i(602716),A=e.i(328052),g=e.i(135551);let h=(e,t)=>new g.FastColor(e).setA(t).toRgbString(),m=(e,t)=>new g.FastColor(e).lighten(t).toHexString(),f=e=>{let t=(0,u.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},b=(e,t)=>{let i=e||"#000",a=t||"#fff";return{colorBgBase:i,colorTextBase:a,colorText:h(a,.85),colorTextSecondary:h(a,.65),colorTextTertiary:h(a,.45),colorTextQuaternary:h(a,.25),colorFill:h(a,.18),colorFillSecondary:h(a,.12),colorFillTertiary:h(a,.08),colorFillQuaternary:h(a,.04),colorBgSolid:h(a,.95),colorBgSolidHover:h(a,1),colorBgSolidActive:h(a,.9),colorBgElevated:m(i,12),colorBgContainer:m(i,8),colorBgLayout:m(i,0),colorBgSpotlight:m(i,26),colorBgBlur:h(a,.04),colorBorder:m(i,26),colorBorderSecondary:m(i,19)}},p={defaultSeed:s.defaultConfig.token,useToken:function(){let[e,t,i]=(0,n.useToken)();return{theme:e,token:t,hashId:i}},defaultAlgorithm:o.default,darkAlgorithm:(e,t)=>{let i=Object.keys(l.defaultPresetColors).map(t=>{let i=(0,u.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,a,l)=>(e[`${t}-${l+1}`]=i[l],e[`${t}${l+1}`]=i[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),a=null!=t?t:(0,o.default)(e),r=(0,A.default)(e,{generateColorPalettes:f,generateNeutralColorPalettes:b});return Object.assign(Object.assign(Object.assign(Object.assign({},a),i),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let i=null!=t?t:(0,o.default)(e),a=i.fontSizeSM,l=i.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i),function(e){let{sizeUnit:t,sizeStep:i}=e,a=i-2;return{sizeXXL:t*(a+10),sizeXL:t*(a+6),sizeLG:t*(a+2),sizeMD:t*(a+2),sizeMS:t*(a+1),size:t*a,sizeSM:t*a,sizeXS:t*(a-1),sizeXXS:t*(a-1)}}(null!=t?t:e)),(0,c.default)(a)),{controlHeight:l}),(0,d.default)(Object.assign(Object.assign({},i),{controlHeight:l})))},getDesignToken:e=>{let s=(null==e?void 0:e.algorithm)?(0,t.createTheme)(e.algorithm):a.default,n=Object.assign(Object.assign({},l.default),null==e?void 0:e.token);return(0,i.getComputedToken)(n,{override:null==e?void 0:e.token},s,r.default)},defaultConfig:s.defaultConfig,_internalContext:s.DesignTokenContext};e.s(["theme",0,p],368869)},127952,e=>{"use strict";var t=e.i(843476),i=e.i(560445),a=e.i(175712),l=e.i(869216),r=e.i(311451),s=e.i(212931),n=e.i(898586),o=e.i(368869),d=e.i(270377),c=e.i(271645);e.s(["default",0,function({isOpen:e,title:u,alertMessage:A,message:g,resourceInformationTitle:h,resourceInformation:m,onCancel:f,onOk:b,confirmLoading:p,requiredConfirmation:x}){let{Title:O,Text:v}=n.Typography,{token:E}=o.theme.useToken(),[y,C]=(0,c.useState)("");return(0,c.useEffect)(()=>{e&&C("")},[e]),(0,t.jsx)(s.Modal,{title:u,open:e,onOk:b,onCancel:f,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!x&&y!==x||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[A&&(0,t.jsx)(i.Alert,{message:A,type:"warning"}),(0,t.jsx)(a.Card,{title:h,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:E.colorErrorBg,borderColor:E.colorErrorBorder}},style:{backgroundColor:E.colorErrorBg,borderColor:E.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:m&&m.map(({label:e,value:i,...a})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(v,{...a,children:i??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(v,{children:g})}),x&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(v,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(v,{children:"Type "}),(0,t.jsx)(v,{strong:!0,type:"danger",children:x}),(0,t.jsx)(v,{children:" to confirm deletion:"})]}),(0,t.jsx)(r.Input,{value:y,onChange:e=>C(e.target.value),placeholder:x,className:"rounded-md",prefix:(0,t.jsx)(d.ExclamationCircleOutlined,{style:{color:E.colorError}}),autoFocus:!0})]})]})})}])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={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"};var l=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(l.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["default",0,r],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let a=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,l=t.serverRootPath)=>{let r;if(!e)return;if(a.test(e)||e.includes("/_next/static/"))return e;let s=(0,i.normalizeRootPath)(l);return s&&(e===s||e.startsWith(`${s}/`))?e:(r=(0,i.normalizeRootPath)(l),`${r}${e.startsWith("/")?e:`/${e}`}`)}],555987);let l={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,l],938137);let r={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,r],301035);let s={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,s],470524);let n={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,n],901539);let o={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,o],434339);let d={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,d],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let a={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,a],503119);let l={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],272896);let r={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],144923);let s={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],562171);let n={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,n],533881);let o={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,o],837957);let d={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,d],227247);let c={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,c],708889);let u={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,u],859320);let A={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],586455);let g={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],921117);let h={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],21296);let m={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,m],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let a={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],862493);let l={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,l],902860);let r={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,r],901372);let s={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],206258);let n={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],176228);let o={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let a={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],399495);let l={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],740876);let r={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],709103);let s={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],277207);let n={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],836473);let o={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,o],768493);let d={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,d],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),a=e.i(938137),l=e.i(301035),r=e.i(470524),s=e.i(901539),n=e.i(434339),o=e.i(857152),d=e.i(922158),c=e.i(896614),u=e.i(9774),A=e.i(503119),g=e.i(272896),h=e.i(144923),m=e.i(562171),f=e.i(533881),b=e.i(837957),p=e.i(227247),x=e.i(708889),O=e.i(859320),v=e.i(586455),E=e.i(921117),y=e.i(21296),C=e.i(579967),I=e.i(336712),w=e.i(770752),S=e.i(383963),R=e.i(862493),L=e.i(902860),B=e.i(901372),k=e.i(206258),_=e.i(176228),T=e.i(728685),j=e.i(39182),M=e.i(272967),H=e.i(551726),$=e.i(399495),N=e.i(740876),z=e.i(709103),P=e.i(277207),D=e.i(836473),U=e.i(768493),W=e.i(297720),G=e.i(980385);let q={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},F={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},Q={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},V={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},K={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},Y={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},X={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},Z={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},ea={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},er={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},es={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},en={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},eo={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},ed={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},ec={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},eu={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eA=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eg={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},eh=new Set(["bedrock_mantle"]),em={"A2A Agent":a.default.src,Ai21:l.default.src,"Ai21 Chat":l.default.src,"AI/ML API":r.default.src,"Aiohttp Openai":G.default.src,Anthropic:s.default.src,"Anthropic Text":s.default.src,AssemblyAI:n.default.src,Azure:j.default.src,"Azure AI Foundry (Studio)":j.default.src,"Azure Text":j.default.src,Baseten:o.default.src,"Amazon Bedrock":d.default.src,"Amazon Bedrock Mantle":d.default.src,"AWS SageMaker":d.default.src,Cerebras:c.default.src,Cloudflare:u.default.src,Codestral:H.default.src,Cohere:A.default.src,"Cohere Chat":A.default.src,Cometapi:g.default.src,Cursor:h.default.src,"Databricks (Qwen API)":m.default.src,Dashscope:V.src,Deepseek:p.default.src,Deepgram:f.default.src,DeepInfra:b.default.src,ElevenLabs:x.default.src,"Fal AI":O.default.src,"Featherless Ai":v.default.src,"Fireworks AI":E.default.src,Friendliai:y.default.src,"Github Copilot":C.default.src,"Google AI Studio":I.default.src,Groq:w.default.src,vllm:es.src,Huggingface:S.default.src,Hyperbolic:R.default.src,Infinity:L.default.src,"Jina AI":B.default.src,"Lambda Ai":k.default.src,"Lm Studio":_.default.src,"Meta Llama":T.default.src,MiniMax:M.default.src,"Mistral AI":H.default.src,Moonshot:$.default.src,Morph:N.default.src,Nebius:z.default.src,Novita:P.default.src,"Nvidia Nim":D.default.src,Ollama:W.default.src,"Ollama Chat":W.default.src,Oobabooga:G.default.src,OpenAI:G.default.src,"Openai Like":G.default.src,"OpenAI Text Completion":G.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":G.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":G.default.src,Openrouter:q.src,"Oracle Cloud Infrastructure (OCI)":F.src,Perplexity:Q.src,Recraft:K.src,Replicate:Y.src,RunwayML:J.src,Sagemaker:d.default.src,Sambanova:X.src,"SAP Generative AI Hub":Z.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":H.default.src,TogetherAI:ei.src,Topaz:ea.src,Triton:U.default.src,V0:el.src,"Vercel Ai Gateway":er.src,"Vertex AI (Anthropic, Gemini, etc.)":I.default.src,"Vertex Ai Beta":I.default.src,Vllm:es.src,VolcEngine:en.src,"Voyage AI":eo.src,Watsonx:ed.src,"Watsonx Text":ed.src,xAI:ec.src,Xinference:eu.src};e.s(["Providers",()=>eA,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";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 if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(em[e])??"",displayName:e}}let t=Object.keys(eg).find(t=>eg[t].toLowerCase()===e.toLowerCase())??Object.keys(eg).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=eA[t];return{logo:(0,i.resolveLogoSrc)(em[a])??"",displayName:a}},"getProviderModels",0,(e,t)=>{let i=eg[e],a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let l=t.litellm_provider,r="string"==typeof l&&(l.startsWith(`${i}_`)||l.startsWith(`${i}-`));(l===i||r&&!eh.has(l))&&a.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)})),a},"providerLogoMap",0,em,"provider_map",0,eg],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(916925),l=e.i(555987);e.s(["Logo",0,({provider:e,src:r,label:s,className:n="w-4 h-4"})=>{let[o,d]=(0,i.useState)(null),c=void 0!==e?(0,a.getProviderLogoAndName)(e).logo:(0,l.resolveLogoSrc)(r)??"",u=s??e??"";return o!==c&&c?(0,t.jsx)("img",{src:c,alt:`${u||"-"} logo`,className:n,onError:()=>{console.warn(`Logo failed to load: ${c}`),d(c)}}):(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:u.charAt(0)||"-"})}])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/30dm_jeoikihy.js b/litellm/proxy/_experimental/out/_next/static/chunks/0r0okx31djc7i.js
similarity index 57%
rename from litellm/proxy/_experimental/out/_next/static/chunks/30dm_jeoikihy.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0r0okx31djc7i.js
index 441e143806b..93e911cf263 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/30dm_jeoikihy.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0r0okx31djc7i.js
@@ -1,8 +1,8 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,784774,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{ref:r,"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";let l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("thead",{ref:r,"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...a}));l.displayName="TableHeader";let o=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tbody",{ref:r,"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...a}));o.displayName="TableBody";let i=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));i.displayName="TableFooter";let s=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tr",{ref:r,"data-slot":"table-row",className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));s.displayName="TableRow";let d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("th",{ref:r,"data-slot":"table-head",className:(0,n.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));d.displayName="TableHead";let u=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("td",{ref:r,"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));u.displayName="TableCell",a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("caption",{ref:r,"data-slot":"table-caption",className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...a})).displayName="TableCaption",e.s(["Table",0,r,"TableBody",0,o,"TableCell",0,u,"TableFooter",0,i,"TableHead",0,d,"TableHeader",0,l,"TableRow",0,s])},302747,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-accent",e),...a}));r.displayName="Skeleton",e.s(["Skeleton",0,r])},108821,e=>{"use strict";var t=e.i(733332),a=e.i(271645);let n=a.createContext(!1),r=a.createContext(void 0);e.s(["DialogRootContext",0,r,"IsDrawerContext",0,n,"useDialogRootContext",0,function(e){let n=a.useContext(r);if(!1===e&&void 0===n)throw Error((0,t.default)(27));return n}])},402820,156736,209793,625834,784324,264951,e=>{"use strict";e.i(247167);var t,a,n=e.i(271645),r=e.i(108821),l=e.i(552245),o=e.i(405005),i=e.i(209407);let s={...o.popupStateMapping,...i.transitionStatusMapping},d=n.forwardRef(function(e,t){let{render:a,className:n,style:o,forceRender:i=!1,...d}=e,{store:u}=(0,r.useDialogRootContext)(),c=u.useState("open"),p=u.useState("nested"),g=u.useState("mounted"),m=u.useState("transitionStatus");return(0,l.useRenderElement)("div",e,{state:{open:c,transitionStatus:m},ref:[u.context.backdropRef,t],stateAttributesMapping:s,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:i||!p})});e.s(["DialogBackdrop",0,d],402820);var u=e.i(540886),c=e.i(675606),p=e.i(56434);let g=n.forwardRef(function(e,t){let{render:a,className:n,style:o,disabled:i=!1,nativeButton:s=!0,...d}=e,{store:g}=(0,r.useDialogRootContext)(),m=g.useState("open"),{getButtonProps:f,buttonRef:b}=(0,u.useButton)({disabled:i,native:s});return(0,l.useRenderElement)("button",e,{state:{disabled:i},ref:[t,b],props:[{onClick:function(e){m&&g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.closePress,e.nativeEvent))}},d,f]})});e.s(["DialogClose",0,g],156736);var m=e.i(788015);let f=n.forwardRef(function(e,t){let{render:a,className:n,style:o,id:i,...s}=e,{store:d}=(0,r.useDialogRootContext)(),u=(0,m.useBaseUiId)(i);return d.useSyncedValueWithCleanup("descriptionElementId",u),(0,l.useRenderElement)("p",e,{ref:t,props:[{id:u},s]})});e.s(["DialogDescription",0,f],209793);var b=e.i(61487);let x=((t={}).nestedDialogs="--nested-dialogs",t),h=((a={})[a.open=o.CommonPopupDataAttributes.open]="open",a[a.closed=o.CommonPopupDataAttributes.closed]="closed",a[a.startingStyle=o.CommonPopupDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=o.CommonPopupDataAttributes.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a);var y=e.i(733332);let C=n.createContext(void 0);function v(){let e=n.useContext(C);if(void 0===e)throw Error((0,y.default)(26));return e}e.s(["DialogPortalContext",0,C,"useDialogPortalContext",0,v],625834);var S=e.i(137584),w=e.i(673327),$=e.i(264111),D=e.i(843476);let j={...o.popupStateMapping,...i.transitionStatusMapping,nestedDialogOpen:e=>e?{[h.nestedDialogOpen]:""}:null},R=n.forwardRef(function(e,t){let{render:a,className:n,style:o,finalFocus:i,initialFocus:s,...d}=e,{store:u}=(0,r.useDialogRootContext)(),c=u.useState("descriptionElementId"),p=u.useState("disablePointerDismissal"),g=u.useState("floatingRootContext"),m=u.useState("popupProps"),f=u.useState("modal"),h=u.useState("mounted"),y=u.useState("nested"),C=u.useState("nestedOpenDialogCount"),R=u.useState("open"),O=u.useState("openMethod"),N=u.useState("titleElementId"),k=u.useState("transitionStatus"),E=u.useState("role"),M=g.useState("floatingId"),P=d.id??M;v(),(0,S.useOpenChangeComplete)({open:R,ref:u.context.popupRef,onComplete(){R&&u.context.onOpenChangeComplete?.(!0)}});let T=void 0===s?(0,$.createDefaultInitialFocus)(u.context.popupRef):s,I=u.useStateSetter("popupElement"),A=(0,l.useRenderElement)("div",e,{state:{open:R,nested:y,transitionStatus:k,nestedDialogOpen:C>0},props:[m,{id:P,"aria-labelledby":N??void 0,"aria-describedby":c??void 0,role:E,...$.FOCUSABLE_POPUP_PROPS,hidden:!h,onKeyDown(e){w.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[x.nestedDialogs]:C}},d],ref:[t,u.context.popupRef,I],stateAttributesMapping:j});return(0,D.jsx)(b.FloatingFocusManager,{context:g,openInteractionType:O,disabled:!h,closeOnFocusOut:!p,initialFocus:T,returnFocus:i,modal:!1!==f,restoreFocus:"popup",children:A})});e.s(["DialogPopup",0,R],784324);var O=e.i(144394),N=e.i(726674),k=e.i(426);let E=n.forwardRef(function(e,t){let{keepMounted:a=!1,...n}=e,{store:l}=(0,r.useDialogRootContext)(),o=l.useState("mounted"),i=l.useState("modal"),s=l.useState("open");return o||a?(0,D.jsx)(C.Provider,{value:a,children:(0,D.jsxs)(N.FloatingPortal,{ref:t,...n,children:[o&&!0===i&&(0,D.jsx)(k.InternalBackdrop,{ref:l.context.internalBackdropRef,inert:(0,O.inertValue)(!s)}),e.children]})}):null});e.s(["DialogPortal",0,E],264951)},67530,e=>{"use strict";var t=e.i(271645),a=e.i(145484),n=e.i(956789),r=e.i(17989),l=e.i(647554),o=e.i(675606),i=e.i(56434),s=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:o,isDrawer:i}){let d=e.useState("open"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),p=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,f]=t.useState(0),[b,x]=t.useState(0),h=0===m,y=(0,r.useDismiss)(g,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===c?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let a=(0,l.getTarget)(t);return!!h&&!u&&(!c||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===a||e.context.backdropRef.current===a||(0,l.contains)(a,p)&&!a?.hasAttribute("data-base-ui-portal"))},escapeKey:h});(0,a.useScrollLock)(d&&!0===c,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{f(e),x(t)}),e.useContextCallback("onNestedDialogClose",()=>{f(0),x(0)}),t.useEffect(()=>(o?.onNestedDialogOpen&&d&&o.onNestedDialogOpen(m+1,b+ +!!i),o?.onNestedDialogClose&&!d&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&d&&o.onNestedDialogClose()}),[i,d,m,b,o]);let C=y.reference??n.EMPTY_OBJECT,v=y.trigger??n.EMPTY_OBJECT,S=y.floating??n.EMPTY_OBJECT;return(0,s.usePopupInteractionProps)(e,{activeTriggerProps:C,inactiveTriggerProps:v,popupProps:S,nestedOpenDialogCount:m,nestedOpenDrawerCount:b}),null},"useDialogRoot",0,function(e){let{store:a,actionsRef:n}=e,r=a.useState("open");(0,s.usePopupRootSync)(a,r),(0,s.useImplicitActiveTrigger)(a);let{forceUnmount:l}=(0,s.useOpenStateTransitions)(r,a),d=t.useCallback(()=>{a.setOpen(!1,(0,o.createChangeEventDetails)(i.REASONS.imperativeAction))},[a]);t.useImperativeHandle(n,()=>({unmount:l,close:d}),[l,d])}])},366250,301807,e=>{"use strict";var t=e.i(271645),a=e.i(713203),n=e.i(67530),r=e.i(108821),l=e.i(616269),o=e.i(301252),i=e.i(116786),s=e.i(990627),d=e.i(264111);let u={...i.popupStoreSelectors,modal:(0,l.createSelector)(e=>e.modal),nested:(0,l.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,l.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,l.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,l.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,l.createSelector)(e=>e.openMethod),descriptionElementId:(0,l.createSelector)(e=>e.descriptionElementId),titleElementId:(0,l.createSelector)(e=>e.titleElementId),viewportElement:(0,l.createSelector)(e=>e.viewportElement),role:(0,l.createSelector)(e=>e.role)};class c extends o.ReactStore{constructor(e,a,n=!1){const r=new s.PopupTriggerMap,l=function(e={}){return{...(0,i.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);l.floatingRootContext=(0,i.createPopupFloatingRootContext)(r,a,n),super(l,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},u)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a={open:e};(0,d.setPopupOpenState)(a,e,t.trigger),this.update(a)};static useStore(e,t){return(0,d.usePopupStore)(e,(e,a)=>new c(t,e,a),!0).store}}e.s(["DialogStore",0,c],301807);var p=e.i(843476);e.s(["useRenderDialogRoot",0,function(e,l="dialog"){let{children:o,open:i,defaultOpen:s=!1,onOpenChange:d,onOpenChangeComplete:u,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:f,handle:b,triggerId:x,defaultTriggerId:h=null}=e,y="alert-dialog"===l,C=(0,r.useDialogRootContext)(!0),v={modal:!!y||m,disablePointerDismissal:y||g,nested:!!C,role:y?"alertdialog":"dialog"},S=c.useStore(b?.store,{open:s,openProp:i,activeTriggerId:h,triggerIdProp:x,...v});(0,a.useOnFirstRender)(()=>{let e=void 0===i&&!1===S.state.open&&!0===s?{open:!0,activeTriggerId:h}:null;y?S.update(e?{...v,...e}:v):e&&S.update(e)}),S.useControlledProp("openProp",i),S.useControlledProp("triggerIdProp",x),S.useSyncedValues(v),S.useContextCallback("onOpenChange",d),S.useContextCallback("onOpenChangeComplete",u);let w=S.useState("open"),$=S.useState("mounted"),D=S.useState("payload");(0,n.useDialogRoot)({store:S,actionsRef:f});let j=t.useMemo(()=>({store:S}),[S]);return(0,p.jsx)(r.IsDrawerContext.Provider,{value:!1,children:(0,p.jsxs)(r.DialogRootContext.Provider,{value:j,children:[(w||$)&&(0,p.jsx)(n.DialogInteractions,{store:S,parentContext:C?.store.context,isDrawer:"drawer"===l}),"function"==typeof o?o({payload:D}):o]})})}],366250)},974217,e=>{"use strict";e.i(247167);var t,a=e.i(271645),n=e.i(552245),r=e.i(405005),l=e.i(209407),o=e.i(108821),i=e.i(625834);let s=((t={})[t.open=r.CommonPopupDataAttributes.open]="open",t[t.closed=r.CommonPopupDataAttributes.closed]="closed",t[t.startingStyle=r.CommonPopupDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=r.CommonPopupDataAttributes.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t),d={...r.popupStateMapping,...l.transitionStatusMapping,nested:e=>e?{[s.nested]:""}:null,nestedDialogOpen:e=>e?{[s.nestedDialogOpen]:""}:null},u=a.forwardRef(function(e,t){let{render:a,className:r,style:l,children:s,...u}=e,c=(0,i.useDialogPortalContext)(),{store:p}=(0,o.useDialogRootContext)(),g=p.useState("open"),m=p.useState("nested"),f=p.useState("transitionStatus"),b=p.useState("nestedOpenDialogCount"),x=p.useState("mounted"),h=p.useStateSetter("viewportElement");return(0,n.useRenderElement)("div",e,{enabled:c||x,state:{open:g,nested:m,transitionStatus:f,nestedDialogOpen:b>0},ref:[t,h],stateAttributesMapping:d,props:[{role:"presentation",hidden:!x,style:{pointerEvents:g?void 0:"none"},children:s},u]})});e.s(["DialogViewport",0,u],974217)},77173,313488,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(108821),n=e.i(552245),r=e.i(788015);let l=t.forwardRef(function(e,t){let{render:l,className:o,style:i,id:s,...d}=e,{store:u}=(0,a.useDialogRootContext)(),c=(0,r.useBaseUiId)(s);return u.useSyncedValueWithCleanup("titleElementId",c),(0,n.useRenderElement)("h2",e,{ref:t,props:[{id:c},d]})});e.s(["DialogTitle",0,l],77173);var o=e.i(733332),i=e.i(540886),s=e.i(405005),d=e.i(638396),u=e.i(264111),c=e.i(385689),p=e.i(32199);let g=t.forwardRef(function(e,l){let{render:g,className:m,style:f,disabled:b=!1,nativeButton:x=!0,id:h,payload:y,handle:C,...v}=e,S=(0,a.useDialogRootContext)(!0),w=C?.store??S?.store;if(!w)throw Error((0,o.default)(79));let $=(0,r.useBaseUiId)(h),D=w.useState("floatingRootContext"),j=w.useState("isOpenedByTrigger",$),R=w.useState("triggerPopupId",$),O=t.useRef(null),{registerTrigger:N,isMountedByThisTrigger:k}=(0,u.useTriggerDataForwarding)($,O,w,{payload:y}),{getButtonProps:E,buttonRef:M}=(0,i.useButton)({disabled:b,native:x}),P=(0,c.useClick)(D,{enabled:null!=D}),T=(0,p.useOpenMethodTriggerProps)(()=>w.select("open"),e=>{w.set("openMethod",e)}),I=w.useState("triggerProps",k);return(0,n.useRenderElement)("button",e,{state:{disabled:b,open:j},ref:[M,l,N,O],props:[P.reference,I,T,{[d.CLICK_TRIGGER_IDENTIFIER]:"",id:$,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":R},v,E],stateAttributesMapping:s.triggerOpenStateMapping})});e.s(["DialogTrigger",0,g],313488)},325326,e=>{"use strict";var t=e.i(301807),a=e.i(675606),n=e.i(56434);class r{constructor(e){this.store=e??new t.DialogStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["DialogHandle",0,r,"createDialogHandle",0,function(){return new r}])},353753,e=>{"use strict";e.s([],914651),e.i(914651);var t=e.i(402820),a=e.i(156736),n=e.i(209793),r=e.i(784324),l=e.i(264951),o=e.i(271645),i=e.i(108821),s=e.i(366250),d=e.i(974217),u=e.i(77173),c=e.i(313488),p=e.i(325326);e.s(["Backdrop",()=>t.DialogBackdrop,"Close",()=>a.DialogClose,"Description",()=>n.DialogDescription,"Handle",()=>p.DialogHandle,"Popup",()=>r.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){let t=o.useContext(i.IsDrawerContext)?"drawer":"dialog";return(0,s.useRenderDialogRoot)(e,t)},"Title",()=>u.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>d.DialogViewport,"createHandle",()=>p.createDialogHandle],828376);var g=e.i(828376);e.s(["Dialog",0,g],353753)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("label",{ref:r,"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));r.displayName="Label",e.s(["Label",0,r])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),n=e.i(242064),r=e.i(529681);let l=e=>{let{prefixCls:n,className:r,style:l,size:o,shape:i}=e,s=(0,a.default)({[`${n}-lg`]:"large"===o,[`${n}-sm`]:"small"===o}),d=(0,a.default)({[`${n}-circle`]:"circle"===i,[`${n}-square`]:"square"===i,[`${n}-round`]:"round"===i}),u=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,a.default)(n,s,d,r),style:Object.assign(Object.assign({},u),l)})};e.i(296059);var o=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let u=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),c=e=>({height:e,lineHeight:(0,i.unit)(e)}),p=e=>Object.assign({width:e},c(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},c(e)),m=e=>Object.assign({width:e},c(e)),f=(e,t,a)=>{let{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},c(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:c,gradientFromColor:x,padding:h,marginSM:y,borderRadius:C,titleHeight:v,blockRadius:S,paragraphLiHeight:w,controlHeightXS:$,paragraphMarginTop:D}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},p(d)),[`${a}-sm`]:Object.assign({},p(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:v,background:x,borderRadius:S,[`+ ${r}`]:{marginBlockStart:c}},[r]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:y,[`+ ${r}`]:{marginBlockStart:D}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:i(n).mul(2).equal(),minWidth:i(n).mul(2).equal()},b(n,i))},f(e,n,a)),{[`${a}-lg`]:Object.assign({},b(r,i))}),f(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},b(l,i))}),f(e,l,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},p(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(r)),[`${t}${t}-sm`]:Object.assign({},p(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:a},g(t,i)),[`${n}-lg`]:Object.assign({},g(r,i)),[`${n}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},m(l(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},m(a)),{maxWidth:l(a).mul(4).equal(),maxHeight:l(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,784774,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{ref:r,"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";let l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("thead",{ref:r,"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...a}));l.displayName="TableHeader";let o=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tbody",{ref:r,"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...a}));o.displayName="TableBody";let i=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));i.displayName="TableFooter";let s=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("tr",{ref:r,"data-slot":"table-row",className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));s.displayName="TableRow";let u=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("th",{ref:r,"data-slot":"table-head",className:(0,n.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));u.displayName="TableHead";let d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("td",{ref:r,"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));d.displayName="TableCell",a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("caption",{ref:r,"data-slot":"table-caption",className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...a})).displayName="TableCaption",e.s(["Table",0,r,"TableBody",0,o,"TableCell",0,d,"TableFooter",0,i,"TableHead",0,u,"TableHeader",0,l,"TableRow",0,s])},302747,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-accent",e),...a}));r.displayName="Skeleton",e.s(["Skeleton",0,r])},108821,e=>{"use strict";var t=e.i(733332),a=e.i(271645);let n=a.createContext(!1),r=a.createContext(void 0);e.s(["DialogRootContext",0,r,"IsDrawerContext",0,n,"useDialogRootContext",0,function(e){let n=a.useContext(r);if(!1===e&&void 0===n)throw Error((0,t.default)(27));return n}])},402820,156736,209793,625834,784324,264951,e=>{"use strict";e.i(247167);var t,a,n=e.i(271645),r=e.i(108821),l=e.i(552245),o=e.i(405005),i=e.i(209407);let s={...o.popupStateMapping,...i.transitionStatusMapping},u=n.forwardRef(function(e,t){let{render:a,className:n,style:o,forceRender:i=!1,...u}=e,{store:d}=(0,r.useDialogRootContext)(),c=d.useState("open"),p=d.useState("nested"),g=d.useState("mounted"),m=d.useState("transitionStatus");return(0,l.useRenderElement)("div",e,{state:{open:c,transitionStatus:m},ref:[d.context.backdropRef,t],stateAttributesMapping:s,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:i||!p})});e.s(["DialogBackdrop",0,u],402820);var d=e.i(540886),c=e.i(675606),p=e.i(56434);let g=n.forwardRef(function(e,t){let{render:a,className:n,style:o,disabled:i=!1,nativeButton:s=!0,...u}=e,{store:g}=(0,r.useDialogRootContext)(),m=g.useState("open"),{getButtonProps:f,buttonRef:b}=(0,d.useButton)({disabled:i,native:s});return(0,l.useRenderElement)("button",e,{state:{disabled:i},ref:[t,b],props:[{onClick:function(e){m&&g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.closePress,e.nativeEvent))}},u,f]})});e.s(["DialogClose",0,g],156736);var m=e.i(788015);let f=n.forwardRef(function(e,t){let{render:a,className:n,style:o,id:i,...s}=e,{store:u}=(0,r.useDialogRootContext)(),d=(0,m.useBaseUiId)(i);return u.useSyncedValueWithCleanup("descriptionElementId",d),(0,l.useRenderElement)("p",e,{ref:t,props:[{id:d},s]})});e.s(["DialogDescription",0,f],209793);var b=e.i(61487);let x=((t={}).nestedDialogs="--nested-dialogs",t),h=((a={})[a.open=o.CommonPopupDataAttributes.open]="open",a[a.closed=o.CommonPopupDataAttributes.closed]="closed",a[a.startingStyle=o.CommonPopupDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=o.CommonPopupDataAttributes.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a);var y=e.i(733332);let C=n.createContext(void 0);function v(){let e=n.useContext(C);if(void 0===e)throw Error((0,y.default)(26));return e}e.s(["DialogPortalContext",0,C,"useDialogPortalContext",0,v],625834);var S=e.i(137584),w=e.i(673327),$=e.i(264111),D=e.i(843476);let j={...o.popupStateMapping,...i.transitionStatusMapping,nestedDialogOpen:e=>e?{[h.nestedDialogOpen]:""}:null},R=n.forwardRef(function(e,t){let{render:a,className:n,style:o,finalFocus:i,initialFocus:s,...u}=e,{store:d}=(0,r.useDialogRootContext)(),c=d.useState("descriptionElementId"),p=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),m=d.useState("popupProps"),f=d.useState("modal"),h=d.useState("mounted"),y=d.useState("nested"),C=d.useState("nestedOpenDialogCount"),R=d.useState("open"),O=d.useState("openMethod"),N=d.useState("titleElementId"),k=d.useState("transitionStatus"),E=d.useState("role"),M=g.useState("floatingId"),P=u.id??M;v(),(0,S.useOpenChangeComplete)({open:R,ref:d.context.popupRef,onComplete(){R&&d.context.onOpenChangeComplete?.(!0)}});let T=void 0===s?(0,$.createDefaultInitialFocus)(d.context.popupRef):s,A=d.useStateSetter("popupElement"),I=(0,l.useRenderElement)("div",e,{state:{open:R,nested:y,transitionStatus:k,nestedDialogOpen:C>0},props:[m,{id:P,"aria-labelledby":N??void 0,"aria-describedby":c??void 0,role:E,...$.FOCUSABLE_POPUP_PROPS,hidden:!h,onKeyDown(e){w.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[x.nestedDialogs]:C}},u],ref:[t,d.context.popupRef,A],stateAttributesMapping:j});return(0,D.jsx)(b.FloatingFocusManager,{context:g,openInteractionType:O,disabled:!h,closeOnFocusOut:!p,initialFocus:T,returnFocus:i,modal:!1!==f,restoreFocus:"popup",children:I})});e.s(["DialogPopup",0,R],784324);var O=e.i(144394),N=e.i(726674),k=e.i(426);let E=n.forwardRef(function(e,t){let{keepMounted:a=!1,...n}=e,{store:l}=(0,r.useDialogRootContext)(),o=l.useState("mounted"),i=l.useState("modal"),s=l.useState("open");return o||a?(0,D.jsx)(C.Provider,{value:a,children:(0,D.jsxs)(N.FloatingPortal,{ref:t,...n,children:[o&&!0===i&&(0,D.jsx)(k.InternalBackdrop,{ref:l.context.internalBackdropRef,inert:(0,O.inertValue)(!s)}),e.children]})}):null});e.s(["DialogPortal",0,E],264951)},67530,e=>{"use strict";var t=e.i(271645),a=e.i(145484),n=e.i(956789),r=e.i(17989),l=e.i(647554),o=e.i(675606),i=e.i(56434),s=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:o,isDrawer:i}){let u=e.useState("open"),d=e.useState("disablePointerDismissal"),c=e.useState("modal"),p=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,f]=t.useState(0),[b,x]=t.useState(0),h=0===m,y=(0,r.useDismiss)(g,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===c?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let a=(0,l.getTarget)(t);return!!h&&!d&&(!c||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===a||e.context.backdropRef.current===a||(0,l.contains)(a,p)&&!a?.hasAttribute("data-base-ui-portal"))},escapeKey:h});(0,a.useScrollLock)(u&&!0===c,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{f(e),x(t)}),e.useContextCallback("onNestedDialogClose",()=>{f(0),x(0)}),t.useEffect(()=>(o?.onNestedDialogOpen&&u&&o.onNestedDialogOpen(m+1,b+ +!!i),o?.onNestedDialogClose&&!u&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&u&&o.onNestedDialogClose()}),[i,u,m,b,o]);let C=y.reference??n.EMPTY_OBJECT,v=y.trigger??n.EMPTY_OBJECT,S=y.floating??n.EMPTY_OBJECT;return(0,s.usePopupInteractionProps)(e,{activeTriggerProps:C,inactiveTriggerProps:v,popupProps:S,nestedOpenDialogCount:m,nestedOpenDrawerCount:b}),null},"useDialogRoot",0,function(e){let{store:a,actionsRef:n}=e,r=a.useState("open");(0,s.usePopupRootSync)(a,r),(0,s.useImplicitActiveTrigger)(a);let{forceUnmount:l}=(0,s.useOpenStateTransitions)(r,a),u=t.useCallback(()=>{a.setOpen(!1,(0,o.createChangeEventDetails)(i.REASONS.imperativeAction))},[a]);t.useImperativeHandle(n,()=>({unmount:l,close:u}),[l,u])}])},366250,301807,e=>{"use strict";var t=e.i(271645),a=e.i(713203),n=e.i(67530),r=e.i(108821),l=e.i(616269),o=e.i(301252),i=e.i(116786),s=e.i(990627),u=e.i(264111);let d={...i.popupStoreSelectors,modal:(0,l.createSelector)(e=>e.modal),nested:(0,l.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,l.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,l.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,l.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,l.createSelector)(e=>e.openMethod),descriptionElementId:(0,l.createSelector)(e=>e.descriptionElementId),titleElementId:(0,l.createSelector)(e=>e.titleElementId),viewportElement:(0,l.createSelector)(e=>e.viewportElement),role:(0,l.createSelector)(e=>e.role)};class c extends o.ReactStore{constructor(e,a,n=!1){const r=new s.PopupTriggerMap,l=function(e={}){return{...(0,i.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);l.floatingRootContext=(0,i.createPopupFloatingRootContext)(r,a,n),super(l,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},d)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a={open:e};(0,u.setPopupOpenState)(a,e,t.trigger),this.update(a)};static useStore(e,t){return(0,u.usePopupStore)(e,(e,a)=>new c(t,e,a),!0).store}}e.s(["DialogStore",0,c],301807);var p=e.i(843476);e.s(["useRenderDialogRoot",0,function(e,l="dialog"){let{children:o,open:i,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:d,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:f,handle:b,triggerId:x,defaultTriggerId:h=null}=e,y="alert-dialog"===l,C=(0,r.useDialogRootContext)(!0),v={modal:!!y||m,disablePointerDismissal:y||g,nested:!!C,role:y?"alertdialog":"dialog"},S=c.useStore(b?.store,{open:s,openProp:i,activeTriggerId:h,triggerIdProp:x,...v});(0,a.useOnFirstRender)(()=>{let e=void 0===i&&!1===S.state.open&&!0===s?{open:!0,activeTriggerId:h}:null;y?S.update(e?{...v,...e}:v):e&&S.update(e)}),S.useControlledProp("openProp",i),S.useControlledProp("triggerIdProp",x),S.useSyncedValues(v),S.useContextCallback("onOpenChange",u),S.useContextCallback("onOpenChangeComplete",d);let w=S.useState("open"),$=S.useState("mounted"),D=S.useState("payload");(0,n.useDialogRoot)({store:S,actionsRef:f});let j=t.useMemo(()=>({store:S}),[S]);return(0,p.jsx)(r.IsDrawerContext.Provider,{value:!1,children:(0,p.jsxs)(r.DialogRootContext.Provider,{value:j,children:[(w||$)&&(0,p.jsx)(n.DialogInteractions,{store:S,parentContext:C?.store.context,isDrawer:"drawer"===l}),"function"==typeof o?o({payload:D}):o]})})}],366250)},974217,e=>{"use strict";e.i(247167);var t,a=e.i(271645),n=e.i(552245),r=e.i(405005),l=e.i(209407),o=e.i(108821),i=e.i(625834);let s=((t={})[t.open=r.CommonPopupDataAttributes.open]="open",t[t.closed=r.CommonPopupDataAttributes.closed]="closed",t[t.startingStyle=r.CommonPopupDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=r.CommonPopupDataAttributes.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t),u={...r.popupStateMapping,...l.transitionStatusMapping,nested:e=>e?{[s.nested]:""}:null,nestedDialogOpen:e=>e?{[s.nestedDialogOpen]:""}:null},d=a.forwardRef(function(e,t){let{render:a,className:r,style:l,children:s,...d}=e,c=(0,i.useDialogPortalContext)(),{store:p}=(0,o.useDialogRootContext)(),g=p.useState("open"),m=p.useState("nested"),f=p.useState("transitionStatus"),b=p.useState("nestedOpenDialogCount"),x=p.useState("mounted"),h=p.useStateSetter("viewportElement");return(0,n.useRenderElement)("div",e,{enabled:c||x,state:{open:g,nested:m,transitionStatus:f,nestedDialogOpen:b>0},ref:[t,h],stateAttributesMapping:u,props:[{role:"presentation",hidden:!x,style:{pointerEvents:g?void 0:"none"},children:s},d]})});e.s(["DialogViewport",0,d],974217)},77173,313488,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(108821),n=e.i(552245),r=e.i(788015);let l=t.forwardRef(function(e,t){let{render:l,className:o,style:i,id:s,...u}=e,{store:d}=(0,a.useDialogRootContext)(),c=(0,r.useBaseUiId)(s);return d.useSyncedValueWithCleanup("titleElementId",c),(0,n.useRenderElement)("h2",e,{ref:t,props:[{id:c},u]})});e.s(["DialogTitle",0,l],77173);var o=e.i(733332),i=e.i(540886),s=e.i(405005),u=e.i(638396),d=e.i(264111),c=e.i(385689),p=e.i(32199);let g=t.forwardRef(function(e,l){let{render:g,className:m,style:f,disabled:b=!1,nativeButton:x=!0,id:h,payload:y,handle:C,...v}=e,S=(0,a.useDialogRootContext)(!0),w=C?.store??S?.store;if(!w)throw Error((0,o.default)(79));let $=(0,r.useBaseUiId)(h),D=w.useState("floatingRootContext"),j=w.useState("isOpenedByTrigger",$),R=w.useState("triggerPopupId",$),O=t.useRef(null),{registerTrigger:N,isMountedByThisTrigger:k}=(0,d.useTriggerDataForwarding)($,O,w,{payload:y}),{getButtonProps:E,buttonRef:M}=(0,i.useButton)({disabled:b,native:x}),P=(0,c.useClick)(D,{enabled:null!=D}),T=(0,p.useOpenMethodTriggerProps)(()=>w.select("open"),e=>{w.set("openMethod",e)}),A=w.useState("triggerProps",k);return(0,n.useRenderElement)("button",e,{state:{disabled:b,open:j},ref:[M,l,N,O],props:[P.reference,A,T,{[u.CLICK_TRIGGER_IDENTIFIER]:"",id:$,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":R},v,E],stateAttributesMapping:s.triggerOpenStateMapping})});e.s(["DialogTrigger",0,g],313488)},325326,e=>{"use strict";var t=e.i(301807),a=e.i(675606),n=e.i(56434);class r{constructor(e){this.store=e??new t.DialogStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,a.createChangeEventDetails)(n.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["DialogHandle",0,r,"createDialogHandle",0,function(){return new r}])},353753,e=>{"use strict";e.s([],914651),e.i(914651);var t=e.i(402820),a=e.i(156736),n=e.i(209793),r=e.i(784324),l=e.i(264951),o=e.i(271645),i=e.i(108821),s=e.i(366250),u=e.i(974217),d=e.i(77173),c=e.i(313488),p=e.i(325326);e.s(["Backdrop",()=>t.DialogBackdrop,"Close",()=>a.DialogClose,"Description",()=>n.DialogDescription,"Handle",()=>p.DialogHandle,"Popup",()=>r.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){let t=o.useContext(i.IsDrawerContext)?"drawer":"dialog";return(0,s.useRenderDialogRoot)(e,t)},"Title",()=>d.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>u.DialogViewport,"createHandle",()=>p.createDialogHandle],828376);var g=e.i(828376);e.s(["Dialog",0,g],353753)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("label",{ref:r,"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));r.displayName="Label",e.s(["Label",0,r])},37727,e=>{"use strict";var t=e.i(841947);e.s(["X",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),n=e.i(242064),r=e.i(529681);let l=e=>{let{prefixCls:n,className:r,style:l,size:o,shape:i}=e,s=(0,a.default)({[`${n}-lg`]:"large"===o,[`${n}-sm`]:"small"===o}),u=(0,a.default)({[`${n}-circle`]:"circle"===i,[`${n}-square`]:"square"===i,[`${n}-round`]:"round"===i}),d=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,a.default)(n,s,u,r),style:Object.assign(Object.assign({},d),l)})};e.i(296059);var o=e.i(694758),i=e.i(915654),s=e.i(246422),u=e.i(838378);let d=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),c=e=>({height:e,lineHeight:(0,i.unit)(e)}),p=e=>Object.assign({width:e},c(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},c(e)),m=e=>Object.assign({width:e},c(e)),f=(e,t,a)=>{let{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},c(e)),x=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:i,controlHeight:s,controlHeightLG:u,controlHeightSM:c,gradientFromColor:x,padding:h,marginSM:y,borderRadius:C,titleHeight:v,blockRadius:S,paragraphLiHeight:w,controlHeightXS:$,paragraphMarginTop:D}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},p(s)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},p(u)),[`${a}-sm`]:Object.assign({},p(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:v,background:x,borderRadius:S,[`+ ${r}`]:{marginBlockStart:c}},[r]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:x,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:y,[`+ ${r}`]:{marginBlockStart:D}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:i(n).mul(2).equal(),minWidth:i(n).mul(2).equal()},b(n,i))},f(e,n,a)),{[`${a}-lg`]:Object.assign({},b(r,i))}),f(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},b(l,i))}),f(e,l,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},p(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},p(r)),[`${t}${t}-sm`]:Object.assign({},p(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:o,calc:i}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:a},g(t,i)),[`${n}-lg`]:Object.assign({},g(r,i)),[`${n}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},m(l(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},m(a)),{maxWidth:l(a).mul(4).equal(),maxHeight:l(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[`
${n},
${r} > li,
${a},
${l},
${o},
${i}
- `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:u,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),h=e=>{let{prefixCls:n,className:r,style:l,rows:o=0}=e,i=Array.from({length:o}).map((a,n)=>t.createElement("li",{key:n,style:{width:((e,t)=>{let{width:a,rows:n=2}=t;return Array.isArray(a)?a[e]:n-1===e?a:void 0})(n,e)}}));return t.createElement("ul",{className:(0,a.default)(n,r),style:l},i)},y=({prefixCls:e,className:n,width:r,style:l})=>t.createElement("h3",{className:(0,a.default)(e,n),style:Object.assign({width:r},l)});function C(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:r,loading:o,className:i,rootClassName:s,style:d,children:u,avatar:c=!1,title:p=!0,paragraph:g=!0,active:m,round:f}=e,{getPrefixCls:b,direction:v,className:S,style:w}=(0,n.useComponentConfig)("skeleton"),$=b("skeleton",r),[D,j,R]=x($);if(o||!("loading"in e)){let e,n,r=!!c,o=!!p,u=!!g;if(r){let a=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(c));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},a)))}if(o||u){let e,a;if(o){let a=Object.assign(Object.assign({prefixCls:`${$}-title`},!r&&u?{width:"38%"}:r&&u?{width:"50%"}:{}),C(p));e=t.createElement(y,Object.assign({},a))}if(u){let e,n=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},r&&o||(e.width="61%"),!r&&o?e.rows=3:e.rows=2,e)),C(g));a=t.createElement(h,Object.assign({},n))}n=t.createElement("div",{className:`${$}-content`},e,a)}let b=(0,a.default)($,{[`${$}-with-avatar`]:r,[`${$}-active`]:m,[`${$}-rtl`]:"rtl"===v,[`${$}-round`]:f},S,i,s,j,R);return D(t.createElement("div",{className:b,style:Object.assign(Object.assign({},w),d)},e,n))}return null!=u?u:null};v.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:u=!1,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:c},h))))},v.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,shape:u="circle",size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls","className"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:u,size:c},h))))},v.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:u,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:c},h))))},v.Image=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(n.ConfigContext),u=d("skeleton",r),[c,p,g]=x(u),m=(0,a.default)(u,`${u}-element`,{[`${u}-active`]:s},l,o,p,g);return c(t.createElement("div",{className:m},t.createElement("div",{className:(0,a.default)(`${u}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${u}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${u}-image-path`})))))},v.Node=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s,children:d}=e,{getPrefixCls:u}=t.useContext(n.ConfigContext),c=u("skeleton",r),[p,g,m]=x(c),f=(0,a.default)(c,`${c}-element`,{[`${c}-active`]:s},g,l,o,m);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,a.default)(`${c}-image`,l),style:i},d)))},e.s(["default",0,v],185793)},922611,e=>{"use strict";var t=e.i(271645),a=e.i(175066);function n(){}let r=t.createContext({add:n,remove:n});e.s(["usePanelRef",0,function(e){let n=t.useContext(r),l=t.useRef(null);return(0,a.default)(t=>{if(t){let a=e?t.querySelector(e):t;a&&(n.add(a),l.current=a)}else n.remove(l.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let a=(e,t=0,a=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let r={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",r);let l=e<0?"-":"",o=Math.abs(e),i=o,s="";return o>=1e6?(i=o/1e6,s="M"):o>=1e3&&(i=o/1e3,s="K"),`${l}${i.toLocaleString("en-US",r)}${s}`},n=async(e,a="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return r(e,a);try{return await navigator.clipboard.writeText(e),t.default.success(a),!0}catch(t){return console.error("Clipboard API failed: ",t),r(e,a)}},r=(e,a)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let r=document.execCommand("copy");if(document.body.removeChild(n),r)return t.default.success(a),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,n,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let n=a(e,t,!1,!1);if(0===Number(n.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${n}`},"updateExistingKeys",0,function(e,t){let a=structuredClone(e);for(let[e,n]of Object.entries(t))e in a&&(a[e]=n);return a}])},112179,581070,e=>{"use strict";var t=e.i(843476),a=e.i(487486),n=e.i(115504),r=e.i(746798);function l({content:e,trigger:a}){return(0,t.jsx)(r.TooltipProvider,{delay:300,children:(0,t.jsxs)(r.Tooltip,{children:[(0,t.jsx)(r.TooltipTrigger,{render:a}),(0,t.jsx)(r.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,l],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:r,tooltip:i,dataTestId:s}){let d=(0,t.jsx)(a.Badge,{variant:"outline","data-testid":s,className:(0,n.cn)("whitespace-nowrap font-normal",o[e]),children:r});return i?(0,t.jsx)(l,{content:i,trigger:d}):d}],112179)},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),n=e.i(243652),r=e.i(602869),l=e.i(135214);let o=(0,n.createQueryKeys)("models"),i=(0,n.createQueryKeys)("modelHub"),s=(0,n.createQueryKeys)("autoRouterModelGroups"),d=(0,n.createQueryKeys)("allProxyModels");(0,n.createQueryKeys)("selectedTeamModels");let u=(0,n.createQueryKeys)("infiniteModels"),c=(0,n.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),m=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),f=async(e,t,a)=>{let n=await (0,r.modelInfoCall)(e,t,a,1,1e3),l=n?.total_pages??1;return[n,...await Promise.all(Array.from({length:Math.max(0,l-1)},(n,l)=>(0,r.modelInfoCall)(e,t,a,l+2,1e3)))].flatMap(e=>e?.data??[])};e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,l.default)();return(0,t.useQuery)({queryKey:d.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,a,n,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&n)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,l.default)(),{data:r}=(0,t.useQuery)({queryKey:s.list({filters:{...a&&{userId:a},...n&&{userRole:n}}}),queryFn:async()=>await f(e,a,n),enabled:!!(e&&a&&n),select:m});return r??p},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:n,userId:o,userRole:i}=(0,l.default)();return(0,a.useInfiniteQuery)({queryKey:u.list({filters:{...o&&{userId:o},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,r.modelInfoCall)(n,o,i,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,n,i,s,d,u)=>{let{accessToken:c,userId:p,userRole:g}=(0,l.default)();return(0,t.useQuery)({queryKey:o.list({filters:{...p&&{userId:p},...g&&{userRole:g},page:e,size:a,...n&&{search:n},...i&&{modelId:i},...s&&{teamId:s},...d&&{sortBy:d},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,p,g,e,a,n,i,s,d,u),enabled:!!(c&&p&&g)})},"useUserModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,l.default)();return(0,t.useQuery)({queryKey:c.list({}),queryFn:async()=>(await (0,r.modelAvailableCall)(e,a,n)).data.map(e=>e.id),enabled:!!(e&&a&&n)})}])},355619,e=>{"use strict";var t=e.i(602869);let a=async(e,a,n)=>{try{if(null===e||null===a)return;if(null!==n){let r=(await (0,t.modelAvailableCall)(n,e,a,!0,null,!0)).data.map(e=>e.id),l=[],o=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):o.push(e)}),[...l,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,a,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let a=[],n=[];return e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));n.push(...l),a.push(e)}else n.push(e)}),[...a,...n].filter((e,t,a)=>a.indexOf(e)===t)}])},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(199931),r=e.i(625901),l=e.i(487486),o=e.i(115504);let i=new Set,s=(0,a.createContext)(i);function d(e){let t=(0,a.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:a}){return(0,t.jsx)(n.Waypoints,{size:e,className:a,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let a=(0,r.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:a,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:a}){return d(e)?(0,t.jsxs)(l.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",a),children:[(0,t.jsx)(n.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,d],548151);var u=e.i(581070);let c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${c[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${c[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:a="datetime",fallback:n="-"}){let r,l,o,i=e?new Date(e):null;return!i||Number.isNaN(i.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:n}):(0,t.jsx)(u.CellTooltip,{content:(r=Intl.DateTimeFormat().resolvedOptions().timeZone,l=`${c[i.getMonth()]} ${i.getDate()}, ${i.getFullYear()}`,o=`${p(i.getHours())}:${p(i.getMinutes())}:${p(i.getSeconds())}`,`${l}, ${o} (${r})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(i,a)})})},"formatCellDate",0,g],200208);var m=e.i(174886),f=e.i(500330);let b={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:a="pill",onClick:n,copyable:r=!1,truncate:l=!0,fallback:i="-",tooltip:s,disabled:d=!1,dataTestId:c,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:i});let g=!!n&&!d,x=(0,o.cn)(b[a].base,g&&b[a].clickable,l&&"block max-w-[15ch] truncate",d&&"opacity-50",p),h=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":c,onClick:()=>n(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":c,children:e}),y=(0,t.jsx)(u.CellTooltip,{content:s??e,trigger:h});return r?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[y,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,f.copyToClipboard)(e)},children:(0,t.jsx)(m.Copy,{className:"size-3"})})]}):y}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:a,badge:n,onClick:r,className:l,titleClassName:i}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",i),children:e}),(null!=a&&""!==a||null!=n)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=a&&""!==a&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:a}),n]})]});return null!=r?(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",l),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",l),children:s})}],997422);let h={hasModelAccess:!1,label:"Management"},y={hasModelAccess:!1,label:"Read-only"},C={hasModelAccess:!1,label:"SCIM"},v={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),w=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?h:"read_only"===t?y:Array.isArray(e)&&0!==e.length?e.every(S)?C:w(e,"management_routes")?h:w(e,"info_routes")?y:v:v],146512)},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var a=e.i(843476),n=e.i(146512),r=e.i(355619),l=e.i(487486);let o="all-proxy-models",i=e=>{if(e===o)return"All Proxy Models";let t=(0,r.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:r=3,allowedRoutes:s,keyType:d}){if(!Array.isArray(e)||0===e.length){let e=(0,n.deriveKeyModelScope)(s,d);return e.hasModelAccess?(0,a.jsx)(l.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,a.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,a.jsx)(l.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let u=e.slice(0,r),c=e.slice(r);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[u.map((e,t)=>(0,a.jsx)(l.Badge,{variant:e===o?"secondary":"outline",children:i(e)},t)),c.length>0&&(0,a.jsx)(t.CellTooltip,{content:(0,a.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:c.map((e,t)=>(0,a.jsx)("span",{children:i(e)},t))}),trigger:(0,a.jsxs)(l.Badge,{variant:"outline",className:"cursor-default",children:["+",c.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:n="-",showZero:r=!1}){return null==e||Number.isNaN(e)?(0,a.jsx)("span",{className:"text-muted-foreground",children:n}):0===e?r?(0,a.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,a.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var d=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:n}){let r="number"!=typeof e||Number.isNaN(e)?0:e,l=t??n??null,o=null==t&&null!=n,i="number"==typeof l&&l>0,u=i?r/l*100:0,c=r>0?(0,s.getSpendString)(r,4):"$0.00",p=null===l?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(l)}${o?" (Team)":""}`;return(0,a.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,a.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,a.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:c})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:p})]}),i&&(0,a.jsx)(d.Meter,{value:r,max:l,"aria-valuetext":`${c} of $${(0,s.formatNumberWithCommas)(l)}`,children:(0,a.jsx)(d.MeterTrack,{children:(0,a.jsx)(d.MeterIndicator,{tone:u>100?"over":u>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)},233565,e=>{"use strict";var t=e.i(246349);e.s(["ChevronRightIcon",()=>t.default])}]);
\ No newline at end of file
+ `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,u.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),h=e=>{let{prefixCls:n,className:r,style:l,rows:o=0}=e,i=Array.from({length:o}).map((a,n)=>t.createElement("li",{key:n,style:{width:((e,t)=>{let{width:a,rows:n=2}=t;return Array.isArray(a)?a[e]:n-1===e?a:void 0})(n,e)}}));return t.createElement("ul",{className:(0,a.default)(n,r),style:l},i)},y=({prefixCls:e,className:n,width:r,style:l})=>t.createElement("h3",{className:(0,a.default)(e,n),style:Object.assign({width:r},l)});function C(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:r,loading:o,className:i,rootClassName:s,style:u,children:d,avatar:c=!1,title:p=!0,paragraph:g=!0,active:m,round:f}=e,{getPrefixCls:b,direction:v,className:S,style:w}=(0,n.useComponentConfig)("skeleton"),$=b("skeleton",r),[D,j,R]=x($);if(o||!("loading"in e)){let e,n,r=!!c,o=!!p,d=!!g;if(r){let a=Object.assign(Object.assign({prefixCls:`${$}-avatar`},o&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(c));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},a)))}if(o||d){let e,a;if(o){let a=Object.assign(Object.assign({prefixCls:`${$}-title`},!r&&d?{width:"38%"}:r&&d?{width:"50%"}:{}),C(p));e=t.createElement(y,Object.assign({},a))}if(d){let e,n=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},r&&o||(e.width="61%"),!r&&o?e.rows=3:e.rows=2,e)),C(g));a=t.createElement(h,Object.assign({},n))}n=t.createElement("div",{className:`${$}-content`},e,a)}let b=(0,a.default)($,{[`${$}-with-avatar`]:r,[`${$}-active`]:m,[`${$}-rtl`]:"rtl"===v,[`${$}-round`]:f},S,i,s,j,R);return D(t.createElement("div",{className:b,style:Object.assign(Object.assign({},w),u)},e,n))}return null!=d?d:null};v.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,block:d=!1,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:c},h))))},v.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,shape:d="circle",size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls","className"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:d,size:c},h))))},v.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:u,block:d,size:c="default"}=e,{getPrefixCls:p}=t.useContext(n.ConfigContext),g=p("skeleton",o),[m,f,b]=x(g),h=(0,r.default)(e,["prefixCls"]),y=(0,a.default)(g,`${g}-element`,{[`${g}-active`]:u,[`${g}-block`]:d},i,s,f,b);return m(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:c},h))))},v.Image=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s}=e,{getPrefixCls:u}=t.useContext(n.ConfigContext),d=u("skeleton",r),[c,p,g]=x(d),m=(0,a.default)(d,`${d}-element`,{[`${d}-active`]:s},l,o,p,g);return c(t.createElement("div",{className:m},t.createElement("div",{className:(0,a.default)(`${d}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},v.Node=e=>{let{prefixCls:r,className:l,rootClassName:o,style:i,active:s,children:u}=e,{getPrefixCls:d}=t.useContext(n.ConfigContext),c=d("skeleton",r),[p,g,m]=x(c),f=(0,a.default)(c,`${c}-element`,{[`${c}-active`]:s},g,l,o,m);return p(t.createElement("div",{className:f},t.createElement("div",{className:(0,a.default)(`${c}-image`,l),style:i},u)))},e.s(["default",0,v],185793)},922611,e=>{"use strict";var t=e.i(271645),a=e.i(175066);function n(){}let r=t.createContext({add:n,remove:n});e.s(["usePanelRef",0,function(e){let n=t.useContext(r),l=t.useRef(null);return(0,a.default)(t=>{if(t){let a=e?t.querySelector(e):t;a&&(n.add(a),l.current=a)}else n.remove(l.current)})}])},500330,e=>{"use strict";var t=e.i(727749);let a=(e,t=0,a=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let r={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",r);let l=e<0?"-":"",o=Math.abs(e),i=o,s="";return o>=1e6?(i=o/1e6,s="M"):o>=1e3&&(i=o/1e3,s="K"),`${l}${i.toLocaleString("en-US",r)}${s}`},n=async(e,a="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return r(e,a);try{return await navigator.clipboard.writeText(e),t.default.success(a),!0}catch(t){return console.error("Clipboard API failed: ",t),r(e,a)}},r=(e,a)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let r=document.execCommand("copy");if(document.body.removeChild(n),r)return t.default.success(a),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,n,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let n=a(e,t,!1,!1);if(0===Number(n.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${n}`},"updateExistingKeys",0,function(e,t){let a=structuredClone(e);for(let[e,n]of Object.entries(t))e in a&&(a[e]=n);return a}])},112179,581070,e=>{"use strict";var t=e.i(843476),a=e.i(487486),n=e.i(115504),r=e.i(746798);function l({content:e,trigger:a}){return(0,t.jsx)(r.TooltipProvider,{delay:300,children:(0,t.jsxs)(r.Tooltip,{children:[(0,t.jsx)(r.TooltipTrigger,{render:a}),(0,t.jsx)(r.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,l],581070);let o={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:r,tooltip:i,dataTestId:s}){let u=(0,t.jsx)(a.Badge,{variant:"outline","data-testid":s,className:(0,n.cn)("whitespace-nowrap font-normal",o[e]),children:r});return i?(0,t.jsx)(l,{content:i,trigger:u}):u}],112179)},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),n=e.i(912598),r=e.i(243652),l=e.i(602869),o=e.i(135214);let i=(0,r.createQueryKeys)("models"),s=(0,r.createQueryKeys)("modelHub"),u=(0,r.createQueryKeys)("allProxyModels");(0,r.createQueryKeys)("selectedTeamModels");let d=(0,r.createQueryKeys)("infiniteModels"),c=(0,r.createQueryKeys)("userModels"),p=new Set,g=e=>!!e?.litellm_params?.model?.startsWith("auto_router/"),m=e=>new Set(e.filter(g).map(e=>e.model_name).filter(e=>!!e)),f=e=>e.filter(g),b=async(e,t,a)=>{let n=await (0,l.modelInfoCall)(e,t,a,1,1e3),r=n?.total_pages??1;return[n,...await Promise.all(Array.from({length:Math.max(0,r-1)},(n,r)=>(0,l.modelInfoCall)(e,t,a,r+2,1e3)))].flatMap(e=>e?.data??[])},x=(e,t)=>i.list({filters:{scope:"autoRouters",...e&&{userId:e},...t&&{userRole:t}}});e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,a,n,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&n)})},"useAutoRouterModelGroups",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)(),{data:r}=(0,t.useQuery)({queryKey:x(a,n),queryFn:async()=>await b(e,a,n),enabled:!!(e&&a&&n),select:m});return r??p},"useAutoRouters",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:x(a,n),queryFn:async()=>await b(e,a,n),enabled:!!(e&&a&&n),select:f})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:n,userId:r,userRole:i}=(0,o.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...r&&{userId:r},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,l.modelInfoCall)(n,r,i,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let e=(0,n.useQueryClient)();return async()=>{await e.invalidateQueries({queryKey:i.lists()})}},"useModelHub",0,()=>{let{accessToken:e}=(0,o.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,n,r,s,u,d,c=!1)=>{let{accessToken:p,userId:g,userRole:m}=(0,o.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...g&&{userId:g},...m&&{userRole:m},page:e,size:a,...n&&{search:n},...r&&{modelId:r},...s&&{teamId:s},...u&&{sortBy:u},...d&&{sortOrder:d},...c&&{excludeAutoRouters:"true"}}}),queryFn:async()=>await (0,l.modelInfoCall)(p,g,m,e,a,n,r,s,u,d,c),enabled:!!(p&&g&&m)})},"useUserModels",0,()=>{let{accessToken:e,userId:a,userRole:n}=(0,o.default)();return(0,t.useQuery)({queryKey:c.list({}),queryFn:async()=>(await (0,l.modelAvailableCall)(e,a,n)).data.map(e=>e.id),enabled:!!(e&&a&&n)})}])},199931,e=>{"use strict";let t=(0,e.i(475254).default)("waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);e.s(["Waypoints",0,t],199931)},548151,200208,399536,997422,146512,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(199931),r=e.i(625901),l=e.i(487486),o=e.i(115504);let i=new Set,s=(0,a.createContext)(i);function u(e){let t=(0,a.useContext)(s);return!!e&&t.has(e)}e.s(["AutoRouterIcon",0,function({size:e=12,className:a}){return(0,t.jsx)(n.Waypoints,{size:e,className:a,"aria-hidden":!0})},"AutoRouterModelGroupsProvider",0,function({children:e}){let a=(0,r.useAutoRouterModelGroups)();return(0,t.jsx)(s.Provider,{value:a,children:e})},"AutoRouterTag",0,function({modelGroup:e,className:a}){return u(e)?(0,t.jsxs)(l.Badge,{variant:"secondary",title:`Routed by auto-router "${e}"`,className:(0,o.cn)("gap-1.5 px-2.5 py-1 text-sm font-normal text-foreground",a),children:[(0,t.jsx)(n.Waypoints,{"aria-hidden":!0}),e]}):null},"useIsAutoRoutedModelGroup",0,u],548151);var d=e.i(581070);let c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=e=>String(e).padStart(2,"0"),g=(e,t)=>"date"===t?`${c[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:`${c[e.getMonth()]} ${e.getDate()}, ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`;e.s(["DateCell",0,function({value:e,precision:a="datetime",fallback:n="-"}){let r,l,o,i=e?new Date(e):null;return!i||Number.isNaN(i.getTime())?(0,t.jsx)("span",{className:"text-muted-foreground",children:n}):(0,t.jsx)(d.CellTooltip,{content:(r=Intl.DateTimeFormat().resolvedOptions().timeZone,l=`${c[i.getMonth()]} ${i.getDate()}, ${i.getFullYear()}`,o=`${p(i.getHours())}:${p(i.getMinutes())}:${p(i.getSeconds())}`,`${l}, ${o} (${r})`),trigger:(0,t.jsx)("span",{className:"whitespace-nowrap",children:g(i,a)})})},"formatCellDate",0,g],200208);var m=e.i(174886),f=e.i(500330);let b={pill:{base:"font-mono text-xs font-normal px-2 py-0.5 rounded-md text-left bg-blue-50 text-blue-500",clickable:"hover:bg-blue-100 cursor-pointer"},plain:{base:"font-mono text-xs text-left",clickable:"hover:text-blue-600 cursor-pointer"}};e.s(["IdCell",0,function({value:e,variant:a="pill",onClick:n,copyable:r=!1,truncate:l=!0,fallback:i="-",tooltip:s,disabled:u=!1,dataTestId:c,className:p}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:i});let g=!!n&&!u,x=(0,o.cn)(b[a].base,g&&b[a].clickable,l&&"block max-w-[15ch] truncate",u&&"opacity-50",p),h=g?(0,t.jsx)("button",{type:"button",className:x,"data-testid":c,onClick:()=>n(e),children:e}):(0,t.jsx)("span",{className:x,"data-testid":c,children:e}),y=(0,t.jsx)(d.CellTooltip,{content:s??e,trigger:h});return r?(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1",children:[y,(0,t.jsx)("button",{type:"button","aria-label":"Copy ID",className:"shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),(0,f.copyToClipboard)(e)},children:(0,t.jsx)(m.Copy,{className:"size-3"})})]}):y}],399536);var x=e.i(463059);e.s(["IdentityCell",0,function({title:e,subtitle:a,badge:n,onClick:r,className:l,titleClassName:i}){let s=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,o.cn)("truncate text-sm font-medium text-foreground",i),children:e}),(null!=a&&""!==a||null!=n)&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null!=a&&""!==a&&(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:a}),n]})]});return null!=r?(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,o.cn)("group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-muted",l),children:[s,(0,t.jsx)(x.ChevronRight,{className:"ml-auto size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,t.jsx)("div",{className:(0,o.cn)("min-w-0",l),children:s})}],997422);let h={hasModelAccess:!1,label:"Management"},y={hasModelAccess:!1,label:"Read-only"},C={hasModelAccess:!1,label:"SCIM"},v={hasModelAccess:!0,label:null},S=e=>e.startsWith("/scim"),w=(e,t)=>1===e.length&&e[0]===t;e.s(["deriveKeyModelScope",0,(e,t)=>"management"===t?h:"read_only"===t?y:Array.isArray(e)&&0!==e.length?e.every(S)?C:w(e,"management_routes")?h:w(e,"info_routes")?y:v:v],146512)},355619,e=>{"use strict";var t=e.i(602869);let a=async(e,a,n)=>{try{if(null===e||null===a)return;if(null!==n){let r=(await (0,t.modelAvailableCall)(n,e,a,!0,null,!0)).data.map(e=>e.id),l=[],o=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):o.push(e)}),[...l,...o]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["excludeProxyWideSentinel",0,e=>e.filter(e=>"all-proxy-models"!==e),"fetchAvailableModelsForTeamOrKey",0,a,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let t=e.replace("/*","");return`All ${t} models`}return e},"hasAllModelsSentinel",0,e=>e.includes("all-proxy-models")||e.includes("all-team-models"),"unfurlWildcardModelsInList",0,(e,t)=>{let a=[],n=[];return e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));n.push(...l),a.push(e)}else n.push(e)}),[...a,...n].filter((e,t,a)=>a.indexOf(e)===t)}])},622826,547227,964471,630500,e=>{"use strict";e.i(548151);var t=e.i(581070);e.i(200208),e.i(399536),e.i(997422);var a=e.i(843476),n=e.i(146512),r=e.i(355619),l=e.i(487486);let o="all-proxy-models",i=e=>{if(e===o)return"All Proxy Models";let t=(0,r.getModelDisplayName)(e);return t.length>30?`${t.slice(0,30)}...`:t};e.s(["ModelsCell",0,function({models:e,maxVisible:r=3,allowedRoutes:s,keyType:u}){if(!Array.isArray(e)||0===e.length){let e=(0,n.deriveKeyModelScope)(s,u);return e.hasModelAccess?(0,a.jsx)(l.Badge,{variant:"secondary",children:"All Proxy Models"}):(0,a.jsx)(t.CellTooltip,{content:`Scoped to ${e.label} routes; this key cannot call any models`,trigger:(0,a.jsx)(l.Badge,{variant:"secondary",className:"cursor-default",children:"No model access"})})}let d=e.slice(0,r),c=e.slice(r);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[d.map((e,t)=>(0,a.jsx)(l.Badge,{variant:e===o?"secondary":"outline",children:i(e)},t)),c.length>0&&(0,a.jsx)(t.CellTooltip,{content:(0,a.jsx)("div",{className:"flex max-w-[280px] flex-col gap-0.5",children:c.map((e,t)=>(0,a.jsx)("span",{children:i(e)},t))}),trigger:(0,a.jsxs)(l.Badge,{variant:"outline",className:"cursor-default",children:["+",c.length," more"]})})]})}],547227);var s=e.i(500330);e.s(["MoneyCell",0,function({value:e,decimals:t=4,emptyText:n="-",showZero:r=!1}){return null==e||Number.isNaN(e)?(0,a.jsx)("span",{className:"text-muted-foreground",children:n}):0===e?r?(0,a.jsx)("span",{className:"whitespace-nowrap",children:`$${(0,s.formatNumberWithCommas)(0,t,!1,!0)}`}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"}):(0,a.jsx)("span",{className:"whitespace-nowrap",children:(0,s.getSpendString)(e,t)})}],964471);var u=e.i(944835);e.s(["SpendBudgetCell",0,function({spend:e,maxBudget:t,teamMaxBudget:n}){let r="number"!=typeof e||Number.isNaN(e)?0:e,l=t??n??null,o=null==t&&null!=n,i="number"==typeof l&&l>0,d=i?r/l*100:0,c=r>0?(0,s.getSpendString)(r,4):"$0.00",p=null===l?"· Unlimited":`of $${(0,s.formatNumberWithCommas)(l)}${o?" (Team)":""}`;return(0,a.jsxs)("div",{className:"flex min-w-[130px] flex-col gap-1",children:[(0,a.jsxs)("div",{className:"whitespace-nowrap text-xs",children:[(0,a.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:c})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:p})]}),i&&(0,a.jsx)(u.Meter,{value:r,max:l,"aria-valuetext":`${c} of $${(0,s.formatNumberWithCommas)(l)}`,children:(0,a.jsx)(u.MeterTrack,{children:(0,a.jsx)(u.MeterIndicator,{tone:d>100?"over":d>=80?"warning":"default"})})})]})}],630500),e.i(112179),e.s([],622826)},233565,e=>{"use strict";var t=e.i(246349);e.s(["ChevronRightIcon",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0r9-qx6h8pzi9.js b/litellm/proxy/_experimental/out/_next/static/chunks/0r9-qx6h8pzi9.js
new file mode 100644
index 00000000000..e1f44aa10fe
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0r9-qx6h8pzi9.js
@@ -0,0 +1,7 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),o=e.i(673706),n=e.i(271645);let l=n.default.forwardRef((e,l)=>{let{color:s,children:i,className:d}=e,u=(0,t.__rest)(e,["color","children","className"]);return n.default.createElement("p",Object.assign({ref:l,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",s?(0,o.getColorClassNames)(s,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},u),i)});l.displayName="Title",e.s(["Title",0,l],629569)},95779,e=>{"use strict";var t=e.i(480731);t.BaseColors.Blue,t.BaseColors.Cyan,t.BaseColors.Sky,t.BaseColors.Indigo,t.BaseColors.Violet,t.BaseColors.Purple,t.BaseColors.Fuchsia,t.BaseColors.Slate,t.BaseColors.Gray,t.BaseColors.Zinc,t.BaseColors.Neutral,t.BaseColors.Stone,t.BaseColors.Red,t.BaseColors.Orange,t.BaseColors.Amber,t.BaseColors.Yellow,t.BaseColors.Lime,t.BaseColors.Green,t.BaseColors.Emerald,t.BaseColors.Teal,t.BaseColors.Pink,t.BaseColors.Rose,e.s(["colorPalette",0,{canvasBackground:50,lightBackground:100,background:500,darkBackground:600,darkestBackground:800,lightBorder:200,border:500,darkBorder:700,lightRing:200,ring:300,iconRing:500,lightText:400,text:500,iconText:600,darkText:700,darkestText:900,icon:500}])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),a=e.i(673706),o=e.i(271645);let n=o.default.forwardRef((e,n)=>{let{color:l,className:s,children:i}=e;return o.default.createElement("p",{ref:n,className:(0,r.tremorTwMerge)("text-tremor-default",l?(0,a.getColorClassNames)(l,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),s)},i)});n.displayName="Text",e.s(["default",0,n],936325),e.s(["Text",0,n],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let o=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),l=e=>e?6:5,s=(e,t,r,a,o)=>{clearTimeout(a.current);let l=n(e);t(l),r.current=l,o&&o({current:l})};var i=e.i(480731),d=e.i(444755),u=e.i(673706);let c=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var m=e.i(95779);let f={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},b=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,u.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,u.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,u.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,u.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,u.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,u.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,u.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,u.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,u.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,u.getColorClassNames)(t,m.colorPalette.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?(0,u.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,u.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,u.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,u.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,u.makeClassName)("Button"),g=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:n,transitionStatus:l})=>{let s=n?r===i.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",u=(0,d.tremorTwMerge)("w-0 h-0"),m={default:u,entering:u,entered:t,exiting:t,exited:u};return e?a.default.createElement(c,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",s,m.default,m[l]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,s)})},h=a.default.forwardRef((e,o)=>{let{icon:c,iconPosition:m=i.HorizontalPositions.Left,size:h=i.Sizes.SM,color:x,variant:v="primary",disabled:C,loading:k=!1,loadingText:y,children:w,tooltip:T,className:E}=e,N=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),P=k||C,S=void 0!==c||k,I=k&&y,R=!(!w&&!I),M=(0,d.tremorTwMerge)(f[h].height,f[h].width),F="light"!==v?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=b(v,x),O=("light"!==v?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}})[h],{tooltipProps:$,getReferenceProps:A}=(0,r.useTooltip)(300),[D,z]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:i,initialEntered:d,mountOnEnter:u,unmountOnExit:c,onStateChange:m}={})=>{let[f,b]=(0,a.useState)(()=>n(d?2:l(u))),p=(0,a.useRef)(f),g=(0,a.useRef)(0),[h,x]="object"==typeof i?[i.enter,i.exit]:[i,i],v=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return l(t)}})(p.current._s,c);e&&s(e,b,p,g,m)},[m,c]);return[f,(0,a.useCallback)(a=>{let n=e=>{switch(s(e,b,p,g,m),e){case 1:h>=0&&(g.current=((...e)=>setTimeout(...e))(v,h));break;case 4:x>=0&&(g.current=((...e)=>setTimeout(...e))(v,x));break;case 0:case 3:g.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},i=p.current.isEnter;"boolean"!=typeof a&&(a=!i),a?i||n(e?+!r:2):i&&n(t?o?3:4:l(c))},[v,m,e,t,r,o,h,x,c]),v]})({timeout:50});return(0,a.useEffect)(()=>{z(k)},[k]),a.default.createElement("button",Object.assign({ref:(0,u.mergeRefs)([o,$.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",F,O.paddingX,O.paddingY,O.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,P?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b(v,x).hoverTextColor,b(v,x).hoverBgColor,b(v,x).hoverBorderColor),E),disabled:P},A,N),a.default.createElement(r.default,Object.assign({text:T},$)),S&&m!==i.HorizontalPositions.Right?a.default.createElement(g,{loading:k,iconSize:M,iconPosition:m,Icon:c,transitionStatus:D.status,needMargin:R}):null,I||w?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},I?y:w):null,S&&m===i.HorizontalPositions.Right?a.default.createElement(g,{loading:k,iconSize:M,iconPosition:m,Icon:c,transitionStatus:D.status,needMargin:R}):null)});h.displayName="Button",e.s(["Button",0,h],994388)},2788,e=>{"use strict";let t;var r=e.i(700020),a=((t=a||{})[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t);let o=(0,r.forwardRefWithAs)(function(e,t){var a;let{features:o=1,...n}=e,l={ref:t,"aria-hidden":(2&o)==2||(null!=(a=n["aria-hidden"])?a:void 0),hidden:(4&o)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&o)==4&&(2&o)!=2&&{display:"none"}}};return(0,r.useRender)()({ourProps:l,theirProps:n,slot:{},defaultTag:"span",name:"Hidden"})});e.s(["Hidden",0,o,"HiddenFeatures",0,a])},553521,e=>{"use strict";var t=e.i(271645),r=e.i(835696);e.s(["useIsMounted",0,function(){let e=(0,t.useRef)(!1);return(0,r.useIsoMorphicEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}])},652265,e=>{"use strict";let t,r,a,o,n;e.i(544508);var l=e.i(397701),s=e.i(402155);let i=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),d=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var u=((t=u||{})[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t),c=((r=c||{})[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r),m=((a=m||{})[a.Previous=-1]="Previous",a[a.Next=1]="Next",a);function f(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(i)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var b=((o=b||{})[o.Strict=0]="Strict",o[o.Loose=1]="Loose",o),p=((n=p||{})[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n);function g(e,t=e=>e){return e.slice().sort((e,r)=>{let a=t(e),o=t(r);if(null===a||null===o)return 0;let n=a.compareDocumentPosition(o);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function h(e,t,{sorted:r=!0,relativeTo:a=null,skipElements:o=[]}={}){var n,l,s;let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,u=Array.isArray(e)?r?g(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(d)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):f(e);o.length>0&&u.length>1&&(u=u.filter(e=>!o.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),a=null!=a?a:i.activeElement;let c=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,u.indexOf(a))-1;if(4&t)return Math.max(0,u.indexOf(a))+1;if(8&t)return u.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),b=32&t?{preventScroll:!0}:{},p=0,x=u.length,v;do{if(p>=x||p+x<=0)return 0;let e=m+p;if(16&t)e=(e+x)%x;else{if(e<0)return 3;if(e>=x)return 1}null==(v=u[e])||v.focus(b),p+=c}while(v!==i.activeElement)return 6&t&&null!=(s=null==(l=null==(n=v)?void 0:n.matches)?void 0:l.call(n,"textarea,input"))&&s&&v.select(),2}"u">typeof window&&"u">typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["Focus",0,u,"FocusResult",0,c,"FocusableMode",0,b,"focusFrom",0,function(e,t){return h(f(),t,{relativeTo:e})},"focusIn",0,h,"getFocusableElements",0,f,"isFocusableElement",0,function(e,t=0){var r;return e!==(null==(r=(0,s.getOwnerDocument)(e))?void 0:r.body)&&(0,l.match)(t,{0:()=>e.matches(i),1(){let t=e;for(;null!==t;){if(t.matches(i))return!0;t=t.parentElement}return!1}})},"sortByDomNode",0,g])},751734,144582,e=>{"use strict";var t=e.i(271645);let r=(0,t.createContext)(0);e.s(["default",0,r],751734);let a=(0,t.createContext)({selectedValue:void 0,handleValueChange:void 0});e.s(["default",0,a],144582)},404206,e=>{"use strict";var t=e.i(290571),r=e.i(751734),a=e.i(144582),o=e.i(444755),n=e.i(673706),l=e.i(271645);let s=(0,n.makeClassName)("TabPanel"),i=l.default.forwardRef((e,n)=>{let{children:i,className:d}=e,u=(0,t.__rest)(e,["children","className"]),{selectedValue:c}=(0,l.useContext)(a.default),m=c===(0,l.useContext)(r.default);return l.default.createElement("div",Object.assign({ref:n,className:(0,o.tremorTwMerge)(s("root"),"w-full mt-2",m?"":"hidden",d),"aria-selected":m?"true":"false"},u),i)});i.displayName="TabPanel",e.s(["TabPanel",0,i],404206)},970554,e=>{"use strict";let t,r,a;var o=e.i(783222),n=e.i(433336),l=e.i(271645),s=e.i(394487),i=e.i(914189),d=e.i(835696),u=e.i(941444),c=e.i(144279),m=e.i(294316),f=e.i(553521),b=e.i(2788);function p({onFocus:e}){let[t,r]=(0,l.useState)(!0),a=(0,f.useIsMounted)();return t?l.default.createElement(b.Hidden,{as:"button",type:"button",features:b.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let o,n=50;o=requestAnimationFrame(function t(){if(n--<=0){o&&cancelAnimationFrame(o);return}if(e()){if(cancelAnimationFrame(o),!a.current)return;r(!1);return}o=requestAnimationFrame(t)})}}):null}var g=e.i(652265),h=e.i(397701),x=e.i(368578),v=e.i(402155),C=e.i(700020);let k=l.createContext(null);function y({children:e}){let t=l.useRef({groups:new Map,get(e,t){var r;let a=this.groups.get(e);a||(a=new Map,this.groups.set(e,a));let o=null!=(r=a.get(t))?r:0;return a.set(t,o+1),[Array.from(a.keys()).indexOf(t),function(){let e=a.get(t);e>1?a.set(t,e-1):a.delete(t)}]}});return l.createElement(k.Provider,{value:t},e)}function w(e){let t=l.useContext(k);if(!t)throw Error("You must wrap your component in a ");let r=l.useId(),[a,o]=t.current.get(e,r);return l.useEffect(()=>o,[]),a}var T=e.i(998348),E=((t=E||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),N=((r=N||{})[r.Less=-1]="Less",r[r.Equal=0]="Equal",r[r.Greater=1]="Greater",r),P=((a=P||{})[a.SetSelectedIndex=0]="SetSelectedIndex",a[a.RegisterTab=1]="RegisterTab",a[a.UnregisterTab=2]="UnregisterTab",a[a.RegisterPanel=3]="RegisterPanel",a[a.UnregisterPanel=4]="UnregisterPanel",a);let S={0(e,t){var r;let a=(0,g.sortByDomNode)(e.tabs,e=>e.current),o=(0,g.sortByDomNode)(e.panels,e=>e.current),n=a.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),l={...e,tabs:a,panels:o};if(t.index<0||t.index>a.length-1){let r=(0,h.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,h.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===n.length)return l;let o=(0,h.match)(r,{0:()=>a.indexOf(n[0]),1:()=>a.indexOf(n[n.length-1])});return{...l,selectedIndex:-1===o?e.selectedIndex:o}}let s=a.slice(0,t.index),i=[...a.slice(t.index),...s].find(e=>n.includes(e));if(!i)return l;let d=null!=(r=a.indexOf(i))?r:e.selectedIndex;return -1===d&&(d=e.selectedIndex),{...l,selectedIndex:d}},1(e,t){if(e.tabs.includes(t.tab))return e;let r=e.tabs[e.selectedIndex],a=(0,g.sortByDomNode)([...e.tabs,t.tab],e=>e.current),o=e.selectedIndex;return e.info.current.isControlled||-1===(o=a.indexOf(r))&&(o=e.selectedIndex),{...e,tabs:a,selectedIndex:o}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,g.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},I=(0,l.createContext)(null);function R(e){let t=(0,l.useContext)(I);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,R),t}return t}I.displayName="TabsDataContext";let M=(0,l.createContext)(null);function F(e){let t=(0,l.useContext)(M);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,F),t}return t}function B(e,t){return(0,h.match)(t.type,S,e,t)}M.displayName="TabsActionsContext";let O=C.RenderFeatures.RenderStrategy|C.RenderFeatures.Static,$=Object.assign((0,C.forwardRefWithAs)(function(e,t){var r,a;let u=(0,l.useId)(),{id:f=`headlessui-tabs-tab-${u}`,disabled:b=!1,autoFocus:p=!1,...k}=e,{orientation:y,activation:E,selectedIndex:N,tabs:P,panels:S}=R("Tab"),I=F("Tab"),M=R("Tab"),[B,O]=(0,l.useState)(null),$=(0,l.useRef)(null),A=(0,m.useSyncRefs)($,t,O);(0,d.useIsoMorphicEffect)(()=>I.registerTab($),[I,$]);let D=w("tabs"),z=P.indexOf($);-1===z&&(z=D);let j=z===N,L=(0,i.useEvent)(e=>{var t;let r=e();if(r===g.FocusResult.Success&&"auto"===E){let e=null==(t=(0,v.getOwnerDocument)($))?void 0:t.activeElement,r=M.tabs.findIndex(t=>t.current===e);-1!==r&&I.change(r)}return r}),_=(0,i.useEvent)(e=>{let t=P.map(e=>e.current).filter(Boolean);if(e.key===T.Keys.Space||e.key===T.Keys.Enter){e.preventDefault(),e.stopPropagation(),I.change(z);return}switch(e.key){case T.Keys.Home:case T.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),L(()=>(0,g.focusIn)(t,g.Focus.First));case T.Keys.End:case T.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),L(()=>(0,g.focusIn)(t,g.Focus.Last))}if(L(()=>(0,h.match)(y,{vertical:()=>e.key===T.Keys.ArrowUp?(0,g.focusIn)(t,g.Focus.Previous|g.Focus.WrapAround):e.key===T.Keys.ArrowDown?(0,g.focusIn)(t,g.Focus.Next|g.Focus.WrapAround):g.FocusResult.Error,horizontal:()=>e.key===T.Keys.ArrowLeft?(0,g.focusIn)(t,g.Focus.Previous|g.Focus.WrapAround):e.key===T.Keys.ArrowRight?(0,g.focusIn)(t,g.Focus.Next|g.Focus.WrapAround):g.FocusResult.Error}))===g.FocusResult.Success)return e.preventDefault()}),G=(0,l.useRef)(!1),H=(0,i.useEvent)(()=>{var e;G.current||(G.current=!0,null==(e=$.current)||e.focus({preventScroll:!0}),I.change(z),(0,x.microTask)(()=>{G.current=!1}))}),V=(0,i.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:K,focusProps:X}=(0,o.useFocusRing)({autoFocus:p}),{isHovered:W,hoverProps:Y}=(0,n.useHover)({isDisabled:b}),{pressed:q,pressProps:U}=(0,s.useActivePress)({disabled:b}),Z=(0,l.useMemo)(()=>({selected:j,hover:W,active:q,focus:K,autofocus:p,disabled:b}),[j,W,K,q,p,b]),J=(0,C.mergeProps)({ref:A,onKeyDown:_,onMouseDown:V,onClick:H,id:f,role:"tab",type:(0,c.useResolveButtonType)(e,B),"aria-controls":null==(a=null==(r=S[z])?void 0:r.current)?void 0:a.id,"aria-selected":j,tabIndex:j?0:-1,disabled:b||void 0,autoFocus:p},X,Y,U);return(0,C.useRender)()({ourProps:J,theirProps:k,slot:Z,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,C.forwardRefWithAs)(function(e,t){let{defaultIndex:r=0,vertical:a=!1,manual:o=!1,onChange:n,selectedIndex:s=null,...c}=e,f=a?"vertical":"horizontal",b=o?"manual":"auto",h=null!==s,x=(0,u.useLatestValue)({isControlled:h}),v=(0,m.useSyncRefs)(t),[k,w]=(0,l.useReducer)(B,{info:x,selectedIndex:null!=s?s:r,tabs:[],panels:[]}),T=(0,l.useMemo)(()=>({selectedIndex:k.selectedIndex}),[k.selectedIndex]),E=(0,u.useLatestValue)(n||(()=>{})),N=(0,u.useLatestValue)(k.tabs),P=(0,l.useMemo)(()=>({orientation:f,activation:b,...k}),[f,b,k]),S=(0,i.useEvent)(e=>(w({type:1,tab:e}),()=>w({type:2,tab:e}))),R=(0,i.useEvent)(e=>(w({type:3,panel:e}),()=>w({type:4,panel:e}))),F=(0,i.useEvent)(e=>{O.current!==e&&E.current(e),h||w({type:0,index:e})}),O=(0,u.useLatestValue)(h?e.selectedIndex:k.selectedIndex),$=(0,l.useMemo)(()=>({registerTab:S,registerPanel:R,change:F}),[]);(0,d.useIsoMorphicEffect)(()=>{w({type:0,index:null!=s?s:r})},[s]),(0,d.useIsoMorphicEffect)(()=>{if(void 0===O.current||k.tabs.length<=0)return;let e=(0,g.sortByDomNode)(k.tabs,e=>e.current);e.some((e,t)=>k.tabs[t]!==e)&&F(e.indexOf(k.tabs[O.current]))});let A=(0,C.useRender)();return l.default.createElement(y,null,l.default.createElement(M.Provider,{value:$},l.default.createElement(I.Provider,{value:P},P.tabs.length<=0&&l.default.createElement(p,{onFocus:()=>{var e,t;for(let r of N.current)if((null==(e=r.current)?void 0:e.tabIndex)===0)return null==(t=r.current)||t.focus(),!0;return!1}}),A({ourProps:{ref:v},theirProps:c,slot:T,defaultTag:"div",name:"Tabs"}))))}),List:(0,C.forwardRefWithAs)(function(e,t){let{orientation:r,selectedIndex:a}=R("Tab.List"),o=(0,m.useSyncRefs)(t),n=(0,l.useMemo)(()=>({selectedIndex:a}),[a]);return(0,C.useRender)()({ourProps:{ref:o,role:"tablist","aria-orientation":r},theirProps:e,slot:n,defaultTag:"div",name:"Tabs.List"})}),Panels:(0,C.forwardRefWithAs)(function(e,t){let{selectedIndex:r}=R("Tab.Panels"),a=(0,m.useSyncRefs)(t),o=(0,l.useMemo)(()=>({selectedIndex:r}),[r]);return(0,C.useRender)()({ourProps:{ref:a},theirProps:e,slot:o,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,C.forwardRefWithAs)(function(e,t){var r,a,n,s;let i=(0,l.useId)(),{id:u=`headlessui-tabs-panel-${i}`,tabIndex:c=0,...f}=e,{selectedIndex:p,tabs:g,panels:h}=R("Tab.Panel"),x=F("Tab.Panel"),v=(0,l.useRef)(null),k=(0,m.useSyncRefs)(v,t);(0,d.useIsoMorphicEffect)(()=>x.registerPanel(v),[x,v]);let y=w("panels"),T=h.indexOf(v);-1===T&&(T=y);let E=T===p,{isFocusVisible:N,focusProps:P}=(0,o.useFocusRing)(),S=(0,l.useMemo)(()=>({selected:E,focus:N}),[E,N]),I=(0,C.mergeProps)({ref:k,id:u,role:"tabpanel","aria-labelledby":null==(a=null==(r=g[T])?void 0:r.current)?void 0:a.id,tabIndex:E?c:-1},P),M=(0,C.useRender)();return E||null!=(n=f.unmount)&&!n||null!=(s=f.static)&&s?M({ourProps:I,theirProps:f,slot:S,defaultTag:"div",features:O,visible:E,name:"Tabs.Panel"}):l.default.createElement(b.Hidden,{"aria-hidden":"true",...I})})});e.s(["Tab",0,$],970554)},723731,e=>{"use strict";var t=e.i(290571),r=e.i(970554),a=e.i(751734),o=e.i(144582),n=e.i(444755),l=e.i(673706),s=e.i(271645);let i=(0,l.makeClassName)("TabPanels"),d=s.default.forwardRef((e,l)=>{let{children:d,className:u}=e,c=(0,t.__rest)(e,["children","className"]);return s.default.createElement(r.Tab.Panels,Object.assign({as:"div",ref:l,className:(0,n.tremorTwMerge)(i("root"),"w-full",u)},c),({selectedIndex:e})=>s.default.createElement(o.default.Provider,{value:{selectedValue:e}},s.default.Children.map(d,(e,t)=>s.default.createElement(a.default.Provider,{value:t},e))))});d.displayName="TabPanels",e.s(["TabPanels",0,d],723731)},653824,e=>{"use strict";var t=e.i(290571),r=e.i(970554),a=e.i(444755),o=e.i(673706),n=e.i(271645);let l=(0,o.makeClassName)("TabGroup"),s=n.default.forwardRef((e,o)=>{let{defaultIndex:s,index:i,onIndexChange:d,children:u,className:c}=e,m=(0,t.__rest)(e,["defaultIndex","index","onIndexChange","children","className"]);return n.default.createElement(r.Tab.Group,Object.assign({as:"div",ref:o,defaultIndex:s,selectedIndex:i,onChange:d,className:(0,a.tremorTwMerge)(l("root"),"w-full",c)},m),u)});s.displayName="TabGroup",e.s(["TabGroup",0,s],653824)},405371,910342,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731);let o=(0,r.createContext)(a.BaseColors.Blue);e.s(["default",0,o],910342);var n=e.i(970554),l=e.i(444755);let s=(0,e.i(673706).makeClassName)("TabList"),i=(0,r.createContext)("line"),d={line:(0,l.tremorTwMerge)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,l.tremorTwMerge)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},u=r.default.forwardRef((e,a)=>{let{color:u,variant:c="line",children:m,className:f}=e,b=(0,t.__rest)(e,["color","variant","children","className"]);return r.default.createElement(n.Tab.List,Object.assign({ref:a,className:(0,l.tremorTwMerge)(s("root"),"justify-start overflow-x-clip",d[c],f)},b),r.default.createElement(i.Provider,{value:c},r.default.createElement(o.Provider,{value:u},m)))});u.displayName="TabList",e.s(["TabVariantContext",0,i,"default",0,u],405371)},881073,e=>{"use strict";var t=e.i(405371);e.s(["TabList",()=>t.default])},197647,e=>{"use strict";var t=e.i(290571),r=e.i(970554),a=e.i(95779),o=e.i(444755),n=e.i(673706),l=e.i(271645),s=e.i(405371),i=e.i(910342);let d=(0,n.makeClassName)("Tab"),u=l.default.forwardRef((e,u)=>{let{icon:c,className:m,children:f}=e,b=(0,t.__rest)(e,["icon","className","children"]),p=(0,l.useContext)(s.TabVariantContext),g=(0,l.useContext)(i.default);return l.default.createElement(r.Tab,Object.assign({ref:u,className:(0,o.tremorTwMerge)(d("root"),"flex whitespace-nowrap truncate max-w-xs outline-none data-focus-visible:ring text-tremor-default transition duration-100",function(e,t){switch(e){case"line":return(0,o.tremorTwMerge)("data-[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","[&:not([data-selected])]:dark:hover:border-dark-tremor-content-emphasis [&:not([data-selected])]:dark:hover:text-dark-tremor-content-emphasis [&:not([data-selected])]:dark:text-dark-tremor-content",t?(0,n.getColorClassNames)(t,a.colorPalette.border).selectBorderColor:["data-[selected]:border-tremor-brand data-[selected]:text-tremor-brand","data-[selected]:dark:border-dark-tremor-brand data-[selected]:dark:text-dark-tremor-brand"]);case"solid":return(0,o.tremorTwMerge)("border-transparent border rounded-tremor-small px-2.5 py-1","data-[selected]:border-tremor-border data-[selected]:bg-tremor-background data-[selected]:shadow-tremor-input [&:not([data-selected])]:hover:text-tremor-content-emphasis data-[selected]:text-tremor-brand [&:not([data-selected])]:text-tremor-content","dark:data-[selected]:border-dark-tremor-border dark:data-[selected]:bg-dark-tremor-background dark:data-[selected]:shadow-dark-tremor-input dark:[&:not([data-selected])]:hover:text-dark-tremor-content-emphasis dark:data-[selected]:text-dark-tremor-brand dark:[&:not([data-selected])]:text-dark-tremor-content",t?(0,n.getColorClassNames)(t,a.colorPalette.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(p,g),m,g&&(0,n.getColorClassNames)(g,a.colorPalette.text).selectTextColor)},b),c?l.default.createElement(c,{className:(0,o.tremorTwMerge)(d("icon"),"flex-none h-5 w-5",f?"mr-2":"")}):null,f?l.default.createElement("span",null,f):null)});u.displayName="Tab",e.s(["Tab",0,u],197647)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),o=e.i(392221),n=e.i(703923),l=e.i(343794),s=e.i(914949),i=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],u=(0,i.forwardRef)(function(e,u){var c=e.prefixCls,m=void 0===c?"rc-checkbox":c,f=e.className,b=e.style,p=e.checked,g=e.disabled,h=e.defaultChecked,x=e.type,v=void 0===x?"checkbox":x,C=e.title,k=e.onChange,y=(0,n.default)(e,d),w=(0,i.useRef)(null),T=(0,i.useRef)(null),E=(0,s.default)(void 0!==h&&h,{value:p}),N=(0,o.default)(E,2),P=N[0],S=N[1];(0,i.useImperativeHandle)(u,function(){return{focus:function(e){var t;null==(t=w.current)||t.focus(e)},blur:function(){var e;null==(e=w.current)||e.blur()},input:w.current,nativeElement:T.current}});var I=(0,l.default)(m,f,(0,a.default)((0,a.default)({},"".concat(m,"-checked"),P),"".concat(m,"-disabled"),g));return i.createElement("span",{className:I,title:C,style:b,ref:T},i.createElement("input",(0,t.default)({},y,{className:"".concat(m,"-input"),ref:w,onChange:function(t){g||("checked"in e||S(t.target.checked),null==k||k({target:(0,r.default)((0,r.default)({},e),{},{type:v,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:g,checked:!!P,type:v})),i.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,u],91874);var c=e.i(963188);e.s(["default",0,function(e){let t=i.default.useRef(null),r=()=>{c.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,c.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),o=e.i(611935),n=e.i(121872),l=e.i(26905),s=e.i(242064),i=e.i(937328),d=e.i(321883),u=e.i(62139);let c=t.default.createContext(null);e.i(296059);var m=e.i(915654),f=e.i(183293),b=e.i(246422),p=e.i(838378);function g(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,f.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,f.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,m.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,m.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
+ ${r}:not(${r}-disabled),
+ ${t}:not(${t}-disabled)
+ `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
+ ${r}-checked:not(${r}-disabled),
+ ${t}-checked:not(${t}-disabled)
+ `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,p.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let h=(0,b.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[g(t,e)]);e.s(["default",0,h,"getStyle",0,g],236836);var x=e.i(681216),v=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r};let C=t.forwardRef((e,m)=>{var f;let{prefixCls:b,className:p,rootClassName:g,children:C,indeterminate:k=!1,style:y,onMouseEnter:w,onMouseLeave:T,skipGroup:E=!1,disabled:N}=e,P=v(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:S,direction:I,checkbox:R}=t.useContext(s.ConfigContext),M=t.useContext(c),{isFormItemInput:F}=t.useContext(u.FormItemInputContext),B=t.useContext(i.default),O=null!=(f=(null==M?void 0:M.disabled)||N)?f:B,$=t.useRef(P.value),A=t.useRef(null),D=(0,o.composeRef)(m,A);t.useEffect(()=>{null==M||M.registerValue(P.value)},[]),t.useEffect(()=>{if(!E)return P.value!==$.current&&(null==M||M.cancelValue($.current),null==M||M.registerValue(P.value),$.current=P.value),()=>null==M?void 0:M.cancelValue(P.value)},[P.value]),t.useEffect(()=>{var e;(null==(e=A.current)?void 0:e.input)&&(A.current.input.indeterminate=k)},[k]);let z=S("checkbox",b),j=(0,d.default)(z),[L,_,G]=h(z,j),H=Object.assign({},P);M&&!E&&(H.onChange=(...e)=>{P.onChange&&P.onChange.apply(P,e),M.toggleOption&&M.toggleOption({label:C,value:P.value})},H.name=M.name,H.checked=M.value.includes(P.value));let V=(0,r.default)(`${z}-wrapper`,{[`${z}-rtl`]:"rtl"===I,[`${z}-wrapper-checked`]:H.checked,[`${z}-wrapper-disabled`]:O,[`${z}-wrapper-in-form-item`]:F},null==R?void 0:R.className,p,g,G,j,_),K=(0,r.default)({[`${z}-indeterminate`]:k},l.TARGET_CLS,_),[X,W]=(0,x.default)(H.onClick);return L(t.createElement(n.default,{component:"Checkbox",disabled:O},t.createElement("label",{className:V,style:Object.assign(Object.assign({},null==R?void 0:R.style),y),onMouseEnter:w,onMouseLeave:T,onClick:X},t.createElement(a.default,Object.assign({},H,{onClick:W,prefixCls:z,className:K,disabled:O,ref:D})),null!=C&&t.createElement("span",{className:`${z}-label`},C))))});var k=e.i(8211),y=e.i(529681),w=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r};let T=t.forwardRef((e,a)=>{let{defaultValue:o,children:n,options:l=[],prefixCls:i,className:u,rootClassName:m,style:f,onChange:b}=e,p=w(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:g,direction:x}=t.useContext(s.ConfigContext),[v,T]=t.useState(p.value||o||[]),[E,N]=t.useState([]);t.useEffect(()=>{"value"in p&&T(p.value||[])},[p.value]);let P=t.useMemo(()=>l.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[l]),S=e=>{N(t=>t.filter(t=>t!==e))},I=e=>{N(t=>[].concat((0,k.default)(t),[e]))},R=e=>{let t=v.indexOf(e.value),r=(0,k.default)(v);-1===t?r.push(e.value):r.splice(t,1),"value"in p||T(r),null==b||b(r.filter(e=>E.includes(e)).sort((e,t)=>P.findIndex(t=>t.value===e)-P.findIndex(e=>e.value===t)))},M=g("checkbox",i),F=`${M}-group`,B=(0,d.default)(M),[O,$,A]=h(M,B),D=(0,y.default)(p,["value","disabled"]),z=l.length?P.map(e=>t.createElement(C,{prefixCls:M,key:e.value.toString(),disabled:"disabled"in e?e.disabled:p.disabled,value:e.value,checked:v.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${F}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):n,j=t.useMemo(()=>({toggleOption:R,value:v,disabled:p.disabled,name:p.name,registerValue:I,cancelValue:S}),[R,v,p.disabled,p.name,I,S]),L=(0,r.default)(F,{[`${F}-rtl`]:"rtl"===x},u,m,A,B,$);return O(t.createElement("div",Object.assign({className:L,style:f},D,{ref:a}),t.createElement(c.Provider,{value:j},z)))});C.Group=T,C.__ANT_CHECKBOX=!0,e.s(["default",0,C],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0sm3ln66e4502.js b/litellm/proxy/_experimental/out/_next/static/chunks/0sm3ln66e4502.js
new file mode 100644
index 00000000000..ec541035eb6
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0sm3ln66e4502.js
@@ -0,0 +1,3 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97859,e=>{"use strict";e.s(["AGENT_CALL_TYPES",0,["asend_message"],"ERROR_CODE_OPTIONS",0,[{label:"400 - Bad Request",value:"400"},{label:"401 - Invalid Authentication",value:"401"},{label:"403 - Permission Denied",value:"403"},{label:"404 - Not Found",value:"404"},{label:"408 - Request Timeout",value:"408"},{label:"422 - Unprocessable Entity",value:"422"},{label:"429 - Rate Limited",value:"429"},{label:"500 - Internal Server Error",value:"500"},{label:"502 - Bad Gateway",value:"502"},{label:"503 - Service Unavailable",value:"503"},{label:"529 - Overloaded",value:"529"}],"MCP_CALL_TYPES",0,["call_mcp_tool","list_mcp_tools"],"QUICK_SELECT_OPTIONS",0,[{label:"Last Minute",value:1,unit:"minutes"},{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}]])},894660,283086,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);let s=(0,e.i(475254).default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",0,s],283086)},3565,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(464571),l=e.i(608856),a=e.i(560025),n=e.i(492030),i=e.i(166406),o=e.i(894660),d=e.i(240647),c=e.i(531245),m=e.i(283086),x=e.i(195116);e.i(622826);var u=e.i(548151),p=e.i(97859),h=e.i(487486),g=e.i(115504);function f({origin:e,className:s}){return"autorouter_classifier"!==e?null:(0,t.jsx)(h.Badge,{variant:"secondary",title:"Tier classification call made by the auto-router, not a request the caller sent",className:(0,g.cn)("px-2 py-0 text-[10px] font-normal",s),children:"Classify"})}var y=e.i(770914),j=e.i(262218),b=e.i(592968),v=e.i(898586),N=e.i(149192),_=e.i(536591),_=_,w=e.i(755151),k=e.i(166540),S=e.i(916925);let C="24px",T="request",L="response",A="monospace",M="#f0f0f0",{Text:E}=v.Typography;function I({log:e,onClose:s,onPrevious:r,onNext:l,statusLabel:a,statusColor:n,environment:i}){let o=e.custom_llm_provider||"",d=o?(0,S.getProviderLogoAndName)(o):null;return(0,t.jsxs)("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${M}`,backgroundColor:"#fff",position:"sticky",top:0,zIndex:10},children:[(0,t.jsx)(z,{model:e.model,modelGroup:e.model_group,internalCallOrigin:e.metadata?.internal_call_origin,providerLogo:d?.logo,providerName:d?.displayName}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,t.jsx)(D,{requestId:e.request_id}),(0,t.jsx)(O,{onPrevious:r,onNext:l,onClose:s})]}),(0,t.jsx)(R,{log:e,statusLabel:a,statusColor:n,environment:i})]})}function z({model:e,modelGroup:s,internalCallOrigin:r,providerLogo:l,providerName:a}){return(0,t.jsxs)(y.Space,{size:8,style:{marginBottom:8},children:[l&&(0,t.jsx)("img",{src:l,alt:a||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,t.jsxs)(y.Space,{size:8,direction:"horizontal",children:[(0,t.jsx)(E,{strong:!0,style:{fontSize:14},children:e}),a&&(0,t.jsx)(E,{type:"secondary",style:{fontSize:12},children:a}),(0,t.jsx)(u.AutoRouterTag,{modelGroup:s}),(0,t.jsx)(f,{origin:r})]})]})}function D({requestId:e}){return(0,t.jsx)("div",{style:{flex:1,minWidth:0},children:(0,t.jsx)(b.Tooltip,{title:e,children:(0,t.jsx)(E,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:A,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function O({onPrevious:e,onNext:s,onClose:l}){let a={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,t.jsxs)(y.Space,{size:4,split:(0,t.jsx)("div",{style:{width:1,height:20,background:M}}),children:[(0,t.jsxs)(r.Button,{type:"text",size:"small",onClick:e,children:[(0,t.jsx)(_.default,{}),(0,t.jsx)("span",{style:a,children:"K"})]}),(0,t.jsxs)(r.Button,{type:"text",size:"small",onClick:s,children:[(0,t.jsx)(w.DownOutlined,{}),(0,t.jsx)("span",{style:a,children:"J"})]}),(0,t.jsx)(b.Tooltip,{title:"ESC to close",children:(0,t.jsx)(r.Button,{type:"text",icon:(0,t.jsx)(N.CloseOutlined,{}),onClick:l})})]})}function R({log:e,statusLabel:s,statusColor:r,environment:l}){return(0,t.jsxs)(y.Space,{size:12,children:[(0,t.jsx)(j.Tag,{color:r,children:s}),(0,t.jsxs)(j.Tag,{children:["Env: ",l]}),(0,t.jsxs)(y.Space,{size:8,children:[(0,t.jsx)(E,{type:"secondary",style:{fontSize:13},children:(0,k.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,t.jsxs)(E,{type:"secondary",style:{fontSize:13},children:["(",(0,k.default)(e.startTime).fromNow(),")"]})]})]})}var B=e.i(869216),P=e.i(175712),q=e.i(653496),F=e.i(560445),$=e.i(362024),W=e.i(91739),J=e.i(482725),H=e.i(827252),Y=e.i(500330);let G=e=>e>=.8?"text-green-600":"text-yellow-600",U=({entities:e})=>{let[r,l]=(0,s.useState)(!0),[a,n]=(0,s.useState)({});return e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>l(!r),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${r?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",e.length,")"]})]}),r&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let r=a[s]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>{n(e=>({...e,[s]:!e[s]}))},children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${r?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,t.jsxs)("span",{className:`font-mono ${G(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),r&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,t.jsx)("span",{children:e.entity_type})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,t.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,t.jsx)("span",{className:G(e.score),children:e.score.toFixed(2)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,t.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,t.jsxs)("div",{className:"flex overflow-hidden",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,t.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,t.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null},K=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),V=e=>e?K("detected","red"):K("not detected","slate"),Q=({title:e,count:r,defaultOpen:l=!0,right:a,children:n})=>{let[i,o]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof r&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",r,")"]})]})]}),(0,t.jsx)("div",{children:a})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:n})]})},X=({label:e,children:s,mono:r})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:r?"font-mono text-sm break-all":"",children:s})]}),Z=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),ee=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],r="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&K(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&K(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),a=e.usage&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)});return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(X,{label:"Action:",children:K(e.action??"N/A",r)}),e.actionReason&&(0,t.jsx)(X,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(X,{label:"Blocked Response:",children:(0,t.jsx)("span",{className:"italic",children:e.blockedResponse})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(X,{label:"Coverage:",children:l}),(0,t.jsx)(X,{label:"Usage:",children:a})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Z,{}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,t.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text??(0,t.jsx)("em",{children:"(non-text output)"})})},s))})]})]}),e.assessments?.length?(0,t.jsx)("div",{className:"space-y-3",children:e.assessments.map((e,s)=>{let r=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&K("word","slate"),e.contentPolicy&&K("content","slate"),e.topicPolicy&&K("topic","slate"),e.sensitiveInformationPolicy&&K("sensitive-info","slate"),e.contextualGroundingPolicy&&K("contextual-grounding","slate"),e.automatedReasoningPolicy&&K("automated-reasoning","slate")]});return(0,t.jsxs)(Q,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&K(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),r]}),children:[e.wordPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(e.wordPolicy.customWords?.length??0)>0&&(0,t.jsx)(Q,{title:"Custom Words",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[K(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),V(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(Q,{title:"Managed Word Lists",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[K(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&K(e.type,"slate")]}),V(e.detected)]},s))})})]}),e.contentPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,t.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:K(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:V(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.filterStrength??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.confidence??"—"})]},s))})]})})]}):null,e.contextualGroundingPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,t.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:K(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:V(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.score??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.threshold??"—"})]},s))})]})})]}):null,e.sensitiveInformationPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(e.sensitiveInformationPolicy.piiEntities?.length??0)>0&&(0,t.jsx)(Q,{title:"PII Entities",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[K(e.action??"N/A",e.detected?"red":"slate"),e.type&&K(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),V(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(Q,{title:"Custom Regexes",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded-sm gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[K(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"regex"}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[V(e.detected),e.match&&(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s))})})]}),e.topicPolicy?.topics?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>(0,t.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[K(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&K(e.type,"slate"),V(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(Q,{title:"Invocation Metrics",defaultOpen:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(X,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(X,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&K(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&K(`images ${e.invocationMetrics.guardrailCoverage.images.guarded??0}/${e.invocationMetrics.guardrailCoverage.images.total??0}`,"blue")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(X,{label:"Usage:",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)})})})]})}),e.automatedReasoningPolicy?.findings?.length?(0,t.jsx)(Q,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,t.jsx)("pre",{className:"bg-gray-50 rounded-sm p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(Q,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded-sm p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},et=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),es=({title:e,count:r,defaultOpen:l=!0,children:a})=>{let[n,i]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>i(e=>!e),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof r&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",r,")"]})]})]})}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:a})]})},er=({label:e,children:s,mono:r})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:r?"font-mono text-sm break-all":"",children:s})]}),el=({response:e})=>{if(!e||"string"==typeof e)return"string"==typeof e&&e?(0,t.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,t.jsxs)("div",{className:"text-red-800",children:[(0,t.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,t.jsx)("p",{className:"text-sm",children:e})]})}):null;let s=Array.isArray(e)?e:[];if(0===s.length)return(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let r=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),a=s.filter(e=>"category_keyword"===e.type),n=s.filter(e=>"BLOCK"===e.action).length,i=s.filter(e=>"MASK"===e.action).length,o=s.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(er,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(er,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[n>0&&et(`${n} blocked`,"red"),i>0&&et(`${i} masked`,"blue"),0===n&&0===i&&et("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(er,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[r.length>0&&et(`${r.length} patterns`,"slate"),l.length>0&&et(`${l.length} keywords`,"slate"),a.length>0&&et(`${a.length} categories`,"slate")]})})})]})}),r.length>0&&(0,t.jsx)(es,{title:"Patterns Matched",count:r.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(er,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(er,{label:"Action:",children:et(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(es,{title:"Blocked Words Detected",count:l.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(er,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(er,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(er,{label:"Action:",children:et(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),a.length>0&&(0,t.jsx)(es,{title:"Category Keywords Detected",count:a.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(er,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(er,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(er,{label:"Severity:",children:et(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(er,{label:"Action:",children:et(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(es,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded-sm p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var ea=e.i(602869);let en=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M5 8l2 2 4-4",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ei=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),eo=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"animate-spin",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"#D1D5DB",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2a6 6 0 0 1 6 6",stroke:"#6366F1",strokeWidth:"2",strokeLinecap:"round"})]}),ed=({title:e,data:r,loading:l,error:a})=>{let[n,i]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>i(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l?(0,t.jsx)(eo,{}):a?(0,t.jsx)(b.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):r?.compliant?(0,t.jsx)(en,{}):(0,t.jsx)(ei,{}),(0,t.jsx)("span",{className:"font-medium text-sm text-gray-900",children:e})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!l&&!a&&r&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${r.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:r.compliant?"COMPLIANT":"NON-COMPLIANT"}),a&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded-sm text-[11px] font-medium bg-gray-100 text-gray-500 border border-gray-200",children:"UNAVAILABLE"}),(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${n?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[l&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),a&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:a}),r&&(0,t.jsx)("div",{className:"space-y-2",children:r.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(en,{}):(0,t.jsx)(ei,{})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.check_name}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-gray-400",children:e.article})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:e.detail})]})]},s))})]})]})},ec=({accessToken:e,logEntry:r})=>{let[l,a]=(0,s.useState)(null),[n,i]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!r.request_id)return;let t={request_id:r.request_id,user_id:r.user,model:r.model,timestamp:r.startTime,guardrail_information:r.metadata?.guardrail_information};d(!0),u(null),(0,ea.checkEuAiActCompliance)(e,t).then(a).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,ea.checkGdprCompliance)(e,t).then(i).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,r]),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Regulatory Compliance"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(ed,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(ed,{title:"GDPR",data:n,loading:c,error:p})]})]})},em=new Set(["presidio","bedrock","litellm_content_filter"]),ex=(e,t)=>{if(null==e)return!1;if("string"==typeof e)return e===t;if(Array.isArray(e))return e.includes(t);if("object"==typeof e&&"default"in e){let s=e.default;if("string"==typeof s)return s===t;if(Array.isArray(s))return s.some(e=>"string"==typeof e&&e===t)}return!1},eu=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),ep=e=>"success"===(e.guardrail_status??"").toLowerCase(),eh=e=>e.policy_template||e.guardrail_name,eg=()=>(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,t.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"#EEF2FF"}),(0,t.jsx)("path",{d:"M20 10l8 4v6c0 5.25-3.4 10.15-8 11.5C15.4 30.15 12 25.25 12 20v-6l8-4z",stroke:"#6366F1",strokeWidth:"1.5",fill:"none"}),(0,t.jsx)("path",{d:"M16 20l3 3 5-6",stroke:"#6366F1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),ef=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M7 11l3 3 5-6",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ey=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),ej=()=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#3B82F6",strokeWidth:"1.5",fill:"#EFF6FF"}),(0,t.jsx)("path",{d:"M9 7.5l6 3.5-6 3.5V7.5z",fill:"#3B82F6"})]}),eb=()=>(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,t.jsx)("circle",{cx:"11",cy:"11",r:"5",fill:"#9CA3AF"})}),ev=({expanded:e})=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${e?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),eN=()=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e_=({matchDetails:e})=>e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Match Details (",e.length,")"]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-gray-500",children:[(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Type"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Method"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Action"}),(0,t.jsx)("th",{className:"pb-2 font-medium",children:"Detail"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"border-b border-gray-100",children:[(0,t.jsx)("td",{className:"py-2 pr-4",children:e.type}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 rounded-sm text-xs",children:e.detection_method??"-"})}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${"BLOCK"===e.action_taken?"bg-red-100 text-red-800":"bg-blue-50 text-blue-700"}`,children:e.action_taken??"-"})}),(0,t.jsxs)("td",{className:"py-2 font-mono text-xs text-gray-600 break-all",children:[e.category?`[${e.category}] `:"",e.snippet??"-"]})]},s))})]})})]}):null,ew=({response:e})=>{let[r,l]=(0,s.useState)(!1);return(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>l(!r),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(ev,{expanded:r}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),r&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded-sm p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},ek=({entries:e})=>{let r=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===r.length)return[];let e=r[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=r.filter(e=>ex(e.guardrail_mode,"pre_call")),l=r.filter(e=>ex(e.guardrail_mode,"post_call")||ex(e.guardrail_mode,"logging_only")),a=r.filter(e=>ex(e.guardrail_mode,"during_call"));for(let r of s){let s=Math.round((r.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${eh(r)}`,offsetMs:s,status:ep(r)?"PASSED":"FAILED",isSuccess:ep(r)})}let n=s.length>0?Math.max(...s.map(e=>e.end_time)):e,i=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??n+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:i}),a)){let r=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${eh(s)}`,offsetMs:r,status:ep(s)?"PASSED":"FAILED",isSuccess:ep(s)})}for(let s of l){let r=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${eh(s)}`,offsetMs:r,status:ep(s)?"PASSED":"FAILED",isSuccess:ep(s)})}let o=Math.round((Math.max(...r.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[r]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Request Lifecycle"}),(0,t.jsx)("div",{className:"relative",children:l.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-3 relative",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(eb,{}):"llm"===e.type?(0,t.jsx)(ej,{}):e.isSuccess?(0,t.jsx)(ef,{}):(0,t.jsx)(ey,{})}),s{let r,l,[a,n]=(0,s.useState)(!1),i=ep(e),o=eu(e),d=eh(e),c=(r=Math.round(1e3*e.duration),`${r}ms`),m=null==(l=(e=>{if(null==e)return null;if("string"==typeof e)return e;if(Array.isArray(e)){let t=e[0];return"string"==typeof t?t:null}if("object"==typeof e&&"default"in e){let t=e.default;if("string"==typeof t)return t;if(Array.isArray(t)){let e=t[0];return"string"==typeof e?e:null}}return null})(e.guardrail_mode))||""===l?"—":l.replace(/_/g,"-").toUpperCase(),x=(e=>{if(!ep(e))return null;if(null!=e.risk_score)return e.risk_score;let t=eu(e),s=e.patterns_checked??0,r=e.confidence_score??0;if(0===s&&0===r)return 0;let l=7*(s>0?t/s:0)+3*r;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),u=e.guardrail_provider??"presidio",p=e.guardrail_response,h=Array.isArray(p)?p:[],g="bedrock"!==u||null===p||"object"!=typeof p||Array.isArray(p)?void 0:p,f=null!=e.patterns_checked?`${o}/${e.patterns_checked} matched`:o>0?`${o} matched`:null;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>n(!a),children:[(0,t.jsx)("div",{className:"shrink-0",children:i?(0,t.jsx)(ef,{}):(0,t.jsx)(ey,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm truncate",children:d}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded-sm text-[11px] font-semibold uppercase shrink-0",children:m}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase shrink-0 ${i?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:i?"PASSED":"FAILED"}),f&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium shrink-0 ${0===o?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:f}),null!=e.confidence_score&&(0,t.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded-sm text-[11px] font-medium shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=x&&i&&(0,t.jsx)(b.Tooltip,{title:`Risk score: ${x}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded-sm text-[11px] font-semibold shrink-0 ${x<=3?"text-green-600 bg-green-50 border-green-200":x<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",x,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:c}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded-sm text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(ev,{expanded:a})]})]}),a&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[e.classification&&(0,t.jsxs)("div",{className:"mb-3 bg-gray-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Classification"}),e.classification.category&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Category:"}),(0,t.jsx)("span",{children:e.classification.category})]}),e.classification.article_reference&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reference:"}),(0,t.jsx)("span",{className:"font-mono",children:e.classification.article_reference})]}),null!=e.classification.confidence&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Confidence:"}),(0,t.jsxs)("span",{children:[(100*e.classification.confidence).toFixed(0),"%"]})]}),e.classification.reason&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reason:"}),(0,t.jsx)("span",{children:e.classification.reason})]})]}),e.match_details&&e.match_details.length>0&&(0,t.jsx)(e_,{matchDetails:e.match_details}),o>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Masked Entities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.masked_entity_count||{}).map(([e,s])=>(0,t.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded-sm text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===u&&h.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(U,{entities:h})}),"bedrock"===u&&g&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(ee,{response:g})}),"litellm_content_filter"===u&&p&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(el,{response:p})}),u&&!em.has(u)&&p&&(0,t.jsx)(ew,{response:p})]})]})},eC=({data:e,accessToken:r,logEntry:l})=>{let a=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),n=a.filter(ep).length,i=n===a.length,o=(0,s.useMemo)(()=>Math.round(1e3*a.reduce((e,t)=>e+(t.duration??0),0)),[a]);return((0,s.useMemo)(()=>Array.from(new Set(a.map(e=>e.policy_template).filter(Boolean))),[a]),0===a.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-xs w-full max-w-full overflow-hidden mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(eg,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Guardrails & Policy Compliance"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:[a.length," guardrail",1!==a.length?"s":""," evaluated"]}),(0,t.jsx)("span",{className:"text-gray-300",children:"|"}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold ${i?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[i?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 6l2.5 2.5L9 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,n," Passed"]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsx)("div",{className:"text-right",children:(0,t.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["Total: ",o,"ms overhead"]})}),(0,t.jsxs)("button",{onClick:()=>{let e=new Blob([JSON.stringify(a,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`guardrail-compliance-log-${new Date().toISOString().slice(0,10)}.json`,s.click(),URL.revokeObjectURL(t)},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(eN,{}),"Export Compliance Log"]})]})]}),r&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(ec,{accessToken:r,logEntry:l})}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-6 py-5",children:(0,t.jsx)(ek,{entries:a})}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Evaluation Details"}),(0,t.jsx)("div",{className:"space-y-3",children:a.map((e,s)=>(0,t.jsx)(eS,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})};var eT=e.i(291542),eL=e.i(245704),eA=e.i(518617),eM=e.i(19732);let{Text:eE}=v.Typography;function eI({data:e}){let s=Array.isArray(e)?e:[e];return s.length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[(0,t.jsx)(eM.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(eE,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(ez,{entry:e},e.eval_id||s))]}):null}function ez({entry:e}){let s=e.passed,r=s?"#52c41a":"#ff4d4f",l=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),a=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(eE,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(eE,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(eE,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(b.Tooltip,{title:"Score × Weight — how much each criterion contributes to the final score",children:(0,t.jsx)("span",{style:{borderBottom:"1px dashed #aaa",cursor:"help"},children:"Weighted"})}),key:"weighted",width:75,render:(e,s)=>{if(null==s.weight)return null;let r=s.score*s.weight/100;return(0,t.jsx)(eE,{type:"secondary",style:{fontSize:12},children:r%1==0?r:r.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(b.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(P.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${r}`},title:(0,t.jsxs)(y.Space,{children:[s?(0,t.jsx)(eL.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(eA.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(eE,{strong:!0,children:e.eval_name}),(0,t.jsx)(j.Tag,{color:s?"success":"error",children:s?"PASSED":"FAILED"}),(0,t.jsx)(b.Tooltip,{title:"Weighted average of all criterion scores. Each criterion has a weight (%) set when the eval was created — higher-weight criteria count more toward the final score.",children:(0,t.jsxs)(eE,{type:"secondary",style:{fontSize:12,cursor:"help",borderBottom:"1px dashed #aaa"},children:[e.overall_score?.toFixed(0)," / 100",null!=e.threshold&&` (threshold: ${e.threshold})`]})})]}),extra:(0,t.jsxs)(y.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(eE,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(eE,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(eE,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),l.length>0?(0,t.jsx)(eT.Table,{dataSource:l,columns:a,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!l.some(e=>null!=e.weight))return null;let e=l.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(eT.Table.Summary.Row,{children:[(0,t.jsx)(eT.Table.Summary.Cell,{index:0,children:(0,t.jsx)(eE,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(eT.Table.Summary.Cell,{index:1}),(0,t.jsx)(eT.Table.Summary.Cell,{index:2}),(0,t.jsx)(eT.Table.Summary.Cell,{index:3,children:(0,t.jsx)(eE,{strong:!0,style:{fontSize:12,color:r},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(eT.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(eE,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}let eD=e=>null==e?"-":`$${(0,Y.formatNumberWithCommas)(e,8)}`,eO=e=>null==e?"-":`${(100*e).toFixed(2)}%`,eR=({costBreakdown:e,totalSpend:s,promptTokens:r,completionTokens:l,cacheHit:a,rawInputTokens:n,cacheReadTokens:i,cacheCreationTokens:o})=>{let d=a?.toLowerCase()==="true",c=void 0!==r||void 0!==l,m=e?.input_cost!==void 0||e?.output_cost!==void 0,x=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(m||c||x||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let u=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),p=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),h=d?0:e?.input_cost,g=d?0:e?.output_cost,f=d?0:e?.original_cost,y=d?0:e?.total_cost??s;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)($.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[eD(s),d&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(()=>{if(e?.cache_read_cost!==void 0||e?.cache_creation_cost!==void 0){let s=d?0:(h??0)-(e?.cache_read_cost??0)-(e?.cache_creation_cost??0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eD(s),null!=n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," tokens)"]})]})]}),(e?.cache_read_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Prompt Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eD(d?0:e?.cache_read_cost),(i??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(i??0).toLocaleString()," tokens)"]})]})]}),(e?.cache_creation_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Prompt Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eD(d?0:e?.cache_creation_cost),(o??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(o??0).toLocaleString()," tokens)"]})]})]})]})}return(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eD(h),void 0!==r&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",r.toLocaleString()," prompt tokens)"]})]})]})})(),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eD(g),void 0!==l&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",l.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:eD(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:eD(s)})]},e))]}),!d&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:eD(f)})]})}),(u||p)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[u&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",eO(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",eD(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",eD(e.discount_amount)]})]})]}),p&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",eO(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",eD((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",eD(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[eD(y),d&&" (Cached)"]})]})})]})}]})})},eB=({show:e})=>e?(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,t.jsx)("div",{className:"text-blue-500 mr-3 shrink-0 mt-0.5",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,t.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded-sm",children:"proxy_config.yaml"})," file, or toggle the setting in ",(0,t.jsx)("strong",{children:"Admin Settings → Logging Settings"}),"."]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded-sm border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings:
+ store_model_in_db: true
+ store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null;function eP({data:e}){let[r,l]=(0,s.useState)({});if(!e||0===e.length)return null;let a=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)($.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var n,i;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:r}=(0,S.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${r} logo`,className:"h-5 w-5 mr-2"}),r]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:a(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:a(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(n=e.start_time,i=e.end_time,`${((i-n)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,a)=>{let n=r[`${s}-${a}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${a}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",a+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded-sm",children:e.text})]},s))})]},a)})})]},s)})})}]})})}let{Text:eq}=v.Typography;function eF({value:e,maxWidth:s=180}){return e?(0,t.jsx)(b.Tooltip,{title:e,children:(0,t.jsx)(eq,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:A,fontSize:12},ellipsis:!0,children:e})}):(0,t.jsx)(eq,{type:"secondary",children:"-"})}let{Text:e$}=v.Typography;function eW({prompt:e=0,completion:s=0,total:r=0}){return(0,t.jsxs)(e$,{children:[r.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let eJ=e=>!!e&&e instanceof Date,eH=e=>"object"==typeof e&&null!==e,eY=e=>!!e&&e instanceof Object&&"function"==typeof e;function eG(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function eU(e){let{field:t,value:r,data:l,lastElement:a,openBracket:n,closeBracket:i,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,r,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,r,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:r,closeBracket:l,lastElement:a,style:n}=e;return(0,s.createElement)("div",{className:n.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:n.label},eG(t,n.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n.punctuation},r),(0,s.createElement)("span",{className:n.punctuation},l),!a&&(0,s.createElement)("span",{className:n.punctuation},","))}({field:t,openBracket:n,closeBracket:i,lastElement:a,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,N=l.length-1,_=e=>{h!==e&&(!u||u({level:o,value:r,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),_("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),r=-1;for(let e=0;e{var e;_(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:k,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:k,onKeyDown:w},eG(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},eG(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},n),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(eX,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===N,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:k,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},i),!a&&(0,s.createElement)("span",{className:d.punctuation},","))}function eK(e){let{field:t,value:s,style:r,lastElement:l,shouldExpandNode:a,clickToExpandNode:n,level:i,outerRef:o,beforeExpandChange:d}=e;return eU({field:t,value:s,lastElement:l||!1,level:i,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:a,clickToExpandNode:n,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function eV(e){let{field:t,value:s,style:r,lastElement:l,level:a,shouldExpandNode:n,clickToExpandNode:i,outerRef:o,beforeExpandChange:d}=e;return eU({field:t,value:s,lastElement:l||!1,level:a,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:n,clickToExpandNode:i,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function eQ(e){let t,{field:r,value:l,style:a,lastElement:n}=e,i=a.otherValue;if(null===l)t="null",i=a.nullValue;else if(void 0===l)t="undefined",i=a.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!a.noQuotesForStringValues,t=a.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,i=a.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",i=a.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),i=a.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,i=a.numberValue):t=eJ(l)?l.toISOString():eY(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(r||""===r)&&(0,s.createElement)("span",{className:a.label},eG(r,a.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i},t),!n&&(0,s.createElement)("span",{className:a.punctuation},","))}function eX(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(eV,Object.assign({},e)):!eH(t)||eJ(t)||eY(t)?(0,s.createElement)(eQ,Object.assign({},e)):(0,s.createElement)(eK,Object.assign({},e))}let eZ={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},e0=()=>!0,e1=e=>{let{data:t,style:r=eZ,shouldExpandNode:l=e0,clickToExpandNode:a=!1,beforeExpandChange:n,compactTopLevel:i,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:r.container,ref:d,role:"tree"}),i&&eH(t)?Object.entries(t).map(e=>{let[t,i]=e;return(0,s.createElement)(eX,{key:t,field:t,value:i,style:{...eZ,...r},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:a,beforeExpandChange:n,outerRef:d})}):(0,s.createElement)(eX,{value:t,style:{...eZ,...r},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:a,outerRef:d,beforeExpandChange:n}))},{Text:e2}=v.Typography;function e4({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:400,overflow:"auto",background:"#fafafa",padding:12,borderRadius:4},children:(0,t.jsx)("div",{className:"**:[[role='tree']]:bg-white **:[[role='tree']]:text-slate-900",children:(0,t.jsx)(e1,{data:e,style:eZ,clickToExpandNode:!0})})}):(0,t.jsx)(e2,{type:"secondary",children:"No data"})}var e5=e.i(199931);let e6={complexity:"Auto-Router v2",adaptive:"Adaptive router",quality:"Quality router"};function e3({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex gap-3 py-1 text-sm",children:[(0,t.jsx)("span",{className:"w-28 shrink-0 text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"min-w-0 break-words",children:s})]})}function e8({decision:e,className:s}){if(!e||!e.cause)return null;let{router_model_name:r,router_type:l,routed_model:a,tier:n,request_type:i,score:o,signals:d,escalated:c,escalation_keyword:m,tier_boundaries:x}=e,u=void 0!==o&&"reasoning_override"!==e.cause?function(e,t){if(!t)return null;let{simple_medium:s,medium_complex:r,complex_reasoning:l}=t;return void 0===s||void 0===r||void 0===l?null:e0&&(0,t.jsx)(e3,{label:"Signals",children:(0,t.jsx)("span",{className:"flex flex-wrap gap-1",children:d.map(e=>(0,t.jsx)(h.Badge,{variant:"outline",className:"font-normal",children:e},e))})})]})]})}let e9=e=>e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime);function e7(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function te(e){return Array.isArray(e)?e:e?[e]:[]}function tt(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ts=e.i(366308);let{Text:tr}=v.Typography;function tl({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),r=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(tr,{code:!0,children:[e,s.required&&(0,t.jsx)(tr,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(tr,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(tr,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(tr,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(tr,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(eT.Table,{dataSource:s,columns:r,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(tr,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function ta({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:tn}=v.Typography;function ti({tool:e}){let[r,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(tn,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(W.Radio.Group,{size:"small",value:r,onChange:e=>l(e.target.value),children:[(0,t.jsx)(W.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(W.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===r?(0,t.jsx)(tl,{tool:e}):(0,t.jsx)(ta,{tool:e})]})}let{Text:to}=v.Typography;function td({tool:e}){let[r,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!r),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:r?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ts.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(to,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),r?(0,t.jsx)(w.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(d.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),r&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ti,{tool:e})})]})}let{Text:tc}=v.Typography;function tm({log:e}){let s=function(e){let t,s=!(t=tt(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let r=function(e){let t=tt(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(r.map(e=>e.function?.name).filter(Boolean)),a=new Map;return r.forEach(e=>{let t=e.function?.name;t&&a.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:a.get(s)}})}(e);if(0===s.length)return null;let r=s.length,l=s.filter(e=>e.called).length,a=s.slice(0,2).map(e=>e.name).join(", "),n=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)($.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(tc,{type:"secondary",style:{fontSize:14},children:[r," provided, ",l," called"]}),(0,t.jsxs)(tc,{type:"secondary",style:{fontSize:14},children:["• ",a,n&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(td,{tool:e},e.name))})}]})})}let tx=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var tu=e.i(888259);e.i(247167);var tp=e.i(931067);let th={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var tg=e.i(9583),tf=s.forwardRef(function(e,t){return s.createElement(tg.default,(0,tp.default)({},e,{ref:t,icon:th}))}),_=_;let{Text:ty}=v.Typography;function tj({type:e,tokens:s,cost:l,onCopy:a,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(w.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(_.default,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(tf,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ty,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ty,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ty,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ty,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(b.Tooltip,{title:"Copy",children:(0,t.jsx)(r.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),a()}})})]})}let{Text:tb}=v.Typography;function tv({label:e,content:r,defaultExpanded:l=!1}){let[a,n]=(0,s.useState)(l),[i,o]=(0,s.useState)(!1),c=r?.length||0;return r&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>n(!a),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:i?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(w.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(d.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(tb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(tb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r})})]}):null}let{Text:tN}=v.Typography;function t_({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(tN,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(tN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(tN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:tw}=v.Typography;function tk({label:e,content:s,toolCalls:r,isCompact:l=!1}){let a=s&&"null"!==s&&s.length>0?s:null,n=r&&r.length>0;return a||n?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(tw,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),a&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!n},children:a}),n&&(0,t.jsx)("div",{children:r.map((e,s)=>(0,t.jsx)(t_,{tool:e,compact:l},e.id||s))})]}):null}let{Text:tS}=v.Typography;function tC({messages:e}){let[r,l]=(0,s.useState)(!1),[a,n]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!r),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:a?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(w.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(d.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(tS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(tk,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function tT({messages:e,promptTokens:r,inputCost:l}){let[a,n]=(0,s.useState)(!1);if(0===e.length)return null;let i=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(tj,{type:"input",tokens:r,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),tu.default.success("Input copied")},isCollapsed:a,onToggleCollapse:()=>n(!a)}),(0,t.jsx)("div",{style:{maxHeight:a?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!a},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[i&&(0,t.jsx)(tv,{label:"SYSTEM",content:i.content,defaultExpanded:!!(i.content&&i.content.length<200)}),c.length>0&&(0,t.jsx)(tC,{messages:c}),d&&(0,t.jsx)(tk,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:tL}=v.Typography;function tA({message:e,completionTokens:r,outputCost:l}){let[a,n]=(0,s.useState)(!1),i=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),tu.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(tj,{type:"output",tokens:r,cost:l,onCopy:i,isCollapsed:a,onToggleCollapse:()=>n(!a)}),(0,t.jsx)("div",{style:{maxHeight:a?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!a},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(tk,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(tj,{type:"output",tokens:r,cost:l,onCopy:i,isCollapsed:a,onToggleCollapse:()=>n(!a)}),(0,t.jsx)("div",{style:{maxHeight:a?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!a},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(tL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var tM=e.i(782273),tE=e.i(313603),tI=e.i(793916),_=_;let{Text:tz}=v.Typography;function tD({response:e,metrics:s}){let r=e?.results||[],l=e?.usage,a=r.find(e=>"session.created"===e.type||"session.updated"===e.type),n=r.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[a?.session&&(0,t.jsx)(tO,{session:a.session,turnCount:n.length}),n.length>0&&(0,t.jsx)(tR,{responses:n.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!a&&0===n.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function tO({session:e,turnCount:r}){let[l,a]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>a(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(w.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(_.default,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(tE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(tz,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(tz,{type:"secondary",style:{fontSize:12},children:e.model}),r>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[r," ",1===r?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(tM.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(tI.AudioOutlined,{}):(0,t.jsx)(tf,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(tF,{label:"Model",value:e.model}),(0,t.jsx)(tF,{label:"Voice",value:e.voice}),(0,t.jsx)(tF,{label:"Temperature",value:e.temperature}),(0,t.jsx)(tF,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(tF,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(tF,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(tF,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(tF,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(tz,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function tR({responses:e,totalUsage:r,metrics:l}){let[a,n]=(0,s.useState)(!1),i=r?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(tj,{type:"output",tokens:l?.completion_tokens??i,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:a,onToggleCollapse:()=>n(!a),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:a?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!a},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(tB,{response:e,index:s},e.id||s))})})]})}function tB({response:e,index:s}){let r=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(tz,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(b.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(tz,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),r.map((e,s)=>(0,t.jsx)(tP,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(tq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(tq,{label:"Output",details:l.output_token_details})]})}function tP({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(tz,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let r=e.transcript||e.text;return r?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(tI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(tf,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r})]},s):null})]}):null}function tq({label:e,details:s}){let r=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===r.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(tz,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:r.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function tF({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(tz,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function t$({request:e,response:s,metrics:r}){let l,a,n;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(tD,{response:s,metrics:r});let{requestMessages:i,responseMessage:o}=(l=[],(Array.isArray(e)?e:Array.isArray(e?.messages)?e.messages:[]).forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),a=null,(n=s?.choices?.[0]?.message)&&(a={role:n.role||"assistant",content:n.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:tx(e.function?.arguments)}))})(n.tool_calls)}),{requestMessages:l,responseMessage:a});return(0,t.jsxs)("div",{children:[(0,t.jsx)(tT,{messages:i,promptTokens:r?.prompt_tokens,inputCost:r?.input_cost}),(0,t.jsx)(tA,{message:o,completionTokens:r?.completion_tokens,outputCost:r?.output_cost})]})}let{Text:tW}=v.Typography;function tJ({logEntry:e,isLoadingDetails:s=!1,accessToken:r}){var l,a;let n=e.metadata||{},i="failure"===n.status,o=i?n.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(a=e.response)&&Object.keys(e7(a)).length>0,m=!d&&!c&&!i&&!s,x=n?.guardrail_information,u=te(x),p=u.length>0,h=u.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),g=0===u.length?"-":1===u.length?u[0]?.guardrail_name??"-":`${u.length} guardrails`,f=n?.eval_information,y=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${C} ${C} 0`},children:[i&&o&&(0,t.jsx)(F.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(tH,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(tY,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(P.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(B.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(B.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(B.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(B.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(B.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(eF,{value:e.model_id})}),(0,t.jsx)(B.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(eF,{value:e.api_base,maxWidth:200})}),e.requester_ip_address&&(0,t.jsx)(B.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(B.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(tG,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(e8,{decision:n?.routing_decision}),(0,t.jsx)(tV,{logEntry:e,metadata:n}),(0,t.jsx)(eR,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:n?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:n?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:n?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(tm,{log:e}),m&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(eB,{show:m})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(J.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(tQ,{hasResponse:c,hasError:i,getRawRequest:()=>e7(e.proxy_server_request||e.messages),getFormattedResponse:()=>i&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:e7(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(eC,{data:x,accessToken:r??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=f&&(0,t.jsx)(eI,{data:f}),y&&(0,t.jsx)(eP,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(tZ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:C}})]})}function tH({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(tW,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(tW,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function tY({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(tW,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(y.Space,{size:8,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function tG({label:e,maskedCount:s}){return(0,t.jsxs)(y.Space,{size:8,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}let tU="https://docs.litellm.ai/docs/completion/prompt_caching";function tK({label:e,tooltip:s,docsUrl:r}){return(0,t.jsxs)(y.Space,{size:4,children:[e,(0,t.jsx)(b.Tooltip,{title:(0,t.jsxs)(t.Fragment,{children:[s," ",(0,t.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",style:{color:"#91caff",textDecoration:"underline"},children:"Docs"})]}),children:(0,t.jsx)(H.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]})}function tV({logEntry:e,metadata:s}){let r=e.completionStartTime,l=r&&r!==e.endTime?new Date(r).getTime()-new Date(e.startTime).getTime():null,a=String(e.cache_hit??"").toLowerCase(),n="true"===a,i=Number(s?.additional_usage_values?.cache_read_input_tokens)||0,o=Number(s?.additional_usage_values?.cache_creation_input_tokens)||0,d=function(e){let t=e?.additional_usage_values?.prompt_tokens_details?.text_tokens??e?.usage_object?.prompt_tokens_details?.text_tokens;if(null==t)return;let s=Number(t);return Number.isFinite(s)?s:void 0}(s),c="anthropic_messages"===e.call_type&&void 0!==d;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(P.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(B.Descriptions,{column:2,size:"small",children:[c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Descriptions.Item,{label:"Input Tokens",children:(0,Y.formatNumberWithCommas)(d)}),(0,t.jsx)(B.Descriptions.Item,{label:"Output Tokens",children:(0,Y.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(B.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(eW,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(B.Descriptions.Item,{label:"Cost",children:["$",(0,Y.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(B.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(B.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),(n||"false"===a)&&(0,t.jsx)(B.Descriptions.Item,{label:(0,t.jsx)(tK,{label:"Response Cache",tooltip:"Whether this request was served from LiteLLM's response cache (e.g. Redis / in-memory), skipping the LLM provider call entirely. This is separate from provider prompt caching; a Miss here does not mean prompt caching failed.",docsUrl:"https://docs.litellm.ai/docs/proxy/caching"}),children:(0,t.jsx)(j.Tag,{color:n?"green":"default",children:n?"Hit":"Miss"})}),i>0&&(0,t.jsx)(B.Descriptions.Item,{label:(0,t.jsx)(tK,{label:"Prompt Cache Read Tokens",tooltip:"Input tokens read from the LLM provider's prompt cache (e.g. Anthropic / OpenAI), billed at a discounted rate. Reported by the provider.",docsUrl:tU}),children:(0,Y.formatNumberWithCommas)(i)}),o>0&&(0,t.jsx)(B.Descriptions.Item,{label:(0,t.jsx)(tK,{label:"Prompt Cache Creation Tokens",tooltip:"Input tokens written to the LLM provider's prompt cache for reuse by later requests.",docsUrl:tU}),children:(0,Y.formatNumberWithCommas)(o)}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(B.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(B.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(B.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(B.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function tQ({hasResponse:e,hasError:r,getRawRequest:l,getFormattedResponse:a,logEntry:n}){let[i,o]=(0,s.useState)(T),[d,c]=(0,s.useState)("pretty"),m=n.spend??0,x=n.prompt_tokens||0,u=n.completion_tokens||0,p=x+u,h=n.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)($.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(W.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(W.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(W.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(t$,{request:l(),response:a(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(q.Tabs,{activeKey:i,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(tW,{copyable:{text:JSON.stringify(i===T?l():a(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:i===L&&!e&&!r}),items:[{key:T,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:16,paddingBottom:16},children:(0,t.jsx)(e4,{data:l(),mode:"formatted"})})},{key:L,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:16,paddingBottom:16},children:e||r?(0,t.jsx)(e4,{data:a(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function tX({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," ","evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function tZ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)($.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(tW,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:300,overflowY:"auto",fontSize:12,fontFamily:A,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var t0=e.i(266027),t1=e.i(135214);let t2="text-slate-500 shrink-0";function t4({callType:e,isAutoRouted:s}){return p.MCP_CALL_TYPES.includes(e)?(0,t.jsx)(x.Wrench,{size:12,className:t2}):p.AGENT_CALL_TYPES.includes(e)?(0,t.jsx)(c.Bot,{size:12,className:t2}):s?(0,t.jsx)(u.AutoRouterIcon,{size:12,className:t2}):(0,t.jsx)(m.Sparkles,{size:12,className:t2})}function t5({row:e,isSelected:s,onClick:r}){let l=(0,u.useIsAutoRoutedModelGroup)(e.model_group),a=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:r,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(t4,{callType:e.call_type,isAutoRouted:l}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:function(e,t){let s=(t||"").trim();if(p.MCP_CALL_TYPES.includes(e))return s.replace(/^mcp:\s*/i,"").split("/").pop()||s||"mcp_tool";let r=(s.split("/").pop()||s).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),l=r.match(/claude-[a-z0-9-]+/i);return l?l[0]:r||"llm_call"}(e.call_type,e.model)}),(0,t.jsx)(f,{origin:e.metadata?.internal_call_origin,className:"ml-auto"})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[a,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,Y.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}e.s(["LogDetailsDrawer",0,function({open:e,onClose:c,logEntry:m,sessionId:x,accessToken:u,allLogs:h=[],onSelectLog:g,startTime:f}){let y=!!x,[j,b]=(0,s.useState)(null),[v,N]=(0,s.useState)("duration"),[_,w]=(0,s.useState)(!1),[k,S]=(0,s.useState)(!1),{data:C}=(0,t0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return{logs:[],total:0};let e=await (0,ea.sessionSpendLogsCall)(u,x,1,100),t=e.data||e||[],s=Math.min(e.total_pages??1,50);if(s>1){let e=[];for(let t=2;t<=s;t+=5){let r=Math.min(t+5-1,s),l=await Promise.all(Array.from({length:r-t+1},(e,s)=>(0,ea.sessionSpendLogsCall)(u,x,t+s,100)));e.push(...l)}for(let s of e)t=t.concat(s.data||[])}let r=e.total??t.length;return{logs:t.map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})),total:r}},enabled:!!(e&&y&&x&&u)}),T=(0,s.useMemo)(()=>{var e;return e=C?.logs??[],"start_time"===v?[...e].sort((e,t)=>new Date(e.startTime).getTime()-new Date(t.startTime).getTime()):[...e].sort((e,t)=>e9(t)-e9(e))},[C,v]),L=C?.total??T.length,A=L>T.length,M=(0,s.useMemo)(()=>T.reduce((e,t)=>!e||new Date(t.startTime).getTime()>new Date(e.startTime).getTime()?t:e,null),[T]),E=(0,s.useMemo)(()=>{if(!y)return m;if(!T.length)return null;let e=M??T[0];return j?T.find(e=>e.request_id===j)||e:m?.request_id&&T.find(e=>e.request_id===m.request_id)||e},[y,m,j,T,M]);(0,s.useEffect)(()=>{y&&T.length&&(j&&T.some(e=>e.request_id===j)||b(m?.request_id&&T.some(e=>e.request_id===m.request_id)?m.request_id:(M??T[0]).request_id))},[y,m,j,T,M]),(0,s.useEffect)(()=>{e?w(!1):(y&&b(null),N("duration"),S(!1))},[e,y]);let{selectNextLog:z,selectPreviousLog:D}=function({isOpen:e,currentLog:t,allLogs:r,onClose:l,onSelectLog:a}){(0,s.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case"Escape":l();break;case"j":case"J":n();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,r]);let n=()=>{if(!t||!r.length||!a)return;let e=r.findIndex(e=>e.request_id===t.request_id);e{if(!t||!r.length||!a)return;let e=r.findIndex(e=>e.request_id===t.request_id);e>0&&a(r[e-1])};return{selectNextLog:n,selectPreviousLog:i}}({isOpen:e,currentLog:E,allLogs:y?T:h,onClose:c,onSelectLog:e=>{y&&b(e.request_id),g?.(e)}}),O=((e,t,s)=>{let{accessToken:r}=(0,t1.default)();return(0,t0.useQuery)({queryKey:["logDetails",e,t,r],queryFn:async()=>r&&e&&t?await (0,ea.uiSpendLogDetailsCall)(r,e,t):null,enabled:s&&!!r&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(E?.request_id,f,e&&!!E?.request_id),R=O.data,B=O.isLoading,P=(0,s.useMemo)(()=>E?{...E,messages:R?.messages||E.messages,response:R?.response||E.response,proxy_server_request:R?.proxy_server_request||E.proxy_server_request}:null,[E,R]),q=E?.metadata||{},F="failure"===q.status?"Failure":"Success",$="failure"===q.status?"error":"success",W=q?.user_api_key_team_alias||"default",J=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,G=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,U=H&&G?((G.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!p.MCP_CALL_TYPES.includes(e.call_type)&&!p.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>p.AGENT_CALL_TYPES.includes(e.call_type)).length,Q=T.filter(e=>p.MCP_CALL_TYPES.includes(e.call_type)).length,X=y?T:E?[E]:[],Z=y?x||"":E?.request_id||"",ee=Z.length>14?`${Z.slice(0,11)}...`:Z,et=async()=>{if(Z)try{await navigator.clipboard.writeText(Z),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return E&&P?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:c,open:e,width:"60%",closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[_?(0,t.jsx)(r.Button,{type:"text",size:"small",icon:(0,t.jsx)(d.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 bg-white! border! border-slate-200! rounded-md!","aria-label":"Expand trace sidebar"}):(0,t.jsx)(r.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 bg-white! border! border-slate-200! rounded-md!","aria-label":"Collapse trace sidebar"}),!_&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:y?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:ee}),(0,t.jsx)("button",{type:"button",onClick:et,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:k?(0,t.jsx)(n.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[X.length," req",[y?K:X.filter(e=>!p.MCP_CALL_TYPES.includes(e.call_type)&&!p.AGENT_CALL_TYPES.includes(e.call_type)).length,y?V:X.filter(e=>p.AGENT_CALL_TYPES.includes(e.call_type)).length,y?Q:X.filter(e=>p.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let r=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,r]},r):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),y?(0,Y.getSpendString)(J):(0,Y.getSpendString)(E.spend||0),y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),U,"s"]})]}),y&&A&&(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-amber-600 font-mono",children:["Showing most recent ",X.length," of ",L]}),y&&(0,t.jsx)(a.Segmented,{block:!0,size:"small",className:"mt-1.5 [&_.ant-segmented-item-label]:text-[11px]",options:[{label:"Duration",value:"duration"},{label:"Start time",value:"start_time"}],value:v,onChange:e=>N(e)})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[te(q?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(tX,{guardrailEntries:te(q?.guardrail_information)})}),y?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),X.map((e,s)=>{let r=s===X.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),r&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(t5,{row:e,isSelected:e.request_id===E.request_id,onClick:()=>{b(e.request_id),g?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:X.map(e=>(0,t.jsx)(t5,{row:e,isSelected:e.request_id===E.request_id,onClick:()=>g?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(I,{log:E,onClose:c,onPrevious:D,onNext:z,statusLabel:F,statusColor:$,environment:W}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(tJ,{logEntry:P,isLoadingDetails:B,accessToken:u??null})})]})]})}):null}],502626),e.s([],3565)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0taea1jhojoz5.js b/litellm/proxy/_experimental/out/_next/static/chunks/0taea1jhojoz5.js
deleted file mode 100644
index 2cf1549e384..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/0taea1jhojoz5.js
+++ /dev/null
@@ -1,11 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(529681),o=e.i(242064),r=e.i(517455),l=e.i(185793),a=e.i(721369),s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};let d=e=>{var{prefixCls:i,className:r,hoverable:l=!0}=e,a=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(o.ConfigContext),c=d("card",i),u=(0,n.default)(`${c}-grid`,r,{[`${c}-grid-hoverable`]:l});return t.createElement("div",Object.assign({},a,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),b=e.i(246422),g=e.i(838378);let p=(0,b.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:o,boxShadowTertiary:r,bodyPadding:l,extraColor:a}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:i,headerPadding:o,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,c.unit)(o)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[`
- > ${n}-typography,
- > ${n}-typography-edit-content
- `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:a,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:l,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
- ${(0,c.unit)(o)} 0 0 0 ${n},
- 0 ${(0,c.unit)(o)} 0 0 ${n},
- ${(0,c.unit)(o)} ${(0,c.unit)(o)} 0 0 ${n},
- ${(0,c.unit)(o)} 0 0 0 ${n} inset,
- 0 ${(0,c.unit)(o)} 0 0 ${n} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:o,colorBorderSecondary:r,actionsBg:l}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:l,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:i,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:o,lineHeight:(0,c.unit)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${o}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:i,bodyPadding:o}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(i)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(o)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:i,headerHeightSM:o,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${(0,c.unit)(i)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var h=e.i(792812),f=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};let v=e=>{let{actionClasses:n,actions:i=[],actionStyle:o}=e;return t.createElement("ul",{className:n,style:o},i.map((e,n)=>{let o=`action-${n}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:o},t.createElement("span",null,e))}))},m=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:b,rootClassName:g,style:m,extra:y,headStyle:$={},bodyStyle:S={},title:x,loading:E,bordered:C,variant:O,size:j,type:w,cover:k,actions:T,tabList:I,children:L,activeTabKey:R,defaultActiveTabKey:P,tabBarExtraContent:N,hoverable:z,tabProps:M={},classNames:B,styles:D}=e,W=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:_,direction:H,card:G}=t.useContext(o.ConfigContext),[A]=(0,h.default)("card",O,C),q=e=>{var t;return(0,n.default)(null==(t=null==G?void 0:G.classNames)?void 0:t[e],null==B?void 0:B[e])},F=e=>{var t;return Object.assign(Object.assign({},null==(t=null==G?void 0:G.styles)?void 0:t[e]),null==D?void 0:D[e])},U=t.useMemo(()=>{let e=!1;return t.Children.forEach(L,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[L]),X=_("card",u),[K,V,J]=p(X),Q=t.createElement(l.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),Y=void 0!==R,Z=Object.assign(Object.assign({},M),{[Y?"activeKey":"defaultActiveKey"]:Y?R:P,tabBarExtraContent:N}),ee=(0,r.default)(j),et=ee&&"default"!==ee?ee:"large",en=I?t.createElement(a.default,Object.assign({size:et},Z,{className:`${X}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:I.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(x||y||en){let e=(0,n.default)(`${X}-head`,q("header")),i=(0,n.default)(`${X}-head-title`,q("title")),o=(0,n.default)(`${X}-extra`,q("extra")),r=Object.assign(Object.assign({},$),F("header"));c=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${X}-head-wrapper`},x&&t.createElement("div",{className:i,style:F("title")},x),y&&t.createElement("div",{className:o,style:F("extra")},y)),en)}let ei=(0,n.default)(`${X}-cover`,q("cover")),eo=k?t.createElement("div",{className:ei,style:F("cover")},k):null,er=(0,n.default)(`${X}-body`,q("body")),el=Object.assign(Object.assign({},S),F("body")),ea=t.createElement("div",{className:er,style:el},E?Q:L),es=(0,n.default)(`${X}-actions`,q("actions")),ed=(null==T?void 0:T.length)?t.createElement(v,{actionClasses:es,actionStyle:F("actions"),actions:T}):null,ec=(0,i.default)(W,["onTabChange"]),eu=(0,n.default)(X,null==G?void 0:G.className,{[`${X}-loading`]:E,[`${X}-bordered`]:"borderless"!==A,[`${X}-hoverable`]:z,[`${X}-contain-grid`]:U,[`${X}-contain-tabs`]:null==I?void 0:I.length,[`${X}-${ee}`]:ee,[`${X}-type-${w}`]:!!w,[`${X}-rtl`]:"rtl"===H},b,g,V,J),eb=Object.assign(Object.assign({},null==G?void 0:G.style),m);return K(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:eb}),c,eo,ea,ed))});var y=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};m.Grid=d,m.Meta=e=>{let{prefixCls:i,className:r,avatar:l,title:a,description:s}=e,d=y(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(o.ConfigContext),u=c("card",i),b=(0,n.default)(`${u}-meta`,r),g=l?t.createElement("div",{className:`${u}-meta-avatar`},l):null,p=a?t.createElement("div",{className:`${u}-meta-title`},a):null,h=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=p||h?t.createElement("div",{className:`${u}-meta-detail`},p,h):null;return t.createElement("div",Object.assign({},d,{className:b}),g,f)},e.s(["Card",0,m],175712)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(908206),o=e.i(242064),r=e.i(517455),l=e.i(150073);let a={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n},u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};let b=e=>{let{itemPrefixCls:i,component:o,span:r,className:l,style:a,labelStyle:d,contentStyle:c,bordered:u,label:b,content:g,colon:p,type:h,styles:f}=e,{classNames:v}=t.useContext(s),m=Object.assign(Object.assign({},d),null==f?void 0:f.label),y=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(u)return t.createElement(o,{colSpan:r,style:a,className:(0,n.default)(l,{[`${i}-item-${h}`]:"label"===h||"content"===h,[null==v?void 0:v.label]:(null==v?void 0:v.label)&&"label"===h,[null==v?void 0:v.content]:(null==v?void 0:v.content)&&"content"===h})},null!=b&&t.createElement("span",{style:m},b),null!=g&&t.createElement("span",{style:y},g));return t.createElement(o,{colSpan:r,style:a,className:(0,n.default)(`${i}-item`,l)},t.createElement("div",{className:`${i}-item-container`},null!=b&&t.createElement("span",{style:m,className:(0,n.default)(`${i}-item-label`,null==v?void 0:v.label,{[`${i}-item-no-colon`]:!p})},b),null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${i}-item-content`,null==v?void 0:v.content)},g)))};function g(e,{colon:n,prefixCls:i,bordered:o},{component:r,type:l,showLabel:a,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:g,prefixCls:p=i,className:h,style:f,labelStyle:v,contentStyle:m,span:y=1,key:$,styles:S},x)=>"string"==typeof r?t.createElement(b,{key:`${l}-${$||x}`,className:h,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),v),null==S?void 0:S.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),m),null==S?void 0:S.content)},span:y,colon:n,component:r,itemPrefixCls:p,bordered:o,label:a?e:null,content:s?g:null,type:l}):[t.createElement(b,{key:`label-${$||x}`,className:h,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),v),null==S?void 0:S.label),span:1,colon:n,component:r[0],itemPrefixCls:p,bordered:o,label:e,type:"label"}),t.createElement(b,{key:`content-${$||x}`,className:h,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),f),m),null==S?void 0:S.content),span:2*y-1,component:r[1],itemPrefixCls:p,bordered:o,content:g,type:"content"})])}let p=e=>{let n=t.useContext(s),{prefixCls:i,vertical:o,row:r,index:l,bordered:a}=e;return o?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${l}`,className:`${i}-row`},g(r,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${l}`,className:`${i}-row`},g(r,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:l,className:`${i}-row`},g(r,e,Object.assign({component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var h=e.i(915654),f=e.i(183293),v=e.i(246422),m=e.i(838378);let y=(0,v.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:i,itemPaddingEnd:o,colonMarginRight:r,colonMarginLeft:l,titleMarginBottom:a}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,h.unit)(e.padding)} ${(0,h.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,h.unit)(e.paddingSM)} ${(0,h.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,h.unit)(e.paddingXS)} ${(0,h.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:i,paddingInlineEnd:o},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,h.unit)(l)} ${(0,h.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,m.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var $=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};let S=e=>{let b,{prefixCls:g,title:h,extra:f,column:v,colon:m=!0,bordered:S,layout:x,children:E,className:C,rootClassName:O,style:j,size:w,labelStyle:k,contentStyle:T,styles:I,items:L,classNames:R}=e,P=$(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:N,direction:z,className:M,style:B,classNames:D,styles:W}=(0,o.useComponentConfig)("descriptions"),_=N("descriptions",g),H=(0,l.default)(),G=t.useMemo(()=>{var e;return"number"==typeof v?v:null!=(e=(0,i.matchScreen)(H,Object.assign(Object.assign({},a),v)))?e:3},[H,v]),A=(b=t.useMemo(()=>L||(0,d.default)(E).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[L,E]),t.useMemo(()=>b.map(e=>{var{span:t}=e,n=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,i.matchScreen)(H,t)})}),[b,H])),q=(0,r.default)(w),F=((e,n)=>{let[i,o]=(0,t.useMemo)(()=>{let t,i,o,r;return t=[],i=[],o=!1,r=0,n.filter(e=>e).forEach(n=>{let{filled:l}=n,a=u(n,["filled"]);if(l){i.push(a),t.push(i),i=[],r=0;return}let s=e-r;(r+=n.span||1)>=e?(r>e?(o=!0,i.push(Object.assign(Object.assign({},a),{span:s}))):i.push(a),t.push(i),i=[],r=0):i.push(a)}),i.length>0&&t.push(i),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:k,contentStyle:T,styles:{content:Object.assign(Object.assign({},W.content),null==I?void 0:I.content),label:Object.assign(Object.assign({},W.label),null==I?void 0:I.label)},classNames:{label:(0,n.default)(D.label,null==R?void 0:R.label),content:(0,n.default)(D.content,null==R?void 0:R.content)}}),[k,T,I,R,D,W]);return U(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,n.default)(_,M,D.root,null==R?void 0:R.root,{[`${_}-${q}`]:q&&"default"!==q,[`${_}-bordered`]:!!S,[`${_}-rtl`]:"rtl"===z},C,O,X,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},B),W.root),null==I?void 0:I.root),j)},P),(h||f)&&t.createElement("div",{className:(0,n.default)(`${_}-header`,D.header,null==R?void 0:R.header),style:Object.assign(Object.assign({},W.header),null==I?void 0:I.header)},h&&t.createElement("div",{className:(0,n.default)(`${_}-title`,D.title,null==R?void 0:R.title),style:Object.assign(Object.assign({},W.title),null==I?void 0:I.title)},h),f&&t.createElement("div",{className:(0,n.default)(`${_}-extra`,D.extra,null==R?void 0:R.extra),style:Object.assign(Object.assign({},W.extra),null==I?void 0:I.extra)},f)),t.createElement("div",{className:`${_}-view`},t.createElement("table",null,t.createElement("tbody",null,F.map((e,n)=>t.createElement(p,{key:n,index:n,colon:m,prefixCls:_,vertical:"vertical"===x,bordered:S,row:e}))))))))};S.Item=({children:e})=>e,e.s(["Descriptions",0,S],869216)},544195,e=>{"use strict";var t=e.i(271645),n=e.i(343794),i=e.i(981444),o=e.i(914949),r=e.i(244009),l=e.i(242064),a=e.i(321883),s=e.i(517455);let d=t.createContext(null),c=d.Provider,u=t.createContext(null),b=u.Provider;e.i(247167);var g=e.i(91874),p=e.i(611935),h=e.i(121872),f=e.i(26905),v=e.i(681216),m=e.i(937328),y=e.i(62139);e.i(296059);var $=e.i(915654),S=e.i(183293),x=e.i(246422),E=e.i(838378);let C=(0,x.genStyleHooks)("Radio",e=>{let{controlOutline:t,controlOutlineWidth:n}=e,i=`0 0 0 ${(0,$.unit)(n)} ${t}`,o=(0,E.mergeToken)(e,{radioFocusShadow:i,radioButtonFocusShadow:i});return[(e=>{let{componentCls:t,antCls:n}=e,i=`${t}-group`;return{[i]:Object.assign(Object.assign({},(0,S.resetComponent)(e)),{display:"inline-block",fontSize:0,[`&${i}-rtl`]:{direction:"rtl"},[`&${i}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}})(o),(e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:i,radioSize:o,motionDurationSlow:r,motionDurationMid:l,motionEaseInOutCirc:a,colorBgContainer:s,colorBorder:d,lineWidth:c,colorBgContainerDisabled:u,colorTextDisabled:b,paddingXS:g,dotColorDisabled:p,lineType:h,radioColor:f,radioBgColor:v,calc:m}=e,y=`${t}-inner`,x=m(o).sub(m(4).mul(2)),E=m(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,S.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,$.unit)(c)} ${h} ${i}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},(0,S.resetComponent)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
- &:hover ${y}`]:{borderColor:i},[`${t}-input:focus-visible + ${y}`]:(0,S.genFocusOutline)(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:E,height:E,marginBlockStart:m(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:m(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:f,borderBlockStart:0,borderInlineStart:0,borderRadius:E,transform:"scale(0)",opacity:0,transition:`all ${r} ${a}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:E,height:E,backgroundColor:s,borderColor:d,borderStyle:"solid",borderWidth:c,borderRadius:"50%",transition:`all ${l}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[y]:{borderColor:i,backgroundColor:v,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${r} ${a}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[y]:{backgroundColor:u,borderColor:d,cursor:"not-allowed","&::after":{backgroundColor:p}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:b,cursor:"not-allowed"},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${m(x).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:g,paddingInlineEnd:g}})}})(o),(e=>{let{buttonColor:t,controlHeight:n,componentCls:i,lineWidth:o,lineType:r,colorBorder:l,motionDurationMid:a,buttonPaddingInline:s,fontSize:d,buttonBg:c,fontSizeLG:u,controlHeightLG:b,controlHeightSM:g,paddingXS:p,borderRadius:h,borderRadiusSM:f,borderRadiusLG:v,buttonCheckedBg:m,buttonSolidCheckedColor:y,colorTextDisabled:x,colorBgContainerDisabled:E,buttonCheckedBgDisabled:C,buttonCheckedColorDisabled:O,colorPrimary:j,colorPrimaryHover:w,colorPrimaryActive:k,buttonSolidCheckedBg:T,buttonSolidCheckedHoverBg:I,buttonSolidCheckedActiveBg:L,calc:R}=e;return{[`${i}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:s,paddingBlock:0,color:t,fontSize:d,lineHeight:(0,$.unit)(R(n).sub(R(o).mul(2)).equal()),background:c,border:`${(0,$.unit)(o)} ${r} ${l}`,borderBlockStartWidth:R(o).add(.02).equal(),borderInlineEndWidth:o,cursor:"pointer",transition:`color ${a},background ${a},box-shadow ${a}`,a:{color:t},[`> ${i}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:R(o).mul(-1).equal()},"&:first-child":{borderInlineStart:`${(0,$.unit)(o)} ${r} ${l}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${i}-group-large &`]:{height:b,fontSize:u,lineHeight:(0,$.unit)(R(b).sub(R(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},[`${i}-group-small &`]:{height:g,paddingInline:R(p).sub(o).equal(),paddingBlock:0,lineHeight:(0,$.unit)(R(g).sub(R(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:f,borderEndStartRadius:f},"&:last-child":{borderStartEndRadius:f,borderEndEndRadius:f}},"&:hover":{position:"relative",color:j},"&:has(:focus-visible)":(0,S.genFocusOutline)(e),[`${i}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${i}-button-wrapper-disabled)`]:{zIndex:1,color:j,background:m,borderColor:j,"&::before":{backgroundColor:j},"&:first-child":{borderColor:j},"&:hover":{color:w,borderColor:w,"&::before":{backgroundColor:w}},"&:active":{color:k,borderColor:k,"&::before":{backgroundColor:k}}},[`${i}-group-solid &-checked:not(${i}-button-wrapper-disabled)`]:{color:y,background:T,borderColor:T,"&:hover":{color:y,background:I,borderColor:I},"&:active":{color:y,background:L,borderColor:L}},"&-disabled":{color:x,backgroundColor:E,borderColor:l,cursor:"not-allowed","&:first-child, &:hover":{color:x,backgroundColor:E,borderColor:l}},[`&-disabled${i}-button-wrapper-checked`]:{color:O,backgroundColor:C,borderColor:l,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}})(o)]},e=>{let{wireframe:t,padding:n,marginXS:i,lineWidth:o,fontSizeLG:r,colorText:l,colorBgContainer:a,colorTextDisabled:s,controlItemBgActiveDisabled:d,colorTextLightSolid:c,colorPrimary:u,colorPrimaryHover:b,colorPrimaryActive:g,colorWhite:p}=e;return{radioSize:r,dotSize:t?r-8:r-(4+o)*2,dotColorDisabled:s,buttonSolidCheckedColor:c,buttonSolidCheckedBg:u,buttonSolidCheckedHoverBg:b,buttonSolidCheckedActiveBg:g,buttonBg:a,buttonCheckedBg:a,buttonColor:l,buttonCheckedBgDisabled:d,buttonCheckedColorDisabled:s,buttonPaddingInline:n-o,wrapperMarginInlineEnd:i,radioColor:t?u:p,radioBgColor:t?a:u}},{unitless:{radioSize:!0,dotSize:!0}});var O=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};let j=t.forwardRef((e,i)=>{var o,r;let s=t.useContext(d),c=t.useContext(u),{getPrefixCls:b,direction:$,radio:S}=t.useContext(l.ConfigContext),x=t.useRef(null),E=(0,p.composeRef)(i,x),{isFormItemInput:j}=t.useContext(y.FormItemInputContext),{prefixCls:w,className:k,rootClassName:T,children:I,style:L,title:R}=e,P=O(e,["prefixCls","className","rootClassName","children","style","title"]),N=b("radio",w),z="button"===((null==s?void 0:s.optionType)||c),M=z?`${N}-button`:N,B=(0,a.default)(N),[D,W,_]=C(N,B),H=Object.assign({},P),G=t.useContext(m.default);s&&(H.name=s.name,H.onChange=t=>{var n,i;null==(n=e.onChange)||n.call(e,t),null==(i=null==s?void 0:s.onChange)||i.call(s,t)},H.checked=e.value===s.value,H.disabled=null!=(o=H.disabled)?o:s.disabled),H.disabled=null!=(r=H.disabled)?r:G;let A=(0,n.default)(`${M}-wrapper`,{[`${M}-wrapper-checked`]:H.checked,[`${M}-wrapper-disabled`]:H.disabled,[`${M}-wrapper-rtl`]:"rtl"===$,[`${M}-wrapper-in-form-item`]:j,[`${M}-wrapper-block`]:!!(null==s?void 0:s.block)},null==S?void 0:S.className,k,T,W,_,B),[q,F]=(0,v.default)(H.onClick);return D(t.createElement(h.default,{component:"Radio",disabled:H.disabled},t.createElement("label",{className:A,style:Object.assign(Object.assign({},null==S?void 0:S.style),L),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:R,onClick:q},t.createElement(g.default,Object.assign({},H,{className:(0,n.default)(H.className,{[f.TARGET_CLS]:!z}),type:"radio",prefixCls:M,ref:E,onClick:F})),void 0!==I?t.createElement("span",{className:`${M}-label`},I):null)))});var w=e.i(286039);let k=t.forwardRef((e,d)=>{let{getPrefixCls:u,direction:b}=t.useContext(l.ConfigContext),{name:g}=t.useContext(y.FormItemInputContext),p=(0,i.default)((0,w.toNamePathStr)(g)),{prefixCls:h,className:f,rootClassName:v,options:m,buttonStyle:$="outline",disabled:S,children:x,size:E,style:O,id:k,optionType:T,name:I=p,defaultValue:L,value:R,block:P=!1,onChange:N,onMouseEnter:z,onMouseLeave:M,onFocus:B,onBlur:D}=e,[W,_]=(0,o.default)(L,{value:R}),H=t.useCallback(t=>{let n=t.target.value;"value"in e||_(n),n!==W&&(null==N||N(t))},[W,_,N]),G=u("radio",h),A=`${G}-group`,q=(0,a.default)(G),[F,U,X]=C(G,q),K=x;m&&m.length>0&&(K=m.map(e=>"string"==typeof e||"number"==typeof e?t.createElement(j,{key:e.toString(),prefixCls:G,disabled:S,value:e,checked:W===e},e):t.createElement(j,{key:`radio-group-value-options-${e.value}`,prefixCls:G,disabled:e.disabled||S,value:e.value,checked:W===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let V=(0,s.default)(E),J=(0,n.default)(A,`${A}-${$}`,{[`${A}-${V}`]:V,[`${A}-rtl`]:"rtl"===b,[`${A}-block`]:P},f,v,U,X,q),Q=t.useMemo(()=>({onChange:H,value:W,disabled:S,name:I,optionType:T,block:P}),[H,W,S,I,T,P]);return F(t.createElement("div",Object.assign({},(0,r.default)(e,{aria:!0,data:!0}),{className:J,style:O,onMouseEnter:z,onMouseLeave:M,onFocus:B,onBlur:D,id:k,ref:d}),t.createElement(c,{value:Q},K)))}),T=t.memo(k);var I=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);ot.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n};let L=t.forwardRef((e,n)=>{let{getPrefixCls:i}=t.useContext(l.ConfigContext),{prefixCls:o}=e,r=I(e,["prefixCls"]),a=i("radio",o);return t.createElement(b,{value:"button"},t.createElement(j,Object.assign({prefixCls:a},r,{type:"radio",ref:n})))});j.Button=L,j.Group=T,j.__ANT_RADIO=!0,e.s(["default",0,j],544195)},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},285027,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let 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"};var o=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["WarningOutlined",0,r],285027)},540626,e=>{"use strict";let t;var n,i=e.i(271645);let o=(0,i.createContext)(null);function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=l(e);if(n.length!==l(t).length)return!1;for(let i=0;ie,n){let o=n?.compare??s,r=(0,i.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),l=(0,i.useCallback)(()=>e.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(r,l,l,t,o)}function c(e,...t){return"function"==typeof e?e(...t):e}var u=class{#e=!0;#t;#n;#i;#o;#r;#l;#a;#s=0;#d=5;#c=!1;#u=!1;#b=null;#g=()=>{this.debugLog("Connected to event bus"),this.#r=!0,this.#c=!1,this.debugLog("Emitting queued events",this.#o),this.#o.forEach(e=>this.emitEventToBus(e)),this.#o=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#g)};#p=()=>{if(this.#s{this.#c||(this.#c=!0,this.#n().addEventListener("tanstack-connect-success",this.#g),this.#p())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:i=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#i=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#o=[],this.#r=!1,this.#u=!1,this.#l=null,this.#a=i}startConnectLoop(){null!==this.#l||this.#r||(this.debugLog(`Starting connect loop (every ${this.#a}ms)`),this.#l=setInterval(this.#p,this.#a))}stopConnectLoop(){this.#c=!1,null!==this.#l&&(clearInterval(this.#l),this.#l=null,this.#o=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#i&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#b&&(this.debugLog("Emitting event to internal event target",e,t),this.#b.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#u)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#r){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#o.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#c&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let i=n?.withEventTarget??!1,o=`${this.#t}:${e}`;if(i&&(this.#b||(this.#b=new EventTarget),this.#b.addEventListener(o,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",o),()=>{};let r=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(o,r),this.debugLog("Registered event to bus",o),()=>{i&&this.#b?.removeEventListener(o,r),this.#n().removeEventListener(o,r)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let b=new Map;function g(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let p=new class extends u{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}},h=((n={})[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n);function f(e,t,n){let i="object"==typeof e,o=i?e:void 0;return{next:(i?e.next:e)?.bind(o),error:(i?e.error:t)?.bind(o),complete:(i?e.complete:n)?.bind(o)}}let v=[],m=0,{link:y,unlink:$,propagate:S,checkDirty:x,shallowPropagate:E}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let i=t.depsTail;if(void 0!==i&&i.dep===e)return;let o=void 0!==i?i.nextDep:t.deps;if(void 0!==o&&o.dep===e){o.version=n,t.depsTail=o;return}let r=e.subsTail;if(void 0!==r&&r.version===n&&r.sub===t)return;let l=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:i,nextDep:o,prevSub:r,nextSub:void 0};void 0!==o&&(o.prevDep=l),void 0!==i?i.nextDep=l:t.deps=l,void 0!==r?r.nextSub=l:e.subs=l},unlink:function(e,t=e.sub){let i=e.dep,o=e.prevDep,r=e.nextDep,l=e.nextSub,a=e.prevSub;return void 0!==r?r.prevDep=o:t.depsTail=o,void 0!==o?o.nextDep=r:t.deps=r,void 0!==l?l.prevSub=a:i.subsTail=a,void 0!==a?a.nextSub=l:void 0===(i.subs=l)&&n(i),r},propagate:function(e){let n,i=e.nextSub;e:for(;;){let o=e.sub,r=o.flags;if(r&(h.RecursedCheck|h.Recursed|h.Dirty|h.Pending)?r&(h.RecursedCheck|h.Recursed)?r&h.RecursedCheck?!(r&(h.Dirty|h.Pending))&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,o)?(o.flags=r|(h.Recursed|h.Pending),r&=h.Mutable):r=h.None:o.flags=r&~h.Recursed|h.Pending:r=h.None:o.flags=r|h.Pending,r&h.Watching&&t(o),r&h.Mutable){let t=o.subs;if(void 0!==t){let o=(e=t).nextSub;void 0!==o&&(n={value:i,prev:n},i=o);continue}}if(void 0!==(e=i)){i=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){i=e.nextSub;continue e}break}},checkDirty:function(t,n){let o,r=0,l=!1;e:for(;;){let a=t.dep,s=a.flags;if(n.flags&h.Dirty)l=!0;else if((s&(h.Mutable|h.Dirty))==(h.Mutable|h.Dirty)){if(e(a)){let e=a.subs;void 0!==e.nextSub&&i(e),l=!0}}else if((s&(h.Mutable|h.Pending))==(h.Mutable|h.Pending)){(void 0!==t.nextSub||void 0!==t.prevSub)&&(o={value:t,prev:o}),t=a.deps,n=a,++r;continue}if(!l){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;r--;){let r=n.subs,a=void 0!==r.nextSub;if(a?(t=o.value,o=o.prev):t=r,l){if(e(n)){a&&i(r),n=t.sub;continue}l=!1}else n.flags&=~h.Pending;n=t.sub;let s=t.nextDep;if(void 0!==s){t=s;continue e}}return l}},shallowPropagate:i};function i(e){do{let n=e.sub,i=n.flags;(i&(h.Pending|h.Dirty))===h.Pending&&(n.flags=i|h.Dirty,(i&(h.Watching|h.RecursedCheck))===h.Watching&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){v[O++]=e,e.flags&=~h.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=h.Mutable|h.Dirty,j(e))}}),C=0,O=0;function j(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=$(n,e)}var w=class{constructor(e,n){this.atom=function(e){let n="function"==typeof e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?h.None:h.Mutable,get:()=>(void 0!==t&&y(i,t,m),i._snapshot),subscribe(e){var n;let o,r,l=f(e),a={current:!1},s=(n=()=>{i.get(),a.current?l.next?.(i._snapshot):a.current=!0},o=()=>{let e=t;t=r,++m,r.depsTail=void 0,r.flags=h.Watching|h.RecursedCheck;try{return n()}finally{t=e,r.flags&=~h.RecursedCheck,j(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:h.Watching|h.RecursedCheck,notify(){let e=this.flags;e&h.Dirty||e&h.Pending&&x(this.deps,this)?o():this.flags=h.Watching},stop(){this.flags=h.None,this.depsTail=void 0,j(this)}},o(),r);return{unsubscribe:()=>{s.stop()}}},_update(o){let r=t,l=(void 0)??Object.is;if(n)t=i,++m,i.depsTail=void 0;else if(void 0===o)return!1;n&&(i.flags=h.Mutable|h.RecursedCheck);try{let t=i._snapshot,r="function"==typeof o?o(t):void 0===o&&n?e(t):o;if(void 0===t||!l(t,r))return i._snapshot=r,!0;return!1}finally{t=r,n&&(i.flags&=~h.RecursedCheck),j(i)}}};return n?(i.flags=h.Mutable|h.Dirty,i.get=function(){let e=i.flags;if(e&h.Dirty||e&h.Pending&&x(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&E(e)}}else e&h.Pending&&(i.flags=e&~h.Pending);return void 0!==t&&y(i,t,m),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;if(void 0!==e&&(S(e),E(e),1)){for(;C{this.options={...this.options,...e},this.#v()||this.cancel()},this.#m=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:i}=n;return{...n,status:this.#v()?i?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;if(n){var i,o;b.set(n,t),p.emit(e,{key:(i={...t,key:n}).key,store:{state:g("function"==typeof(o=i.store).get?o.get():o.state)},options:g(i.options)})}})("Debouncer",this)},this.#v=()=>!!c(this.options.enabled,this),this.#y=()=>c(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#v())return;this.#m({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#m({canLeadingExecute:!1}),t=!0,this.#$(...e)),this.options.trailing&&this.#m({isPending:!0,lastArgs:e}),this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#m({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#$(...e)},this.#y())},this.#$=(...e)=>{this.#v()&&(this.fn(...e),this.#m({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#S(),this.#$(...this.store.state.lastArgs))},this.#S=()=>{this.#f&&(clearTimeout(this.#f),this.#f=void 0)},this.cancel=()=>{this.#S(),this.#m({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#m(k())},this.key=t.key,this.options={...T,...t},this.#m(this.options.initialState??{}),this.key&&p.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#m(e.payload.store.state),this.setOptions(e.payload.options))})}#m;#v;#y;#$;#S};e.s(["useDebouncer",0,function(e,t,n=()=>({})){let l={...((0,i.useContext)(o)?.defaultOptions??{}).debouncer,...t},[a]=(0,i.useState)(()=>{let t=new I(e,l);return t.Subscribe=function(e){let n=d(t.store,e.selector,{compare:r});return"function"==typeof e.children?e.children(n):e.children},t});a.fn=e,a.setOptions(l),(0,i.useEffect)(()=>()=>{l.onUnmount?l.onUnmount(a):a.cancel()},[]);let s=d(a.store,n,{compare:r});return(0,i.useMemo)(()=>({...a,state:s}),[a,s])}],540626)},741466,e=>{"use strict";e.s(["DEBOUNCE_WAIT_MS",0,300])},399029,e=>{"use strict";var t=e.i(540626),n=e.i(271645);e.s(["useDebouncedState",0,function(e,i,o){let[r,l]=(0,n.useState)(e),a=(0,t.useDebouncer)(l,i,o);return[r,a.maybeExecute,a]}])},663435,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(199133),o=e.i(898586),r=e.i(56456),l=e.i(399029),a=e.i(785242),s=e.i(741466);let{Text:d}=o.Typography;e.s(["default",0,({value:e,onChange:o,onTeamSelect:c,disabled:u,organizationId:b,pageSize:g=20})=>{let[p,h]=(0,n.useState)(""),[f,v]=(0,l.useDebouncedState)("",{wait:s.DEBOUNCE_WAIT_MS}),{data:m,fetchNextPage:y,hasNextPage:$,isFetchingNextPage:S,isLoading:x}=(0,a.useInfiniteTeams)(g,f||void 0,b),E=(0,n.useMemo)(()=>{if(!m?.pages)return[];let e=new Set,t=[];for(let n of m.pages)for(let i of n.teams)e.has(i.team_id)||(e.add(i.team_id),t.push(i));return t},[m]);return(0,t.jsx)(i.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{o?.(e??""),c&&c(e?E.find(t=>t.team_id===e)??null:null)},disabled:u,allowClear:!0,filterOption:!1,onSearch:e=>{h(e),v(e)},searchValue:p,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&$&&!S&&y()},loading:x,notFoundContent:x?(0,t.jsx)(r.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,S&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(r.LoadingOutlined,{spin:!0})})]}),children:E.map(e=>(0,t.jsxs)(i.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(d,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}])}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0vvnul8uez9kj.js b/litellm/proxy/_experimental/out/_next/static/chunks/0vvnul8uez9kj.js
new file mode 100644
index 00000000000..e631b72ab02
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0vvnul8uez9kj.js
@@ -0,0 +1 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,571353,e=>{"use strict";e.i(602869);var t=e.i(221688);let r={"api-keys":"api-keys",models:"models-and-endpoints",api_ref:"api-reference","api-reference":"api-reference","llm-playground":"playground",projects:"projects",chat:"chat","access-groups":"access-groups",budgets:"budgets",workflows:"workflows","guardrails-monitor":"guardrails-monitor","mcp-servers":"mcp-servers","search-tools":"search-tools","tag-management":"tag-management","vector-stores":"vector-stores",memory:"memory",policies:"policies",guardrails:"guardrails",prompts:"prompts","tool-policies":"tool-policies",skills:"skills","claude-code-plugins":"skills",caching:"caching","cost-tracking":"cost-tracking","transform-request":"transform-request","ui-theme":"ui-theme",logs:"logs","admin-panel":"admin-panel","logging-and-alerts":"logging-and-alerts","model-hub-table":"model-hub-table",new_usage:"usage",usage:"old-usage","cost-optimization":"cost-optimization",agents:"agents","router-settings":"router-settings",users:"users",teams:"teams",organizations:"organizations"};function o(){let e=t.serverRootPath&&"/"!==t.serverRootPath?`/${t.serverRootPath.replace(/^\/+|\/+$/g,"")}`:"";return`${e}/ui`}e.s(["MIGRATED_PAGES",0,r,"legacyKeyForPathname",0,function(e){let t=o(),n=(e.startsWith(t)?e.slice(t.length):e).replace(/^\/+|\/+$/g,"");for(let[e,t]of Object.entries(r))if(n===t)return e;return null},"legacyPageHref",0,function(e){return`${o()}/?page=${e}`},"migratedHref",0,function(e){return`${o()}/${e.replace(/^\/+/,"")}`}])},62478,e=>{"use strict";var t=e.i(602869);let r=async e=>{if(!e)return null;try{return await (0,t.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};e.s(["fetchProxySettings",0,r])},592392,e=>{"use strict";var t=e.i(62478),r=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("proxySettings"),n={PROXY_BASE_URL:"",PROXY_LOGOUT_URL:"",LITELLM_UI_API_DOC_BASE_URL:null};e.s(["default",0,function(e){let{data:a}=(0,r.useQuery)({queryKey:[...o.all,e],queryFn:()=>(0,t.fetchProxySettings)(e),enabled:!!e});return a??n}])},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={formatUrl:function(){return l},formatWithValidation:function(){return u},urlObjectKeys:function(){return s}};for(var n in o)Object.defineProperty(r,n,{enumerable:!0,get:o[n]});let a=e.r(190809)._(e.r(998183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,o=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return o&&!o.endsWith(":")&&(o+=":"),e.slashes||(!o||i.test(o))&&!1!==u?(u="//"+(u||""),n&&"/"!==n[0]&&(n="/"+n)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${o}${u}${n}${c}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return l(e)}},818581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let o=e.r(271645);function n(e,t){let r=(0,o.useRef)(null),n=(0,o.useRef)(null);return(0,o.useCallback)(o=>{if(null===o){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=a(e,o)),t&&(n.current=a(t,o))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let o=e.r(718967),n=e.r(652817);function a(e){if(!(0,o.isAbsoluteUrl)(e))return!0;try{let t=(0,o.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return o}});let o=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={default:function(){return h},useLinkStatus:function(){return v}};for(var n in o)Object.defineProperty(r,n,{enumerable:!0,get:o[n]});let a=e.r(190809),i=e.r(843476),l=a._(e.r(271645)),s=e.r(195057),u=e.r(8372),c=e.r(818581),d=e.r(718967),f=e.r(405550);e.r(233525);let m=e.r(388540),g=e.r(91949),p=e.r(573668),b=e.r(509396);function h(t){var r,o;let n,a,h,[v,w]=(0,l.useOptimistic)(g.IDLE_LINK_STATUS),E=(0,l.useRef)(null),{href:$,as:S,children:O,prefetch:C=null,passHref:j,replace:x,shallow:k,scroll:N,onClick:T,onMouseEnter:P,onTouchStart:R,legacyBehavior:_=!1,onNavigate:L,transitionTypes:I,ref:A,unstable_dynamicOnHover:B,...M}=t;n=O,_&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let D=l.default.useContext(u.AppRouterContext),z=!1!==C,F=!1!==C?null===(o=C)||"auto"===o?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,U="string"==typeof(r=S||$)?r:(0,s.formatUrl)(r);if(_){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("` ` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=l.default.Children.only(n)}let K=_?a&&"object"==typeof a&&a.ref:A,W=l.default.useCallback(e=>(null!==D&&(E.current=(0,g.mountLinkInstance)(e,U,D,F,z,w)),()=>{E.current&&((0,g.unmountLinkForCurrentNavigation)(E.current),E.current=null),(0,g.unmountPrefetchableInstance)(e)}),[z,U,D,F,w]),H={ref:(0,c.useMergedRef)(W,K),onClick(t){_||"function"!=typeof T||T(t),_&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!D||t.defaultPrevented||function(t,r,o,n,a,i,s){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);l.default.startTransition(()=>{d(r,n?"replace":"push",!1===a?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,o.current,s)})}}(t,U,E,x,N,L,I)},onMouseEnter(e){_||"function"!=typeof P||P(e),_&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),D&&z&&(0,g.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){_||"function"!=typeof R||R(e),_&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),D&&z&&(0,g.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,d.isAbsoluteUrl)(U)?H.href=U:_&&!j&&("a"!==a.type||"href"in a.props)||(H.href=(0,f.addBasePath)(U)),h=_?l.default.cloneElement(a,H):(0,i.jsx)("a",{...M,...H,children:n}),(0,i.jsx)(y.Provider,{value:v,children:h})}e.r(284508);let y=(0,l.createContext)(g.IDLE_LINK_STATUS),v=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},906579,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(361275),n=e.i(702779),a=e.i(763731),i=e.i(242064);e.i(296059);var l=e.i(915654),s=e.i(694758),u=e.i(183293),c=e.i(403541),d=e.i(246422),f=e.i(838378);let m=new s.Keyframes("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new s.Keyframes("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),p=new s.Keyframes("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),b=new s.Keyframes("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),h=new s.Keyframes("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),y=new s.Keyframes("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),v=e=>{let{fontHeight:t,lineWidth:r,marginXS:o,colorBorderBg:n}=e,a=e.colorTextLightSolid,i=e.colorError,l=e.colorErrorHover;return(0,f.mergeToken)(e,{badgeFontHeight:t,badgeShadowSize:r,badgeTextColor:a,badgeColor:i,badgeColorHover:l,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:o,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},w=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:o,lineWidth:n}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*n,indicatorHeightSM:t,dotSize:o/2,textFontSize:o,textFontSizeSM:o,textFontWeight:"normal",statusSize:o/2}},E=(0,d.genStyleHooks)("Badge",e=>(e=>{let{componentCls:t,iconCls:r,antCls:o,badgeShadowSize:n,textFontSize:a,textFontSizeSM:i,statusSize:s,dotSize:d,textFontWeight:f,indicatorHeight:v,indicatorHeightSM:w,marginXS:E,calc:$}=e,S=`${o}-scroll-number`,O=(0,c.genPresetColor)(e,(e,{darkColor:r})=>({[`&${t} ${t}-color-${e}`]:{background:r,[`&:not(${t}-count)`]:{color:r},"a:hover &":{background:r}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:v,height:v,color:e.badgeTextColor,fontWeight:f,fontSize:a,lineHeight:(0,l.unit)(v),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:$(v).div(2).equal(),boxShadow:`0 0 0 ${(0,l.unit)(n)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:w,height:w,fontSize:i,lineHeight:(0,l.unit)(w),borderRadius:$(w).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${(0,l.unit)(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:d,minWidth:d,height:d,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${(0,l.unit)(n)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${S}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:y,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:n,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:m,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:E,color:e.colorText,fontSize:e.fontSize}}}),O),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:p,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${S}-custom-component, ${t}-count`]:{transform:"none"},[`${S}-custom-component, ${S}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[S]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${S}-only`]:{position:"relative",display:"inline-block",height:v,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${S}-only-unit`]:{height:v,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${S}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${S}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}})(v(e)),w),$=(0,d.genStyleHooks)(["Badge","Ribbon"],e=>(e=>{let{antCls:t,badgeFontHeight:r,marginXS:o,badgeRibbonOffset:n,calc:a}=e,i=`${t}-ribbon`,s=`${t}-ribbon-wrapper`,d=(0,c.genPresetColor)(e,(e,{darkColor:t})=>({[`&${i}-color-${e}`]:{background:t,color:t}}));return{[s]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:o,padding:`0 ${(0,l.unit)(e.paddingXS)}`,color:e.colorPrimary,lineHeight:(0,l.unit)(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${i}-text`]:{color:e.badgeTextColor},[`${i}-corner`]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:`${(0,l.unit)(a(n).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),d),{[`&${i}-placement-end`]:{insetInlineEnd:a(n).mul(-1).equal(),borderEndEndRadius:0,[`${i}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${i}-placement-start`]:{insetInlineStart:a(n).mul(-1).equal(),borderEndStartRadius:0,[`${i}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(v(e)),w),S=e=>{let o,{prefixCls:n,value:a,current:i,offset:l=0}=e;return l&&(o={position:"absolute",top:`${l}00%`,left:0}),t.createElement("span",{style:o,className:(0,r.default)(`${n}-only-unit`,{current:i})},a)},O=e=>{let r,o,{prefixCls:n,count:a,value:i}=e,l=Number(i),s=Math.abs(a),[u,c]=t.useState(l),[d,f]=t.useState(s),m=()=>{c(l),f(s)};if(t.useEffect(()=>{let e=setTimeout(m,1e3);return()=>clearTimeout(e)},[l]),u===l||Number.isNaN(l)||Number.isNaN(u))r=[t.createElement(S,Object.assign({},e,{key:l,current:!0}))],o={transition:"none"};else{r=[];let n=l+10,a=[];for(let e=l;e<=n;e+=1)a.push(e);let i=de%10===u);r=(i<0?a.slice(0,c+1):a.slice(c)).map((r,o)=>t.createElement(S,Object.assign({},e,{key:r,value:r%10,offset:i<0?o-c:o,current:o===c}))),o={transform:`translateY(${-function(e,t,r){let o=e,n=0;for(;(o+10)%10!==t;)o+=r,n+=r;return n}(u,l,i)}00%)`}}return t.createElement("span",{className:`${n}-only`,style:o,onTransitionEnd:m},r)};var C=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let j=t.forwardRef((e,o)=>{let{prefixCls:n,count:l,className:s,motionClassName:u,style:c,title:d,show:f,component:m="sup",children:g}=e,p=C(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:b}=t.useContext(i.ConfigContext),h=b("scroll-number",n),y=Object.assign(Object.assign({},p),{"data-show":f,style:c,className:(0,r.default)(h,s,u),title:d}),v=l;if(l&&Number(l)%1==0){let e=String(l).split("");v=t.createElement("bdi",null,e.map((r,o)=>t.createElement(O,{prefixCls:h,count:Number(l),value:r,key:e.length-o})))}return((null==c?void 0:c.borderColor)&&(y.style=Object.assign(Object.assign({},c),{boxShadow:`0 0 0 1px ${c.borderColor} inset`})),g)?(0,a.cloneElement)(g,e=>({className:(0,r.default)(`${h}-custom-component`,null==e?void 0:e.className,u)})):t.createElement(m,Object.assign({},y,{ref:o}),v)});var x=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let k=t.forwardRef((e,l)=>{var s,u,c,d,f;let{prefixCls:m,scrollNumberPrefixCls:g,children:p,status:b,text:h,color:y,count:v=null,overflowCount:w=99,dot:$=!1,size:S="default",title:O,offset:C,style:k,className:N,rootClassName:T,classNames:P,styles:R,showZero:_=!1}=e,L=x(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:I,direction:A,badge:B}=t.useContext(i.ConfigContext),M=I("badge",m),[D,z,F]=E(M),U=v>w?`${w}+`:v,K="0"===U||0===U||"0"===h||0===h,W=null===v||K&&!_,H=(null!=b||null!=y)&&W,q=null!=b||!K,G=$&&!K,V=G?"":U,Z=(0,t.useMemo)(()=>((null==V||""===V)&&(null==h||""===h)||K&&!_)&&!G,[V,K,_,G,h]),X=(0,t.useRef)(v);Z||(X.current=v);let Q=X.current,Y=(0,t.useRef)(V);Z||(Y.current=V);let J=Y.current,ee=(0,t.useRef)(G);Z||(ee.current=G);let et=(0,t.useMemo)(()=>{if(!C)return Object.assign(Object.assign({},null==B?void 0:B.style),k);let e={marginTop:C[1]};return"rtl"===A?e.left=Number.parseInt(C[0],10):e.right=-Number.parseInt(C[0],10),Object.assign(Object.assign(Object.assign({},e),null==B?void 0:B.style),k)},[A,C,k,null==B?void 0:B.style]),er=null!=O?O:"string"==typeof Q||"number"==typeof Q?Q:void 0,eo=!Z&&(0===h?_:!!h&&!0!==h),en=eo?t.createElement("span",{className:`${M}-status-text`},h):null,ea=Q&&"object"==typeof Q?(0,a.cloneElement)(Q,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ei=(0,n.isPresetColor)(y,!1),el=(0,r.default)(null==P?void 0:P.indicator,null==(s=null==B?void 0:B.classNames)?void 0:s.indicator,{[`${M}-status-dot`]:H,[`${M}-status-${b}`]:!!b,[`${M}-color-${y}`]:ei}),es={};y&&!ei&&(es.color=y,es.background=y);let eu=(0,r.default)(M,{[`${M}-status`]:H,[`${M}-not-a-wrapper`]:!p,[`${M}-rtl`]:"rtl"===A},N,T,null==B?void 0:B.className,null==(u=null==B?void 0:B.classNames)?void 0:u.root,null==P?void 0:P.root,z,F);if(!p&&H&&(h||q||!W)){let e=et.color;return D(t.createElement("span",Object.assign({},L,{className:eu,style:Object.assign(Object.assign(Object.assign({},null==R?void 0:R.root),null==(c=null==B?void 0:B.styles)?void 0:c.root),et)}),t.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==R?void 0:R.indicator),null==(d=null==B?void 0:B.styles)?void 0:d.indicator),es)}),eo&&t.createElement("span",{style:{color:e},className:`${M}-status-text`},h)))}return D(t.createElement("span",Object.assign({ref:l},L,{className:eu,style:Object.assign(Object.assign({},null==(f=null==B?void 0:B.styles)?void 0:f.root),null==R?void 0:R.root)}),p,t.createElement(o.default,{visible:!Z,motionName:`${M}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{var o,n;let a=I("scroll-number",g),i=ee.current,l=(0,r.default)(null==P?void 0:P.indicator,null==(o=null==B?void 0:B.classNames)?void 0:o.indicator,{[`${M}-dot`]:i,[`${M}-count`]:!i,[`${M}-count-sm`]:"small"===S,[`${M}-multiple-words`]:!i&&J&&J.toString().length>1,[`${M}-status-${b}`]:!!b,[`${M}-color-${y}`]:ei}),s=Object.assign(Object.assign(Object.assign({},null==R?void 0:R.indicator),null==(n=null==B?void 0:B.styles)?void 0:n.indicator),et);return y&&!ei&&((s=s||{}).background=y),t.createElement(j,{prefixCls:a,show:!Z,motionClassName:e,className:l,count:J,title:er,style:s,key:"scrollNumber"},ea)}),en))});k.Ribbon=e=>{let{className:o,prefixCls:a,style:l,color:s,children:u,text:c,placement:d="end",rootClassName:f}=e,{getPrefixCls:m,direction:g}=t.useContext(i.ConfigContext),p=m("ribbon",a),b=`${p}-wrapper`,[h,y,v]=$(p,b),w=(0,n.isPresetColor)(s,!1),E=(0,r.default)(p,`${p}-placement-${d}`,{[`${p}-rtl`]:"rtl"===g,[`${p}-color-${s}`]:w},o),S={},O={};return s&&!w&&(S.background=s,O.color=s),h(t.createElement("div",{className:(0,r.default)(b,f,y,v)},u,t.createElement("div",{className:(0,r.default)(E,y),style:Object.assign(Object.assign({},S),l)},t.createElement("span",{className:`${p}-text`},c),t.createElement("div",{className:`${p}-corner`,style:O}))))},e.s(["Badge",0,k],906579)},115571,e=>{"use strict";let t="local-storage-change";e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",0,function(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))},"getLocalStorageItem",0,function(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}},"removeLocalStorageItem",0,function(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}},"setLocalStorageItem",0,function(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}])},275144,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(602869);let n=(0,r.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:a})=>{let[i,l]=(0,r.useState)(null),[s,u]=(0,r.useState)(null);return(0,r.useEffect)(()=>{(async()=>{try{let e=(0,o.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){let e=await r.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&u(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,r.useEffect)(()=>{if(s){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=s});else{let e=document.createElement("link");e.rel="icon",e.href=s,document.head.appendChild(e)}}},[s]),(0,t.jsx)(n.Provider,{value:{logoUrl:i,setLogoUrl:l,faviconUrl:s,setFaviconUrl:u},children:e})},"useTheme",0,()=>{let e=(0,r.useContext)(n);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},143488,e=>{"use strict";var t=e.i(266027),r=e.i(602869);let o=(0,e.i(243652).createQueryKeys)("healthReadinessDetails"),n=async e=>{let t=(0,r.getProxyBaseUrl)(),o=await fetch(`${t}/health/readiness/details`,{method:"GET",headers:{[(0,r.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok)throw Error(`Failed to fetch health readiness details: ${o.statusText}`);return o.json()};e.s(["useHealthReadinessDetails",0,e=>(0,t.useQuery)({queryKey:o.detail("readiness"),queryFn:()=>n(e),enabled:!!e,staleTime:3e5,retry:!1})])},731565,e=>{"use strict";var t=e.i(115571),r=e.i(271645);function o(e){let r=t=>{"disableBlogPosts"===t.key&&e()},o=t=>{let{key:r}=t.detail;"disableBlogPosts"===r&&e()};return window.addEventListener("storage",r),window.addEventListener(t.LOCAL_STORAGE_EVENT,o),()=>{window.removeEventListener("storage",r),window.removeEventListener(t.LOCAL_STORAGE_EVENT,o)}}function n(){return"true"===(0,t.getLocalStorageItem)("disableBlogPosts")}e.s(["useDisableBlogPosts",0,function(){return(0,r.useSyncExternalStore)(o,n)}])},912089,636772,e=>{"use strict";var t=e.i(115571),r=e.i(271645);function o(e){let r=t=>{"disableBouncingIcon"===t.key&&e()},o=t=>{let{key:r}=t.detail;"disableBouncingIcon"===r&&e()};return window.addEventListener("storage",r),window.addEventListener(t.LOCAL_STORAGE_EVENT,o),()=>{window.removeEventListener("storage",r),window.removeEventListener(t.LOCAL_STORAGE_EVENT,o)}}function n(){return"true"===(0,t.getLocalStorageItem)("disableBouncingIcon")}function a(e){let r=t=>{"disableShowPrompts"===t.key&&e()},o=t=>{let{key:r}=t.detail;"disableShowPrompts"===r&&e()};return window.addEventListener("storage",r),window.addEventListener(t.LOCAL_STORAGE_EVENT,o),()=>{window.removeEventListener("storage",r),window.removeEventListener(t.LOCAL_STORAGE_EVENT,o)}}function i(){return"true"===(0,t.getLocalStorageItem)("disableShowPrompts")}e.s(["useDisableBouncingIcon",0,function(){return(0,r.useSyncExternalStore)(o,n)}],912089),e.s(["useDisableShowPrompts",0,function(){return(0,r.useSyncExternalStore)(a,i)}],636772)},222038,799676,e=>{"use strict";e.s(["navAccountDisplayName",0,function(e,t){let r=e?.trim();if(r)return r;let o=t?.trim();return!o||/^default[_\s-]?user[_\s-]?id$/i.test(o)?"Account":o}],222038);var t=e.i(843476);e.s([],704824),e.i(704824),e.i(247167);var r=e.i(271645),o=e.i(552245),n=e.i(733332);let a=r.createContext(void 0);function i(){let e=r.useContext(a);if(void 0===e)throw Error((0,n.default)(13));return e}let l={imageLoadingStatus:()=>null},s=r.forwardRef(function(e,n){let{className:i,render:s,style:u,...c}=e,[d,f]=r.useState("idle"),m=r.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),g=(0,o.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:l});return(0,t.jsx)(a.Provider,{value:m,children:g})});var u=e.i(667865),c=e.i(146376),d=e.i(137584),f=e.i(209407),m=e.i(223910),g=e.i(956789);let p={...l,...f.transitionStatusMapping},b=r.forwardRef(function(e,t){let{className:n,render:a,onLoadingStatusChange:l,style:s,...f}=e,{setImageLoadingStatus:b}=i(),h=function(e,{referrerPolicy:t,crossOrigin:o,sizes:n,srcSet:a}){let[i,l]=r.useState("idle");return(0,c.useIsoLayoutEffect)(()=>{if(!e&&!a)return l("error"),g.NOOP;let r=!0,i=new window.Image,s=e=>()=>{r&&l(e)};return l("loading"),i.onload=s("loaded"),i.onerror=s("error"),t&&(i.referrerPolicy=t),i.crossOrigin=o??null,n&&(i.sizes=n),a&&(i.srcset=a),e&&(i.src=e),i.complete&&l(i.naturalWidth>0?"loaded":"error"),()=>{r=!1}},[e,a,n,o,t]),i}(f.src,f),y="loaded"===h,{mounted:v,transitionStatus:w,setMounted:E}=(0,m.useTransitionStatus)(y),$=r.useRef(null),S=(0,u.useStableCallback)(e=>{l?.(e),b(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==h&&S(h)},[h,S]),(0,c.useIsoLayoutEffect)(()=>()=>b("idle"),[b]),(0,d.useOpenChangeComplete)({open:y,ref:$,onComplete(){y||E(!1)}});let O=(0,o.useRenderElement)("img",e,{state:{imageLoadingStatus:h,transitionStatus:w},ref:[t,$],props:f,stateAttributesMapping:p,enabled:v});return v?O:null});var h=e.i(439957);let y=r.forwardRef(function(e,t){let{className:n,render:a,delay:s,style:u,...c}=e,{imageLoadingStatus:d}=i(),[f,m]=r.useState(void 0===s),g=(0,h.useTimeout)();return r.useEffect(()=>(void 0!==s?g.start(s,()=>m(!0)):m(!0),g.clear),[g,s]),(0,o.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:t,props:c,stateAttributesMapping:l,enabled:"loaded"!==d&&(void 0===s||f)})});e.s(["Fallback",0,y,"Image",0,b,"Root",0,s],514751);var v=e.i(514751),v=v,w=e.i(115504);let E=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)(v.Root,{ref:o,"data-slot":"avatar",className:(0,w.cn)("relative flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-full",e),...r}));E.displayName="Avatar",r.forwardRef(({className:e,...r},o)=>(0,t.jsx)(v.Image,{ref:o,"data-slot":"avatar-image",className:(0,w.cn)("size-full object-cover",e),...r})).displayName="AvatarImage";let $=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)(v.Fallback,{ref:o,"data-slot":"avatar-fallback",className:(0,w.cn)("flex size-full items-center justify-center rounded-full text-xs font-medium",e),...r}));$.displayName="AvatarFallback",e.s(["Avatar",0,E,"AvatarFallback",0,$],799676)}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1t9h71-jh-nt0.js b/litellm/proxy/_experimental/out/_next/static/chunks/0wo6dp1zxhzve.js
similarity index 97%
rename from litellm/proxy/_experimental/out/_next/static/chunks/1t9h71-jh-nt0.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/0wo6dp1zxhzve.js
index cb32224d7b2..bf3e7abe6b7 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1t9h71-jh-nt0.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/0wo6dp1zxhzve.js
@@ -7,4 +7,4 @@
${(0,d.unit)(o)} ${(0,d.unit)(o)} 0 0 ${r},
${(0,d.unit)(o)} 0 0 0 ${r} inset,
0 ${(0,d.unit)(o)} 0 0 ${r} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:n,cardActionsIconSize:o,colorBorderSecondary:l,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:n,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 ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:o,lineHeight:(0,d.unit)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-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},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${o}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:n}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:n,bodyPadding:o}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(n)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(o)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:n,headerHeightSM:o,headerFontSizeSM:l}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${(0,d.unit)(n)}`,fontSize:l,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,r;return{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:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(r=e.headerPadding)?r:e.paddingLG}});var f=e.i(792812),b=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let h=e=>{let{actionClasses:r,actions:n=[],actionStyle:o}=e;return t.createElement("ul",{className:r,style:o},n.map((e,r)=>{let o=`action-${r}`;return t.createElement("li",{style:{width:`${100/n.length}%`},key:o},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:g,rootClassName:m,style:y,extra:v,headStyle:O={},bodyStyle:$={},title:j,loading:x,bordered:S,variant:C,size:w,type:E,cover:k,actions:M,tabList:P,children:N,activeTabKey:T,defaultActiveTabKey:z,tabBarExtraContent:B,hoverable:L,tabProps:R={},classNames:I,styles:H}=e,G=b(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:_,direction:D,card:W}=t.useContext(o.ConfigContext),[A]=(0,f.default)("card",C,S),F=e=>{var t;return(0,r.default)(null==(t=null==W?void 0:W.classNames)?void 0:t[e],null==I?void 0:I[e])},K=e=>{var t;return Object.assign(Object.assign({},null==(t=null==W?void 0:W.styles)?void 0:t[e]),null==H?void 0:H[e])},X=t.useMemo(()=>{let e=!1;return t.Children.forEach(N,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[N]),q=_("card",u),[U,Q,V]=p(q),J=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},N),Y=void 0!==T,Z=Object.assign(Object.assign({},R),{[Y?"activeKey":"defaultActiveKey"]:Y?T:z,tabBarExtraContent:B}),ee=(0,l.default)(w),et=ee&&"default"!==ee?ee:"large",er=P?t.createElement(a.default,Object.assign({size:et},Z,{className:`${q}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:P.map(e=>{var{tab:t}=e;return Object.assign({label:t},b(e,["tab"]))})})):null;if(j||v||er){let e=(0,r.default)(`${q}-head`,F("header")),n=(0,r.default)(`${q}-head-title`,F("title")),o=(0,r.default)(`${q}-extra`,F("extra")),l=Object.assign(Object.assign({},O),K("header"));d=t.createElement("div",{className:e,style:l},t.createElement("div",{className:`${q}-head-wrapper`},j&&t.createElement("div",{className:n,style:K("title")},j),v&&t.createElement("div",{className:o,style:K("extra")},v)),er)}let en=(0,r.default)(`${q}-cover`,F("cover")),eo=k?t.createElement("div",{className:en,style:K("cover")},k):null,el=(0,r.default)(`${q}-body`,F("body")),ei=Object.assign(Object.assign({},$),K("body")),ea=t.createElement("div",{className:el,style:ei},x?J:N),es=(0,r.default)(`${q}-actions`,F("actions")),ec=(null==M?void 0:M.length)?t.createElement(h,{actionClasses:es,actionStyle:K("actions"),actions:M}):null,ed=(0,n.default)(G,["onTabChange"]),eu=(0,r.default)(q,null==W?void 0:W.className,{[`${q}-loading`]:x,[`${q}-bordered`]:"borderless"!==A,[`${q}-hoverable`]:L,[`${q}-contain-grid`]:X,[`${q}-contain-tabs`]:null==P?void 0:P.length,[`${q}-${ee}`]:ee,[`${q}-type-${E}`]:!!E,[`${q}-rtl`]:"rtl"===D},g,m,Q,V),eg=Object.assign(Object.assign({},null==W?void 0:W.style),y);return U(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:eg}),d,eo,ea,ec))});var v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o